GPPG is a parser generator that produces parsers written in the C# V2 or higher. The input language is YACC-like, and the parsers are LALR(1), with the usual automatic disambiguations. Designed to work with GPLEX.
GPPG generates bottom-up parsers. The generated parsers recognize languages that are LALR(1), with the traditional yacc disambiguations. There are a number of extensions of the traditional input language that are necessary for correctness of the generated C# output files.
The generated parsers are designed to interface cleanly with scanners generated by Gardens Point LEX. However, gppg-generated scanners have been successfully used with both handwritten scanners and with scanners generated by COCO/R.
A particular feature of the tool is the optional generation of an html report file that allows easy navigation of the finite state automaton that recognizes the viable prefixes of the specified language. This report shows the production items, lookahead symbols and actions for each state of the automaton. It also optionally shows an example of a shortest input, and shortest FSA-path reaching each state. This report file considerably simplifies the diagnosis of grammar conflicts.
Examples Of Use
There are a small number of examples of use included in the download package, and these are fully discussed in the documentation. For a more complex example GPLEX and this companion GPPG tool each themselves use scanners and parsers generated by GPLEX and GPPG.
The original version of GPPG was produced by Wayne Kelly at QUT. Further development and ongoing maintainence has been by John Gough.