mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23: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:
12
src/print.c
12
src/print.c
@@ -124,16 +124,13 @@ print_errs (FILE *out, state_t *state)
|
||||
errs *errp = state->errs;
|
||||
int i;
|
||||
|
||||
if (!errp)
|
||||
return;
|
||||
|
||||
for (i = 0; i < errp->nerrs; ++i)
|
||||
if (errp->errs[i])
|
||||
fprintf (out, _(" %-4s\terror (nonassociative)\n"),
|
||||
tags[errp->errs[i]]);
|
||||
|
||||
if (i > 0)
|
||||
fputc ('\n', out);
|
||||
fputc ('\n', out);
|
||||
}
|
||||
|
||||
|
||||
@@ -192,10 +189,9 @@ print_reductions (FILE *out, state_t *state)
|
||||
SETBIT (shiftset, SHIFT_SYMBOL (shiftp, i));
|
||||
}
|
||||
|
||||
if (errp)
|
||||
for (i = 0; i < errp->nerrs; i++)
|
||||
if (errp->errs[i])
|
||||
SETBIT (shiftset, errp->errs[i]);
|
||||
for (i = 0; i < errp->nerrs; i++)
|
||||
if (errp->errs[i])
|
||||
SETBIT (shiftset, errp->errs[i]);
|
||||
|
||||
if (state->nlookaheads == 1 && !nodefault)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user