summaryrefslogtreecommitdiff
path: root/src/grammar.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/grammar.h')
-rw-r--r--src/grammar.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/grammar.h b/src/grammar.h
index d51c612..fd8d5c9 100644
--- a/src/grammar.h
+++ b/src/grammar.h
@@ -55,7 +55,7 @@ typedef unsigned long PT;
* PT_DFA,
* PT_SPECIAL
* };
- *
+ *
* typedef enum PT_TYPE_e PT_TYPE; */
/* T or NT
@@ -70,6 +70,14 @@ enum TNT_TYPE_e {
typedef enum TNT_TYPE_e TNT_TYPE;
+typedef struct PT_DATA_s PTD;
+
+/* On error return NULL */
+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);
+
/* If a TNT of type TERMINAL has value END_OF_INPUT, then it means,
surprisingly, the end of input. */
enum { END_OF_INPUT = -1 };
@@ -98,8 +106,8 @@ typedef struct Grammar_s Grammar;
NAMES is a list of CPA pointers. */
BOOL
-build_grammar(Grammar *g,
- const List *rules, CC_MOD(List *) names);
+build_grammar(Grammar *g, const List *rules,
+ CC_MOD(List *) names, CC_MOD(List *) predicates);
/* This accepts one and only one optional argument, which is of type
either T, NT, or PT, depending on TYPE. */