From fe89d62417be96f0c8d2b864423bc891f149e54f Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 29 Jul 2023 08:42:30 -0700 Subject: recursive parse in calc example --- examples/calc.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/calc.lisp b/examples/calc.lisp index 14b03e5..87993e8 100644 --- a/examples/calc.lisp +++ b/examples/calc.lisp @@ -7,11 +7,15 @@ (deflanguage calc (:documentation "A calculator language") ( :-> (:or + (:seq (:eof)) (:seq (:eof)) (:seq (:eof)) (:seq (:eof))) :=> car) - ( :-> (:or )) + ( :-> (:or )) + ( :-> (:item) + :?? listp + :=> (argot:parse calc )) ( :-> (:item) :?? numberp) ( :-> (:seq (:@ lhs ) (:@ rhs (:+ (:seq (:or= + - / * ^ %) )))) -- cgit v1.2.3