Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
Using the API

This example explores the use of the APG Application Programming Interface. The API object will be created and its major features explored.

  • application code must include header files:
    • ../../utilities/utilities.h
    • ../../api/api.h
  • application compilation must include source code from the directories:
    • ../../api
    • ../../library
    • ../../utilities
  • application compilation must define macros:
    • APG_AST

The compiled example will execute the following cases. Run the application with no arguments for application usage.

  • case 1: Display application information. (type names, type sizes and defined macros)
  • case 2: Input, concatenate and display multiple grammar files.
  • case 3: Input, validation fails with bad characters and no final EOL.
  • case 4: Illustrate a grammar with bad syntax.
  • case 5: Illustrate a grammar with bad semantics.
  • case 6: Illustrate generating a parser with and without PPPT.
APG Version 7.0 is licensed under the 2-Clause BSD License,
an Open Source Initiative Approved License.