summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extra.lisp8
-rw-r--r--package.lisp3
2 files changed, 10 insertions, 1 deletions
diff --git a/extra.lisp b/extra.lisp
index 6453751..b738da7 100644
--- a/extra.lisp
+++ b/extra.lisp
@@ -42,3 +42,11 @@
(defparameter whitespace
(optional (many (unit whitespace?))))
+
+(defun separated-list (p separator)
+ (comp ((v p)
+ (sep (optional separator))
+ (vn (if sep
+ (separated-list p separator)
+ nothing)))
+ (cons v vn)))
diff --git a/package.lisp b/package.lisp
index 7067dfb..2b64c6f 100644
--- a/package.lisp
+++ b/package.lisp
@@ -16,4 +16,5 @@
#:many
#:repeat
#:whitespace?
- #:whitespace))
+ #:whitespace
+ #:separated-list))