Version 7.0
Copyright © 2021 Lowell D. Thomas
APG
… an ABNF Parser Generator
Functions
main.c File Reference

Driver for the APG tracing and statistics examples.. More...

#include "../../utilities/utilities.h"
#include "../../api/api.h"
#include "source.h"
Include dependency graph for main.c:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 Main function for the basic application. More...
 

Detailed Description

Driver for the APG tracing and statistics examples..

This example will demonstrate basic parser tracing, the primary debugging tool. When a parser unexpectedly fails it could be that the grammar is in error or that input string is an invalid grammar phase. The best way to find out what is going on is to examine each step the parser takes. The default trace will show every step, but it is highly configurable to eliminate unneeded steps and zero in on the error.

APG also has detailed statistics gathering capabilities. Parser, memory and vector statistics are available.

Note that trace and statistics have display functions and therefore require <stdio.h>. The APG library specifically excludes all I/O functions except when trace and/or statistics are enabled.

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

Definition in file main.c.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Main function for the basic application.

This example has several cases. Run the main program with no arguments to see a help screen with usage and a list of the cases with a brief description of each.

Parameters
argcThe number of command line arguments.
argvAn array of pointers to the command line arguments.
Returns
The application's exit code.

Definition at line 814 of file main.c.

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