Skip to content

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.

License

Notifications You must be signed in to change notification settings

k-john-gough/gppg

Repository files navigation

Project Description

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.

This repository now has the full documentation for the parser-generator.

Features

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 examples discussed in the GPLEX and GPPG documentation have now been added to the distro as file GP-Examples.zip.

History

The original version of GPPG was produced by Wayne Kelly at QUT. Further development and ongoing maintainence has been by John Gough.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published