diff options
Diffstat (limited to 'src/grammar.c')
-rw-r--r-- | src/grammar.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/grammar.c b/src/grammar.c index 3b5a959..afb9353 100644 --- a/src/grammar.c +++ b/src/grammar.c @@ -44,6 +44,15 @@ rg_nth(CCR_MOD(Rule_group *) rg, NUM n) return (List *) list_nth(rg->rights, n); } +struct PT_DATA_s { + dfa *dfap; + /* NULL-terminated strings */ + char *user_name; + char *raw_name; +}; + +typedef struct PT_DATA_s PTD; + /* TODO: Add some statistic counts to assist the hash tables. For example, store the total number of terminals as an integer; then the hash table can be hinted at initialization to contain that many @@ -63,7 +72,8 @@ struct Grammar_s { To print them, first encode them into normal strings. */ List *names; - /* TODO: Add an array of predicates. */ + /* an array of predicates. */ + PTD *predicates; }; static void @@ -179,6 +189,7 @@ BOOL build_grammar(Grammar *g, const List *rules, CC_MOD(List *) names) { g->names = (List *) names; + g->predicates = NULL; NUM len = list_length(names); NUM rule_len = list_length(rules); |