mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 15:23:02 +00:00
* src/state.h (state_t): Replace the `lookaheadsp' member, a
short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**). Adjust all dependencies. * src/lalr.c (initialize_lookaheads): Split into... (states_lookaheads_count, states_lookaheads_initialize): these. (lalr): Adjust.
This commit is contained in:
@@ -380,8 +380,8 @@ action_row (state_t *state)
|
||||
for (j = 0; j < ntokens; j++)
|
||||
/* and record this rule as the rule to use if that
|
||||
token follows. */
|
||||
if (bitset_test (LA[state->lookaheadsp + i], j))
|
||||
actrow[j] = -LArule[state->lookaheadsp + i]->number;
|
||||
if (bitset_test (state->lookaheads[i], j))
|
||||
actrow[j] = -state->lookaheads_rule[i]->number;
|
||||
}
|
||||
|
||||
/* Now see which tokens are allowed for shifts in this state. For
|
||||
@@ -428,7 +428,7 @@ action_row (state_t *state)
|
||||
for (i = 0; i < state->nlookaheads; i++)
|
||||
{
|
||||
int count = 0;
|
||||
int rule = -LArule[state->lookaheadsp + i]->number;
|
||||
int rule = -state->lookaheads_rule[i]->number;
|
||||
int j;
|
||||
|
||||
for (j = 0; j < ntokens; j++)
|
||||
|
||||
Reference in New Issue
Block a user