APG
… an ABNF Parser Generator
|
Processes the semantics phase. Parses the grammar and translates the AST to opcodes. The compiler, so to speak. More...
Go to the source code of this file.
Macros | |
#define | BUF_SIZE 256 |
Functions | |
void | vApiOpcodes (void *vpCtx) |
Parse the SABNF grammar and translate its AST into opcodes for all the rules. More... | |
aint | uiFindRule (semantic_rule *spRules, aint uiRuleCount, const char *cpName, aint uiNameLength) |
Find the index of the named rule in the rule list. More... | |
aint | uiFindUdt (semantic_udt *spUdts, aint uiUdtCount, const char *cpName, aint uiNameLength) |
Processes the semantics phase. Parses the grammar and translates the AST to opcodes. The compiler, so to speak.
Definition in file semantics.c.
#define BUF_SIZE 256 |
Definition at line 51 of file semantics.c.
aint uiFindRule | ( | semantic_rule * | spRules, |
aint | uiRuleCount, | ||
const char * | cpName, | ||
aint | uiNameLength | ||
) |
Find the index of the named rule in the rule list.
Does a simple linear search.
[in] | spRules | - the array of rules |
[in] | uiRuleCount | - the number of rules |
[in] | cpName | - pointer to the name to look for (not a null-terminated string) |
[in] | uiNameLength | - the number of characters in the name |
Definition at line 160 of file semantics.c.
aint uiFindUdt | ( | semantic_udt * | spUdts, |
aint | uiUdtCount, | ||
const char * | cpName, | ||
aint | uiNameLength | ||
) |
Definition at line 172 of file semantics.c.
void vApiOpcodes | ( | void * | vpCtx | ) |
Parse the SABNF grammar and translate its AST into opcodes for all the rules.
vpCtx | - Pointer to an API context previously returned from vpApiCtor(). |
Definition at line 64 of file semantics.c.