de4faa8661e4e436d27609a7d19355845d34ca87
[cascardo/grammar.git] / lr1.h
1 #ifndef LR1_H
2 #define LR1_H
3
4 #include <grammar.h>
5
6 typedef struct _transition_t transition_t;
7 typedef struct _lr1_t lr1_t;
8
9 transition_t* transition_shift_new (gint);
10 transition_t* transition_reduce_new (symbol_t*, rule_t*);
11 transition_t* transition_accept_new ();
12 void transition_delete (transition_t*);
13 lr1_t* lr1_new (nextcb, gpointer);
14 void lr1_delete (lr1_t*);
15 void lr1_add (lr1_t*, gint, symbol_t*, transition_t*);
16 void lr1_push (lr1_t*, gint, gpointer);
17 gpointer lr1_build (lr1_t*);
18
19 #endif