Pegasus - PEG grammar nimbleparsec generator

Pegasus - Nimbleparsec parser generator

https://hexdocs.pm/pegasus/Pegasus.html

This library converts a PEG parser library to nimbleparsec parsers. You can “hook” extra functions on to the combinators generated by the PEG language.

The PEG language is here:
https://www.piumarta.com/software/peg/peg.1.html

Unlike yecc/leex, This PEG grammar is extremely easy to read and write, given ABNF descriptions given in most RFCs or other standards documents (e.g. ECMA). This also leverages the extremely effective compile-time nature of the NimbleParsec library.

12 Likes

Dear Sir,

Do you know of any languages that have a PEG grammar defined that one could look at for inspiration?

Most of these:

And this:

2 Likes