Constructs the source and header files for the generated parser.
More...
Go to the source code of this file.
|
void | vApiOutput (void *vpCtx, const char *cpOutput) |
| Generate a source and header file that can be used to construct a parser for the specified SABNF grammar. More...
|
|
void * | vpApiOutputParser (void *vpCtx) |
| Generate a parser object directly from the specified SABNF grammar. More...
|
|
Constructs the source and header files for the generated parser.
Definition in file output.c.
◆ LUINT_MAX
#define LUINT_MAX |
( |
|
x, |
|
|
|
y |
|
) |
| if(((x) < (y)) && ((y) != (luint)-1))x = (y) |
Replace x with y only if y > x.
Definition at line 83 of file output.c.
◆ OUTPUT_LINE_LENGTH
#define OUTPUT_LINE_LENGTH 30 |
Controls the number of integers per line in the output source file.
Definition at line 78 of file output.c.
◆ vApiOutput()
void vApiOutput |
( |
void * |
vpCtx, |
|
|
const char * |
cpOutput |
|
) |
| |
Generate a source and header file that can be used to construct a parser for the specified SABNF grammar.
- Parameters
-
vpCtx | - Pointer to an API context previously returned from vpApiCtor(). |
cpOutput | The root of the file name to use for the generated source and header files. Any extension will be stripped and replaces with .h for the header file and .c for the source file. The name may be relative or absolute. Any directories in the pathname must exist. |
- Returns
- Throws exceptions on errors.
Definition at line 152 of file output.c.
◆ vpApiOutputParser()
void* vpApiOutputParser |
( |
void * |
vpCtx | ) |
|
Generate a parser object directly from the specified SABNF grammar.
The generated parser has its own memory object and is independent of the parent API object other than sharing the same exception object. That is, throw exceptions will land in the API catch block. But the API and the generated parser must each call their respective destructors to prevent memory leaks.
- Parameters
-
vpCtx | - Pointer to an API context previously returned from vpApiCtor(). |
- Returns
- Throws exceptions on errors.
Definition at line 217 of file output.c.
APG Version 7.0 is licensed under the
2-Clause BSD License,
an Open Source Initiative Approved License.