X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/574fb2d5682af3cf6917e414b4240879d3e7f008..53d4308dbbc73ad186d076a7503e2a11fb0462dc:/src/output.c diff --git a/src/output.c b/src/output.c index 858bb98f..6b082f57 100644 --- a/src/output.c +++ b/src/output.c @@ -497,11 +497,11 @@ action_row (state_t *state) for (i = 0; i < state->nlookaheads; i++) { int count = 0; - rule_number_t rule = -state->lookaheads_rule[i]->number; + rule_number_t rule = state->lookaheads_rule[i]->number; symbol_number_t j; for (j = 0; j < ntokens; j++) - if (actrow[j] == rule) + if (actrow[j] == -rule) count++; if (count > max) @@ -521,10 +521,10 @@ action_row (state_t *state) { int j; for (j = 0; j < ntokens; j++) - if (actrow[j] == default_rule && ! (glr_parser && conflrow[j])) + if (actrow[j] == -default_rule + && ! (glr_parser && conflrow[j])) actrow[j] = 0; } - default_rule = -default_rule; } }