mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
* 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:
@@ -326,7 +326,6 @@ action_row (state_t *state)
|
||||
int i;
|
||||
int default_rule = 0;
|
||||
reductions *redp = state->reductions;
|
||||
int nreds = redp ? redp->nreds : 0;
|
||||
shifts *shiftp = state->shifts;
|
||||
errs *errp = state->errs;
|
||||
/* set nonzero to inhibit having any default reduction */
|
||||
@@ -335,7 +334,7 @@ action_row (state_t *state)
|
||||
for (i = 0; i < ntokens; i++)
|
||||
actrow[i] = 0;
|
||||
|
||||
if (nreds >= 1)
|
||||
if (redp->nreds >= 1)
|
||||
{
|
||||
int j;
|
||||
/* loop over all the rules available here which require
|
||||
@@ -384,7 +383,7 @@ action_row (state_t *state)
|
||||
/* Now find the most common reduction and make it the default action
|
||||
for this state. */
|
||||
|
||||
if (nreds >= 1 && !nodefault)
|
||||
if (redp->nreds >= 1 && !nodefault)
|
||||
{
|
||||
if (state->consistent)
|
||||
default_rule = redp->rules[0];
|
||||
|
||||
Reference in New Issue
Block a user