summaryrefslogtreecommitdiff
path: root/main.lisp
blob: 6357cc40a715e06d25154c4bb71693d383ed8cce (plain)
1
2
3
4
5
6
7
8
9
10
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)))