mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* src/lalr.h (state_t): New.
(state_table): Be a state_t * instead of a core **. (accessing_symbol): Remove, part of state_t. * src/lalr.c: Adjust. (set_accessing_symbol): Merge into... (set_state_table): this. * src/print_graph.c, src/conflicts.c: Adjust.
This commit is contained in:
@@ -68,7 +68,7 @@ flush_shift (int state, int token)
|
||||
for (i = 0; i < k; i++)
|
||||
{
|
||||
if (shiftp->shifts[i]
|
||||
&& token == accessing_symbol[shiftp->shifts[i]])
|
||||
&& token == state_table[shiftp->shifts[i]].accessing_symbol)
|
||||
(shiftp->shifts[i]) = 0;
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@ set_conflicts (int state)
|
||||
k = shiftp->nshifts;
|
||||
for (i = 0; i < k; i++)
|
||||
{
|
||||
symbol = accessing_symbol[shiftp->shifts[i]];
|
||||
symbol = state_table[shiftp->shifts[i]].accessing_symbol;
|
||||
if (ISVAR (symbol))
|
||||
break;
|
||||
SETBIT (lookaheadset, symbol);
|
||||
@@ -303,7 +303,7 @@ count_sr_conflicts (int state)
|
||||
{
|
||||
if (!shiftp->shifts[i])
|
||||
continue;
|
||||
symbol = accessing_symbol[shiftp->shifts[i]];
|
||||
symbol = state_table[shiftp->shifts[i]].accessing_symbol;
|
||||
if (ISVAR (symbol))
|
||||
break;
|
||||
SETBIT (shiftset, symbol);
|
||||
@@ -541,7 +541,7 @@ print_reductions (FILE *out, int state)
|
||||
{
|
||||
if (!shiftp->shifts[i])
|
||||
continue;
|
||||
symbol = accessing_symbol[shiftp->shifts[i]];
|
||||
symbol = state_table[shiftp->shifts[i]].accessing_symbol;
|
||||
if (ISVAR (symbol))
|
||||
break;
|
||||
/* if this state has a shift for the error token,
|
||||
@@ -656,7 +656,7 @@ print_reductions (FILE *out, int state)
|
||||
{
|
||||
if (!shiftp->shifts[i])
|
||||
continue;
|
||||
symbol = accessing_symbol[shiftp->shifts[i]];
|
||||
symbol = state_table[shiftp->shifts[i]].accessing_symbol;
|
||||
if (ISVAR (symbol))
|
||||
break;
|
||||
SETBIT (shiftset, symbol);
|
||||
|
||||
Reference in New Issue
Block a user