This is a simple demonstration of constructing a parser from pre-generated grammar files. The parser state is displayed and a second case demonstrates the use of rule name call back functions.
- application code must include header files:
- ../../utilities/utilities.h
- float.h
- application compilation must include source code from the directories:
- ../../library
- ../../utilities
- application compilation must define macros:
The compiled example will execute the following cases. Run the application with no arguments for application usage.
- case 1: display the current state of the APG library (type names, type sizes and defined macros)
- case 2: parse a simple input string and display the final parsed state
- case 3: set call back functions for some of the grammar's rule names and execute them during the parse