From: Jonathan Wohlgelernter
Subject: help ELIZA
Date: 
Message-ID: <Pine.A41.4.05.10011121843130.38060-100000@acis.mc.yu.edu>
I am a student first exposed to AI.  I was wondering if someone could take
just a minute out of their busy schedule to help me in the confusing
process of learning lisp.  I have been trying to understand an ELIZA
program written in lisp, and the firstt few functions have thown me off.
If someone could be kind enough to anotate (i.e. comment) these 5 or so
line functions, I would greatly appreciate it.
Jonathan

here they are:
;;;             Function to handle special cases of Decomp
;;;             rules.
;;;

(DEFUN AUX-DECOMP (PATT DLIST)		
        (SETQ VAR (CAR DLIST))		
        (SETQ MLIST (EVAL (CADR DLIST)))
        (SETQ MWORD (AUX-MATCH PATT MLIST))
        (COND ((NULL MWORD) NIL)	
              (T (SET (ATOMVAR VAR) (LIST MWORD)) 
                 (SUBST VAR 'TAG PATT))))

;

(DEFUN AUX-MATCH (PATT MLIST)
        (COND ((NULL MLIST) NIL)
              (T (SETQ PATT (SUBST (CAR MLIST) 'TAG PATT))
                 (COND ((MATCH PATT *SENTENCE*)
                        (CAR MLIST))
                       (T (SETQ PATT (SUBST 'TAG (CAR MLIST) PATT))
                          (AUX-MATCH PATT (CDR MLIST)))))))


thanx again.
Jon.