mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 21:33:04 +00:00
* src/state.h, src/state.c (errs_new, errs_dup): New.
* src/LR0.c (set_state_table): Let all the states have an errs, even if reduced to 0. * src/print.c (print_errs, print_reductions): Adjust. * src/output.c (output_actions, action_row): Adjust. * src/conflicts.c (resolve_sr_conflict): Adjust.
This commit is contained in:
15
src/output.c
15
src/output.c
@@ -375,12 +375,11 @@ action_row (state_t *state)
|
||||
|
||||
/* See which tokens are an explicit error in this state (due to
|
||||
%nonassoc). For them, record MINSHORT as the action. */
|
||||
if (errp)
|
||||
for (i = 0; i < errp->nerrs; i++)
|
||||
{
|
||||
int symbol = errp->errs[i];
|
||||
actrow[symbol] = MINSHORT;
|
||||
}
|
||||
for (i = 0; i < errp->nerrs; i++)
|
||||
{
|
||||
int symbol = errp->errs[i];
|
||||
actrow[symbol] = MINSHORT;
|
||||
}
|
||||
|
||||
/* Now find the most common reduction and make it the default action
|
||||
for this state. */
|
||||
@@ -903,9 +902,9 @@ output_actions (void)
|
||||
|
||||
for (i = 0; i < nstates; ++i)
|
||||
{
|
||||
XFREE (state_table[i]->shifts);
|
||||
free (state_table[i]->shifts);
|
||||
XFREE (state_table[i]->reductions);
|
||||
XFREE (state_table[i]->errs);
|
||||
free (state_table[i]->errs);
|
||||
free (state_table[i]);
|
||||
}
|
||||
XFREE (state_table);
|
||||
|
||||
Reference in New Issue
Block a user