Expanded vtable for methods to determine whether a combinator is ok to use with regular or CF grammars.
This commit is contained in:
parent
8163b3981d
commit
36e1f66de0
25 changed files with 200 additions and 4 deletions
|
|
@ -19,8 +19,20 @@ static HParseResult* parse_action(void *env, HParseState *state) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static bool action_isValidRegular(void *env) {
|
||||
HParseAction *a = (HParseAction*)env;
|
||||
return a->p->vtable->isValidRegular(a->p->env);
|
||||
}
|
||||
|
||||
static bool action_isValidCF(void *env) {
|
||||
HParseAction *a = (HParseAction*)env;
|
||||
return a->p->vtable->isValidCF(a->p->env);
|
||||
}
|
||||
|
||||
static const HParserVtable action_vt = {
|
||||
.parse = parse_action,
|
||||
.isValidRegular = action_isValidRegular,
|
||||
.isValidCF = action_isValidCF,
|
||||
};
|
||||
|
||||
const HParser* h_action(const HParser* p, const HAction a) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue