aboutsummaryrefslogtreecommitdiff
path: root/examples/calc.lisp
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2023-07-29 08:52:37 -0700
committercolin <colin@cicadas.surf>2023-07-29 08:52:37 -0700
commitfbfa64ec69870d424d3f94bd87380efe565b64b5 (patch)
tree23b12d6093a2b245487277a5bda0025623a2d2eb /examples/calc.lisp
parentfe89d62417be96f0c8d2b864423bc891f149e54f (diff)
change language for rule def
Diffstat (limited to 'examples/calc.lisp')
-rw-r--r--examples/calc.lisp10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/calc.lisp b/examples/calc.lisp
index 87993e8..7b2f9ef 100644
--- a/examples/calc.lisp
+++ b/examples/calc.lisp
@@ -11,15 +11,15 @@
(:seq <value> (:eof))
(:seq <unop> (:eof))
(:seq <binop> (:eof)))
- :=> car)
+ :then car)
(<expr> :-> (:or <subexpr> <value> <unop> <binop>))
(<subexpr> :-> (:item)
- :?? listp
- :=> (argot:parse calc <subexpr> ))
- (<value> :-> (:item) :?? numberp)
+ :if listp
+ :then (argot:parse calc <subexpr>))
+ (<value> :-> (:item) :if numberp)
(<binop> :-> (:seq (:@ lhs <expr>)
(:@ rhs (:+ (:seq (:or= + - / * ^ %) <expr>))))
- :=> (expand-binop lhs rhs))
+ :then (expand-binop lhs rhs))
(<unop> :-> (:seq (:or= sin cos tan -) <expr>)))