summaryrefslogtreecommitdiff
path: root/main.lisp
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2024-10-13 00:34:11 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2024-10-13 00:34:11 -0300
commit7a6f4586c2e83ffcdb5a8b7b2c5591f6e80e038f (patch)
tree441e462d4145c95e4aad94c7e64b89ddca667e6c /main.lisp
parentb196a5d56db31d6836c1ed028f38146cbb08436c (diff)
downloadmonparser-7a6f4586c2e83ffcdb5a8b7b2c5591f6e80e038f.tar.gz
monparser-7a6f4586c2e83ffcdb5a8b7b2c5591f6e80e038f.zip
Change project file structure and api
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)))