X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/sod/blobdiff_plain/aa14a4cddcb96b681d5c19a2ec8bad382f43b264..7bfe3a370a6a56a0f097fc1e357ca8ac798d9d4b:/src/parser/parser-test.lisp diff --git a/src/parser/parser-test.lisp b/src/parser/parser-test.lisp index f25961e..6718d5c 100644 --- a/src/parser/parser-test.lisp +++ b/src/parser/parser-test.lisp @@ -400,10 +400,13 @@ (defun test-parse-expr (string) (seq (#\&) and) (seq (#\|) or))) (token (or (seq (#\() lp) + (seq (#\[) lb) (seq (#\-) neg) (seq (#\!) not))) (token (or (seq (#\!) fact) - (when nestedp (seq (#\)) rp)))))) + (when nestedp + (or (seq (#\)) rp) + (seq (#\]) rb))))))) (next (or :any (t :eof)))) (cons value next)))))) @@ -425,7 +428,6 @@ (def-test-method test-expression-parser ((test test-parser) :run nil) (assert-expr-parse "1 ** 2 ** 3" '((** 1 (** 2 3)) . :eof) t t) (assert-expr-parse "1 + 2) * 3" '((+ 1 2) . #\)) t t) (assert-expr-parse "1 + 2 * 3" '((+ 1 (* 2 3)) . :eof) t t) - (assert-expr-parse "! 1 + 2 = 3 | 6 - 3 /= 12/6" '((or (not (= (+ 1 2) 3)) (/= (- 6 3) (/ 12 6)))