summaryrefslogtreecommitdiff
path: root/main.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'main.lisp')
-rw-r--r--main.lisp11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.lisp b/main.lisp
new file mode 100644
index 0000000..6357cc4
--- /dev/null
+++ b/main.lisp
@@ -0,0 +1,11 @@
+(in-package #:monparser)
+
+(defun parse (parser data)
+ (let* ((result (funcall parser
+ (make-instance 'parser-input
+ :cursor 0
+ :data data))))
+ (if (parsing-p result)
+ (let ((finished? (not (has-data? (parsing-left result)))))
+ (values (parsing-tree result) finished?))
+ result)))