#20 rule parse error OR clauses with variables

open
nobody
None
5
2008-03-19
2008-03-19
Anonymous
No

(eval-when (:compile-toplevel :load-toplevel :execute)
(when (not (find-package "LISA-TEST"))
(defpackage "LISA-TEST"
(:use "LISA-LISP"))))

(in-package "LISA-TEST")

(deftemplate t1 () (slot s))
(deftemplate t2 () (slot s))
(deftemplate t3 () (slot s))

(deffacts testfacts ()
(t1 (s s1))
(t2 (s s2))
(t3 (s s3))
(t1 (s x1)))

(defrule r1 ()
(t1 (s ?s1))
=>
(format t "from rule r1 - we got ~A. ~%" ?s1))

(defrule r2 ()
(or (t1 )
(t2 ))
=>
(format t "from rule r2 . ~%"))

(defrule r3 ()
(or (t1 (s s1))
(t2 (s s2)))
=>
(format t "from rule r3 . ~%"))

(eval-when (:compile-toplevel :load-toplevel :execute)
(format t "doing stuff ~%")
(reset)
(run))

;;-end code

Discussion