APG
… an ABNF Parser Generator
|
Driver for the APG tracing and statistics examples.. More...
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
Main function for the basic application. More... | |
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.
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.
argc | The number of command line arguments. |
argv | An array of pointers to the command line arguments. |