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

The APG library is designed for minimum footprint with no I/O and the ability to exclude unneeded pieces of code through configuration in apg.h. However, for a desktop application visuals are usually required and many of the utilities here are simply pretty printers of APG structures and results.

For a full list and descriptions of utility functions see utilities.h & utilities.c.

Additionally, there are a number of more complex facilities that are used in two or more places in APG and may be of use in user applications as well. These are all implemented as classes, each with its own constructor and destructor.

Data Conversions - Encoding and Decoding

conv.h & conv.c
Many applications require data format conversions on the fly. This data conversion object provides conversions to and from Latin1 (ISO-8859-1), UTF-8, UTF-16 and UTF-32. Base64 decoding and encoding can be added as a prefix or postfix operation for any of these formats.

Display Data in hexdump Style Format

format.h & format.c
APG phrases are often not printable as ASCII characters. This utility object will display arbitrary 8-bit bytes and 32-bit Unicode characters in hexdump-style formats. For 8-bit byte data, this is similar to the Linux command hexdump. For 32-bit word data, similar formatting is provided.

Line Handling for ASCII Data

lines.h & lines.c
Often it is convenient to parse ASCII data into lines and to be able to easily iterate through the lines and/or normalize the line endings. The lines object provides such a parser.

Line Handling for Unicode Data

linesu.h & linesu.c
Often it is convenient to parse Unicode data into lines and to be able to easily iterate through the lines and/or normalize the line endings. The linesu object provides such a parser.

Message Log

msglog.h & msglog.c
Often an application will need to collect error or warning messages for display at the end, rather that stopping on each error or warning. The msglog object provides a consistent and reusable means of doing this throughout APG and any other application that has a need for it.

APG Version 7.0 is licensed under the 2-Clause BSD License,
an Open Source Initiative Approved License.