APG
… ABNF Parser Generator
|
Demonstrates writing and calling callback functions. More...
#include "main.h"
#include "CallbacksGrammar.h"
Go to the source code of this file.
Data Structures | |
struct | PARSER_CALLBACK_DATA |
user data passed to the Parser More... | |
struct | AST_CALLBACK_DATA |
user data passed to the AST translator More... | |
Functions | |
apg_uint | uiSemiComment (APG_CBDATA *spData) |
apg_uint | uiCppComment (APG_CBDATA *spData) |
apg_uint | uiCComment (APG_CBDATA *spData) |
apg_uint | uiHexNum (APG_CBDATA *spData) |
apg_uint | uiLineEnd (APG_CBDATA *spData) |
apg_uint | uiBlankLine (APG_CBDATA *spData) |
apg_uint | uiUDT_u_LineError (APG_CBDATA *spData) |
void | vIndent (FILE *spOut, apg_uint uiIndent) |
apg_uint | uiFileParser (APG_CBDATA *spData) |
apg_uint | uiFileAst (APG_CBDATA *spData) |
apg_uint | uiDecNum (APG_CBDATA *spData) |
void | vDemoCallbacks () |
Demonstrates writing and calling callback functions.
Definition in file Callbacks.c.
apg_uint uiBlankLine | ( | APG_CBDATA * | spData | ) |
Callback function for the BlankLine rule. Used only for syntax analysis.
spData | the callback data passed to the function by the Parser |
Definition at line 298 of file Callbacks.c.
apg_uint uiCComment | ( | APG_CBDATA * | spData | ) |
Syntax callback function for the CComment rule.
spData | the callback data passed to the function by the Parser |
Definition at line 198 of file Callbacks.c.
apg_uint uiCppComment | ( | APG_CBDATA * | spData | ) |
Syntax callback function for the CppComment rule.
spData | the callback data passed to the function by the Parser |
Definition at line 182 of file Callbacks.c.
apg_uint uiDecNum | ( | APG_CBDATA * | spData | ) |
Callback function for the Decnum rule. Used only for semantic analysis.
spData | the callback data passed to the function by the Parser |
Definition at line 257 of file Callbacks.c.
apg_uint uiFileAst | ( | APG_CBDATA * | spData | ) |
Semantic callback function for the File rule.
spData | the callback data passed to the function by the Parser |
Definition at line 132 of file Callbacks.c.
apg_uint uiFileParser | ( | APG_CBDATA * | spData | ) |
Syntax callback function for the File rule.
spData | the callback data passed to the function by the Parser |
Definition at line 78 of file Callbacks.c.
apg_uint uiHexNum | ( | APG_CBDATA * | spData | ) |
Callback function for the Hexnum rule. Used for both syntax and semantic analysis.
spData | the callback data passed to the function by the Parser |
Definition at line 214 of file Callbacks.c.
apg_uint uiLineEnd | ( | APG_CBDATA * | spData | ) |
Callback function for the LineEnd rule. Used only for syntax analysis.
spData | the callback data passed to the function by the Parser |
Definition at line 282 of file Callbacks.c.
apg_uint uiSemiComment | ( | APG_CBDATA * | spData | ) |
Syntax callback function for the SemiComment rule.
spData | the callback data passed to the function by the Parser |
Definition at line 163 of file Callbacks.c.
apg_uint uiUDT_u_LineError | ( | APG_CBDATA * | spData | ) |
Callback function for the u_LineError UDT. Used for both syntax and semantic analysis.
spData | the callback data passed to the function by the Parser |
Definition at line 314 of file Callbacks.c.
void vDemoCallbacks | ( | ) |
Demonstrates writing and using rule and UDT callback functions. The test output is written to Callbacks.output.
Definition at line 391 of file Callbacks.c.
void vIndent | ( | FILE * | spOut, |
apg_uint | uiIndent | ||
) |
A simple helper function to print blank spaces for indenting output.
spOut | the output device to print on |
uiIndent | the number of spaces to indent |
Definition at line 70 of file Callbacks.c.