APG
… an ABNF Parser Generator
|
Parse a configuration file and set the trace configuration. More...
#include "./apg.h"
#include <time.h>
#include <errno.h>
#include "../utilities/utilities.h"
#include "./parserp.h"
#include "./tracep.h"
Go to the source code of this file.
Macros | |
#define | BUF_SIZE 512 |
Functions | |
void | vSetDefaultConfig (trace *spTrace) |
Sets the default trace configuration on construction. More... | |
void | vTraceOutputType (void *vpCtx, aint uiType) |
Set the trace record display type. More... | |
void | vTraceApgexType (void *vpCtx, aint uiType) |
Called only by apgex. Sets the display type for apgex tracing. More... | |
void | vTraceConfig (void *vpCtx, const char *cpFileName) |
Read a configuration file and set the trace configuration accordingly. More... | |
void | vTraceConfigDisplay (void *vpCtx, const char *cpFileName) |
Display the trace object's current configuration. More... | |
void | vTraceConfigGen (void *vpCtx, const char *cpFileName) |
Generate a configuration file for the current parser. More... | |
Parse a configuration file and set the trace configuration.
Definition in file trace-config.c.
#define BUF_SIZE 512 |
Definition at line 45 of file trace-config.c.
void vSetDefaultConfig | ( | trace * | spTrace | ) |
Sets the default trace configuration on construction.
Definition at line 56 of file trace-config.c.
void vTraceApgexType | ( | void * | vpCtx, |
aint | uiType | ||
) |
Called only by apgex. Sets the display type for apgex tracing.
Definition at line 116 of file trace-config.c.
void vTraceConfig | ( | void * | vpCtx, |
const char * | cpFileName | ||
) |
Read a configuration file and set the trace configuration accordingly.
vpCtx | Pointer to a valid trace object context returned from vpTraceCtor(). If not valid the application will silently exit with a BAD_CONTEXT exit code. |
cpFileName | Name of the configuration file. Must refer to an existing file. |
Definition at line 143 of file trace-config.c.
void vTraceConfigDisplay | ( | void * | vpCtx, |
const char * | cpFileName | ||
) |
Display the trace object's current configuration.
vpCtx | Pointer to a valid trace object context returned from vpTraceCtor(). If not valid the application will silently exit with a BAD_CONTEXT exit code. |
cpFileName | Name of the file to write the configuration information to. If NULL, displays to stdout. |
Definition at line 387 of file trace-config.c.
void vTraceConfigGen | ( | void * | vpCtx, |
const char * | cpFileName | ||
) |
Generate a configuration file for the current parser.
The configuration requires specific knowledge of the rule and UDT names in the SABNF grammar used to define the parser. The generated file will have commented lines for all possible configuration settings. This will serve as a starting point with all options presented for the user's choices.
vpCtx | Pointer to a valid trace object context returned from vpTraceCtor(). If not valid the application will silently exit with a BAD_CONTEXT exit code. |
cpFileName | Name of the file to write the generated configuration to. If NULL, displays to stdout. |
Definition at line 452 of file trace-config.c.
void vTraceOutputType | ( | void * | vpCtx, |
aint | uiType | ||
) |
Set the trace record display type.
Choose between ASCII and HTML output mode.
vpCtx | Pointer to a valid trace object context returned from vpTraceCtor(). If not valid the application will silently exit with a BAD_CONTEXT exit code. |
uiType | One of TRACE_ASCII or TRACE_HTML. |
Definition at line 90 of file trace-config.c.