From aa378b3568b7dbb05de0de9f17abaae03863058a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Mon, 1 May 2023 23:03:53 -0300 Subject: Improve flexibility This will make it easier to run the parser in a multi-stage setup without sacrificing the standalone setups. Modified comp to extract the location of parsed things. I expose the parts of the Input, Parsing and Failure objects to customize error handling. Parsing and Failure objects have a default printer now. --- package.lisp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'package.lisp') diff --git a/package.lisp b/package.lisp index 6e868f9..5936a52 100644 --- a/package.lisp +++ b/package.lisp @@ -1,11 +1,23 @@ (defpackage #:input (:use #:cl) - (:export #:from-string + (:export #:file + #:data + #:cursor + #:line-and-column + #:has-data? + #:prefix? + #:peek + #:advance + #:from-string #:from-file)) (defpackage #:parser (:use #:cl) - (:export #:run + (:export #:parsing-p + #:parsing-tree + #:parsing-left + #:failure-place + #:failure-message #:fail #:comp #:one-of @@ -19,5 +31,4 @@ #:nothing #:optional #:many - #:separated-list - #:whitespace)) + #:separated-list)) -- cgit v1.2.3