One structure for states is enough, even though theoretically

there are LR(0) states and LALR(1) states.
* src/lalr.h (state_t): Remove.
(state_table): Be state_t **, not state_t *.
* src/state.h (core, CORE_ALLOC): Rename as...
(state_t, STATE_ALLOC): this.
Add the LALR(1) members: shifts, reductions, errs.
* src/LR0.c (state_table): Rename as...
(state_hash): this, to avoid name clashes with the global
`state_table'.
* src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
* src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
This commit is contained in:
Akim Demaille
2001-12-10 08:45:22 +00:00
parent 74ffbcb6bf
commit f693ad146e
10 changed files with 149 additions and 141 deletions

View File

@@ -27,7 +27,7 @@ void generate_states PARAMS ((void));
extern int nstates;
extern int final_state;
extern core *first_state;
extern state_t *first_state;
extern shifts *first_shift;
extern reductions *first_reduction;