Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
Basic Parser Application

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:
    • none

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
APG Version 7.0 is licensed under the 2-Clause BSD License,
an Open Source Initiative Approved License.