* src/state.h, src/state.c (reductions_new): New.

* src/LR0.c (set_state_table): Let all the states have a
`reductions', even if reduced to 0.
(save_reductions): Adjust.
* src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
* src/print.c (print_reductions, print_actions): Adjust.
* src/output.c (action_row): Adjust.
This commit is contained in:
Akim Demaille
2001-12-27 18:11:06 +00:00
parent 2cec70b9f1
commit 80dac38c5e
7 changed files with 49 additions and 26 deletions

View File

@@ -158,10 +158,7 @@ typedef struct reductions
short rules[1];
} reductions;
#define REDUCTIONS_ALLOC(Nreductions) \
(reductions *) xcalloc ((unsigned) (sizeof (reductions) \
+ (Nreductions - 1) * sizeof (short)), 1)
reductions *reductions_new PARAMS ((int n));
/*----------.