Each time I have written a new version of APG I have tried to include examples that show how to set up a parser and use the features. In many cases I have included a number of other examples for various other reasons. Some grammars have been chosen because they are "classics" - grammars that you see in the text books. SIP and MEGAGO grammars are widely used in the telecommunications business and have often been chosen as examples of substantial grammars of commercial importance. Other times grammars have been chosen simply out of curiosity.
See the individual projects for the latest examples provided. They may change from time to time and be different from what is listed here. But the following lists will give you an idea of what to find where.
APG Version 6.3
- Demo - a simple grammar used to demonstrate most of the 6.3 features.
- CppDemo - a trivial grammar to show how to set up and use a C++ parser.
- MEGACO - demonstrates construction of an AST, its translation and it XML format.
- SIP - an extensive timing test showing the power of UDTs for speed.
- WideCharacters - 6.3 introduces for the first time variable integer sizes for the input string character codes. This example demonstrates use of 32-bit wide character codes.
Java APG Version 1.0
- apg - the parser generator
- apg-lib the library of core parsing functions
- examples of use of both apg and apg-lib
- several apg usage examples
- simple demo of basic usage
- using the AST
- controlling the tracing facility
- writing UDTs
- INI File Format - a "real world" example
- Initialization File
- Dangling Else
- e-mail address
- C++ Preprocessor