X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/97650f4efc420eb5eb0af124f28987875e10428a..8b752b00fdaaa3802e4ab05a468f6cda4a9fa500:/src/output.c diff --git a/src/output.c b/src/output.c index c2a64db4..4a7a7265 100644 --- a/src/output.c +++ b/src/output.c @@ -430,7 +430,7 @@ action_row (state_t *state) int i; rule_number_t default_rule = 0; reductions_t *redp = state->reductions; - transitions_t *transitions = state->shifts; + transitions_t *transitions = state->transitions; errs_t *errp = state->errs; /* set nonzero to inhibit having any default reduction */ int nodefault = 0; @@ -442,19 +442,20 @@ action_row (state_t *state) if (redp->num >= 1) { int j; + bitset_iterator biter; /* loop over all the rules available here which require lookahead */ for (i = state->nlookaheads - 1; i >= 0; --i) /* and find each token which the rule finds acceptable to come next */ - BITSET_EXECUTE (state->lookaheads[i], 0, j, + BITSET_FOR_EACH (biter, state->lookaheads[i], j, 0) { /* and record this rule as the rule to use if that token follows. */ if (actrow[j] != 0) conflicted = conflrow[j] = 1; actrow[j] = -state->lookaheads_rule[i]->number; - }); + } } /* Now see which tokens are allowed for shifts in this state. For