mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 22:03:02 +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:
13
src/output.c
13
src/output.c
@@ -200,7 +200,11 @@ output_gram (void)
|
||||
static void
|
||||
output_stos (void)
|
||||
{
|
||||
output_table_data (&output_obstack, accessing_symbol,
|
||||
int i;
|
||||
short *values = (short *) alloca (sizeof (short) * nstates);
|
||||
for (i = 0; i < nstates; ++i)
|
||||
values[i] = state_table[i].accessing_symbol;
|
||||
output_table_data (&output_obstack, values,
|
||||
0, 1, nstates);
|
||||
muscle_insert ("stos", obstack_finish (&output_obstack));
|
||||
}
|
||||
@@ -389,7 +393,7 @@ action_row (int state)
|
||||
if (!shift_state)
|
||||
continue;
|
||||
|
||||
symbol = accessing_symbol[shift_state];
|
||||
symbol = state_table[shift_state].accessing_symbol;
|
||||
|
||||
if (ISVAR (symbol))
|
||||
break;
|
||||
@@ -931,7 +935,6 @@ output_actions (void)
|
||||
XFREE (lookaheads);
|
||||
XFREE (LA);
|
||||
XFREE (LAruleno);
|
||||
XFREE (accessing_symbol);
|
||||
|
||||
goto_actions ();
|
||||
XFREE (goto_map + ntokens);
|
||||
@@ -945,6 +948,7 @@ output_actions (void)
|
||||
output_table ();
|
||||
|
||||
output_check ();
|
||||
XFREE (state_table);
|
||||
}
|
||||
|
||||
|
||||
@@ -1030,9 +1034,6 @@ static void
|
||||
free_itemsets (void)
|
||||
{
|
||||
core *cp, *cptmp;
|
||||
|
||||
XFREE (state_table);
|
||||
|
||||
for (cp = first_state; cp; cp = cptmp)
|
||||
{
|
||||
cptmp = cp->next;
|
||||
|
||||
Reference in New Issue
Block a user