|
APG
… an ABNF Parser Generator
|
Private header file for the AST functions. More...

Go to the source code of this file.
Data Structures | |
| struct | ast |
| The AST object context. Holds the object's state. More... | |
Functions | |
Private AST Functions | |
These functions are primarily for the parser to call (via macros, e.g. AST_CLEAR, etc.) | |
| void | vAstClear (void *vpCtx) |
| Clear the AST records for reuse of the AST object. More... | |
| void | vAstRuleOpen (void *vpCtx, aint uiRuleIndex, aint uiPhraseOffset) |
| Called by parser's RNM operator before downward traversal. More... | |
| void | vAstRuleClose (void *vpCtx, aint uiRuleIndex, aint uiState, aint uiPhraseOffset, aint uiPhraseLength) |
| Called by parser's RNM operator after upward traversal. More... | |
| void | vAstOpOpen (void *vpCtx) |
| Called in preparation for a downward traversal of an RNM or UDT node. More... | |
| void | vAstOpClose (void *vpCtx, aint uiState) |
| Called to finish up after an upward traversal of an RNM or UDT node. More... | |
Private header file for the AST functions.
Applications should not need to include this header directly.
Definition in file astp.h.
| void vAstClear | ( | void * | vpCtx | ) |
Clear the AST records for reuse of the AST object.
| vpCtx | Pointer to an AST context returned from vpAstCtor(); Silently ignored if NULL. However, if non-NULL it must be a valid AST context pointer or the application will exit with BAD_CONTEXT. |
| void vAstOpClose | ( | void * | vpCtx, |
| aint | uiState | ||
| ) |
Called to finish up after an upward traversal of an RNM or UDT node.
| vpCtx | - AST context handle returned from |
| uiState | ID_MATCH or ID_NOMATCH, the result of the parse. |
| void vAstOpOpen | ( | void * | vpCtx | ) |
| void vAstRuleClose | ( | void * | vpCtx, |
| aint | uiRuleIndex, | ||
| aint | uiState, | ||
| aint | uiPhraseOffset, | ||
| aint | uiPhraseLength | ||
| ) |
Called by parser's RNM operator after upward traversal.
| vpCtx | - AST context handle returned from |
| uiRuleIndex | The index of the RNM rule. If uiRuleIndex > uiRuleCount then it represents a UDT whose index is uiRuleIndex - uiRuleCount. |
| uiState | ID_MATCH or ID_NOMATCH, the result of the parse for this rule or UDT. |
| uiPhraseOffset | Offset into the input string of the offest of the matched phrase. |
| uiPhraseLength | The number of match characters in the phrase. |
Called by parser's RNM operator before downward traversal.
| vpCtx | Pointer to a valid AST context returned by vpAstCtor(). No validation is done here as this function is always called by a trusted parser operator function. |
| uiRuleIndex | The index of the RNM rule. If uiRuleIndex > uiRuleCount then it represents a UDT whose index is uiRuleIndex - uiRuleCount. |
| uiPhraseOffset | Offset into the input string of the offest of the matched phrase. |
1.8.17