diff options
Diffstat (limited to 'src/grammar.h')
-rw-r--r-- | src/grammar.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/grammar.h b/src/grammar.h index e18ad0e..89a66ba 100644 --- a/src/grammar.h +++ b/src/grammar.h @@ -78,6 +78,8 @@ PTD *new_ptd(str *user_name, str *raw_name, dfa *dfap); /* FLAG is used to destroy the strings contained within */ void destroy_ptd(PTD *p, int flag); +BOOL ptd_run(PTD *p, NUM code); + /* If a TNT of type TERMINAL has value END_OF_INPUT, then it means, surprisingly, the end of input. */ enum { END_OF_INPUT = -1 }; @@ -172,6 +174,9 @@ List *grammar_names(CCR_MOD(Grammar *)g); /* look up a rule */ Rule_group *grammar_rule(CCR_MOD(Grammar *) g, NT nt); +/* lookup a predicate */ +PTD *grammar_ptd(CCR_MOD(Grammar *) g, PT pt); + /* NTS should be already allocated to be an array of BOOLs. The size of this array should be the same as the length of the array of non-terminals of G. If any of the above two conditions is not |