X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/1a2b5d37e1d44b47cd51220945f4ba29c228a419..98254360e3cc22aa7a7aecaae477347ee0ecc638:/src/conflicts.c?ds=sidebyside diff --git a/src/conflicts.c b/src/conflicts.c index 3a979410..bd29bf97 100644 --- a/src/conflicts.c +++ b/src/conflicts.c @@ -204,7 +204,7 @@ solve_conflicts (void) lookaheadset = XCALLOC (unsigned, tokensetsize); for (i = 0; i < nstates; i++) - set_conflicts (state_table[i]); + set_conflicts (states[i]); } @@ -265,7 +265,7 @@ count_rr_conflicts (state_t *state) int count = 0; int j; for (j = 0; j < state->nlookaheads; ++j) - if (BITISSET (LA (state->lookaheadsp), state->lookaheadsp + j)) + if (BITISSET (LA (state->lookaheadsp + j), i)) count++; if (count >= 2) @@ -327,8 +327,8 @@ conflicts_output (FILE *out) if (conflicts[i]) { fprintf (out, _("State %d contains "), i); - fputs (conflict_report (count_sr_conflicts (state_table[i]), - count_rr_conflicts (state_table[i])), out); + fputs (conflict_report (count_sr_conflicts (states[i]), + count_rr_conflicts (states[i])), out); printed_sth = TRUE; } if (printed_sth) @@ -357,8 +357,8 @@ conflicts_print (void) for (i = 0; i < nstates; i++) if (conflicts[i]) { - src_total += count_sr_conflicts (state_table[i]); - rrc_total += count_rr_conflicts (state_table[i]); + src_total += count_sr_conflicts (states[i]); + rrc_total += count_rr_conflicts (states[i]); } src_ok = src_total == (expected_conflicts == -1 ? 0 : expected_conflicts);