PEG (Parsing Expression Grammars) and packrat parsers are described in The Packrat Parsing and Parsing Expression Grammars Page.
Similar works:
- Tony Garnock-Jones has a Scheme implementation of a packrat parser (paper)
 - Alan Post has a Scheme PEG parser generator called genturfa'i
 - Jon Rafkind has Scheme packrat parser generator called Pegs.
 
Quick assessment (2023-03-14)
- ASDF complains about version specifiers like "0.03" and wants "0.0.3" or whatever.
 - Wants *hash-nickname-map* in genhash but it's called *hash-test-designator-map*.
 - The tests in test.lisp try to load a file named testg.peg but it's missing from the directory.
 - Violation of fixnum type declaration on the slot named hash-val in the call-rule class.
 
#S(PV :PE NT: |sentence|
      :CHILDREN (#S(PV :PE NT: |article| :CHILDREN #S(PV :PE NT: |spaces| :CHILDREN NIL))        
                   (#S(PV :PE NT: |subject| :CHILDREN #S(PV :PE NT: |spaces| :CHILDREN NIL))
                      (#S(PV :PE NT: |verb| :CHILDREN #S(PV :PE NT: |spaces| :CHILDREN NIL))
                         (#S(PV :PE NT: |preposition| :CHILDREN #S(PV :PE NT: |spaces| :CHILDREN NIL))
                            (#S(PV :PE NT: |article| :CHILDREN #S(PV :PE NT: |spaces| :CHILDREN NIL))
                               #S(PV :PE NT: |object| :CHILDREN #S(PV :PE NT: |spaces| :CHILDREN NIL))))))))
The above output of a parse tree is somewhat bad style because it's not actually readable.
obsolete