X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/5a670b1ed96b92ef0440c06c89b01cf1688db370..cce7171088417e4fd9b38224a8ab12b0769e4fb2:/src/conflicts.c diff --git a/src/conflicts.c b/src/conflicts.c index 2dc1cc5c..746fcb50 100644 --- a/src/conflicts.c +++ b/src/conflicts.c @@ -94,7 +94,7 @@ resolve_sr_conflict (state_t *state, int lookahead) { int i; /* find the rule to reduce by to get precedence of reduction */ - int redprec = rule_table[LAruleno[lookahead]].prec; + int redprec = rules[LAruleno[lookahead]].prec; errs *errp = errs_new (ntokens + 1); errp->nerrs = 0; @@ -172,7 +172,7 @@ set_conflicts (state_t *state) check for shift-reduce conflict, and try to resolve using precedence */ for (i = 0; i < state->nlookaheads; ++i) - if (rule_table[LAruleno[state->lookaheadsp + i]].prec) + if (rules[LAruleno[state->lookaheadsp + i]].prec) for (j = 0; j < tokensetsize; ++j) if (LA (state->lookaheadsp + i)[j] & lookaheadset[j]) { @@ -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]); } @@ -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);