Version 6.3
Copyright © 2005 - 2012 Lowell D. Thomas
APG
  … ABNF Parser Generator
APG - an ABNF Parser Generator

APG is organized into three separate directories plus an additional five directories for the five examples of APG usage. The three APG directories are:

  • ApgLib
    This is the basic library. It has the API for the parser itself. It is designed to not include any references to the C run-time libary I/O functions, for reasons of economy. Since the variable character width is a compile-time variable, ApgLib is compiled separately with each application. No static library is built.
  • ApgUtilities
    As the name implies, is a library of utility functions. These are not necessary for the parser itself, but provide a convenient set of helper functions. These are mostly display functions, which need the C run-time I/O library, but also has a few basic file handling functions and a timer component used in the timing tests.

  • Generator
    This is APG, the parser generator. It reads an SABNF grammar and generates a parser in the form of C or C++ source code.

The five examples of APG usage are:

  • Demo
    This is a simple "Hello World" example of a parser. It demonstrates most of the basic APG operations and gives examples of how to write and set up rule and UDT callback functions.
  • CppDemo
    This gives a simple example of setting up a C++ parser.

  • MEGACO.
    APG has proved a popular choice for parsing MEGACO messages (RFC 3525.) This is an example of how to set up a C++ parser for this grammar.

  • SIP
    This is an in-depth study of using UDTs to significantly speed up the parsing process without altering the language of interest. The SIP grammar (RFC 3261) has been selected for this study because it is a substantial (300+ rule names) and commercially significant grammar.

  • WideCharacters
    This is an example of using an alphabet character width greater than 8 bits. This example parses UNICODE characters using their full 32-bit integer character codes (UTF-32).

For more information about APG, Version 6.3 see doc6.3.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/licenses.html or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.