APG
… an ABNF Parser Generator
|
The universal-mode back reference object. More...
#include "./apg.h"
#include "./lib.h"
#include "./parserp.h"
#include "./backref.h"
#include "./backrefu.h"
Go to the source code of this file.
Data Structures | |
struct | bkru_frame |
struct | bkru_input |
Functions | |
void * | vpBkruCtor (parser *spParserCtx) |
void | vBkruRuleOpen (void *vpCtx, aint uiIndex) |
void | vBkruRuleClose (void *vpCtx, aint uiIndex, aint uiState, aint uiPhraseOffset, aint uiPhraseLength) |
void | vBkruUdtClose (void *vpCtx, aint uiIndex, aint uiState, aint uiPhraseOffset, aint uiPhraseLength) |
void | vBkruOpOpen (void *vpCtx) |
void | vBkruOpClose (void *vpCtx, aint uiState) |
bkr_phrase | sBkruFetch (void *vpCtx, aint uiIndex) |
The universal-mode back reference object.
This component will maintain a list of frame stacks, one for each rule that is universal-mode back referenced. It will have a map, that maps each rule index to the proper frame stack index. It also needs a stack of check points. RNM, ALT, CAT and REP operators need to checkpoint the frame stacks going down the tree, and restore the checkpoint coming up the tree if the node does not find a phrase match.
Each rule's Single-Expansion Syntax Tree(SEST) will be scanned for any references to any of the back referenced rules. If a rule does not reference any back referenced rules (which is anticipated to be most rules) it will set a "don't backref" flag that will prevent any back reference code in the tree below the rule's RNM node, saving a lot of check point work.
Definition in file backrefu.c.
bkr_phrase sBkruFetch | ( | void * | vpCtx, |
aint | uiIndex | ||
) |
Definition at line 358 of file backrefu.c.
void vBkruOpClose | ( | void * | vpCtx, |
aint | uiState | ||
) |
Definition at line 340 of file backrefu.c.
void vBkruOpOpen | ( | void * | vpCtx | ) |
Definition at line 327 of file backrefu.c.
void vBkruRuleClose | ( | void * | vpCtx, |
aint | uiIndex, | ||
aint | uiState, | ||
aint | uiPhraseOffset, | ||
aint | uiPhraseLength | ||
) |
Definition at line 295 of file backrefu.c.
void vBkruRuleOpen | ( | void * | vpCtx, |
aint | uiIndex | ||
) |
Definition at line 282 of file backrefu.c.
void vBkruUdtClose | ( | void * | vpCtx, |
aint | uiIndex, | ||
aint | uiState, | ||
aint | uiPhraseOffset, | ||
aint | uiPhraseLength | ||
) |
Definition at line 320 of file backrefu.c.
void* vpBkruCtor | ( | parser * | spParserCtx | ) |
Definition at line 100 of file backrefu.c.