diff options
-rw-r--r-- | parser.lisp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/parser.lisp b/parser.lisp index 2da9975..989938b 100644 --- a/parser.lisp +++ b/parser.lisp @@ -84,15 +84,9 @@ (defun optional (p) (either p nothing)) -(defun zero-or-more (p) - (either (comp ((x p) - (xs (zero-or-more p))) - (cons x xs)) - nothing)) - -(defun one-or-more (p) +(defun many (p) (comp ((x p) - (xs (zero-or-more p))) + (xs (optional (many p)))) (cons x xs))) (defun separated-list (p separator) |