Rutger van Beusekom writes:

> First of all, I am aware I am submitting a sizeable patch here, and I am
> happy to break it up if necessary.

As Ekaitz has been doing some great PEG work and it seems that there's
some renewed interest in PEG, please find a newer version of this patch
as a broken-up patch set and rebased on latest main.  It features:

  * debug tracing, for debugging of grammar
  * expectation parser, for (syntax) error reporting
  * parameterize'able whitespace and comment skip parsing
  * preserving of location information
  * fall-back parsing, for parsing incomplete texts

We've been using these extensions in Dezyne (https://dezyne.org) for
some years now.

For your pulling convenience, also here
    https://gitlab.com/janneke/guile/-/commits/wip-peg

Greetings,
Janneke

Rutger van Beusekom (5):
  Remove trailing whitespace in PEG texinfo.
  peg: Add debug tracing.
  peg: Add expect.
  peg: Add whitespace and comment skip parsers.
  peg: Add fall-back parsing.

 doc/ref/api-peg.texi            | 143 ++++++++++++++++----
 module/ice-9/peg.scm            |  11 +-
 module/ice-9/peg/codegen.scm    | 231 +++++++++++++++++++++++++-------
 module/ice-9/peg/string-peg.scm |  12 +-
 test-suite/tests/peg.test       | 141 +++++++++++++++++--
 5 files changed, 453 insertions(+), 85 deletions(-)

-- 
Janneke Nieuwenhuizen <jann...@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | AvatarĀ® https://AvatarAcademy.com

Reply via email to