diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2025-06-10 13:57:22 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2025-06-10 13:57:22 -0300 |
commit | da008e637b5bff56fed8dfbacc2adabc4bca18b1 (patch) | |
tree | 0d0207034812652c5d7d6c90d45334c918e87e4d /main.lisp | |
parent | dcff69e9d6334c57faa5a690c449f12969a6526f (diff) | |
download | monparser-da008e637b5bff56fed8dfbacc2adabc4bca18b1.tar.gz monparser-da008e637b5bff56fed8dfbacc2adabc4bca18b1.zip |
Add better reporting and new features
Units report expected results on end of input.
Opposite parser helps with the complexity explosion
on unit parsers.
Input and error printing has context.
Diffstat (limited to 'main.lisp')
-rw-r--r-- | main.lisp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -6,9 +6,9 @@ :data data)))) (if (parsing-p result) (let ((finished? (not (has-data? (parsing-left result))))) - (values (parsing-tree result) finished?)) - (error (format nil "~a" result))))) + (values result finished?)) + result))) (defmethod print-object ((obj failure) stream) (multiple-value-bind (line column) (line-and-column (failure-place obj)) - (format stream "~a:~a: ~a" line column (failure-message obj)))) + (format stream "~a:~a: ~a~&~a" line column (failure-message obj) (failure-place obj)))) |