headerphoto

Documentation

In all cases, the documentation is included as comments in the code and formated with a formatting tool appropriate to the language. The formatted documentation can be found here, or regenerated from the source code for the latest version. Instructions for regeneration of the documentation are given in the respective GitHub Repositories.

Application Description

APG Version 6.3 is written entirely in the C language. It has a small footprint and is fast and reliable. Because of this and the fact that it accepts ABNF grammars it is an ideal choice for Internet protocol stacks. Indeed, a number of large telecom companies use APG in their commercial products for parsing MEGACO, SIP and other communications protocols.

For C++ users, Version 6.3 provides C++ wrappers for its native C functions. The generated code includes a "starter-kit" of functions for initializing the rule and UDT callback lists and templates for the callback functions themselves. For a new project, uncommenting and using these template functions can provide a quick start, especially for grammars with a large number of rules.

This version of APG and the parsers that it generates are written entirely in the Java language. This allows for project development in a completely Java environment.

Additionally, thanks to Ralf Handl and the OASIS OData project, Java APG has three extended features.

  • The incremental alternative (/=) is implemented.
  • It accepts multiple input grammar files.
  • It has an additional, case-sensitive literal string using single quotes.

This is a complete JavaScript version of APG. It can run in node.js or web page applications. apg.html is a GUI version for easy development of SABNF grammars. It replaces the (now removed) "Interactive APG" from this web site.

apg has been split into two repositories, apg and this developer's API. This API accomplishes two goals. a) it provides much more flexible access to the underlying generation operations and b) it removes all I/O from the API. The node.js "fs" module is incompatible with some development frameworks.

JavaScript APG library of core parsing functions.

apg-exp is a regex-like pattern-matching engine that uses SABNF syntax for the pattern definitions and JavaScript APG to create and apply the pattern-matching parser.

Many examples of use for all JavaScript applications.

apg-conv is a data conversion tool. It can run as a command line application to convert files from one encoding to another. It also provides encoding and decoding functions accessible from node.js applications.

Its features and design have been specifically built as an aid to apg.html. It is not meant to compete with more complete tools like iconv and iconv-lite. Nonetheless, for the encodings that it supports, it provides an alternate choice.

apg-conv-api is the API for apg-conv. It provides the functions for disassembling the data types as well as the encoding and decoding functions. These can be found in the ./src/converter.js file. It also provides access to the low-level transformation functions which actually do the encoding and decoding. These can be found in the ./src/transformers.js file.