* 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:
Akim Demaille
2001-11-19 10:07:14 +00:00
parent d803322e27
commit 9703cc49e0
7 changed files with 82 additions and 64 deletions

View File

@@ -54,7 +54,7 @@ print_core (FILE *out, int state)
short *sp;
short *sp1;
statep = state_table[state];
statep = state_table[state].state;
k = statep->nitems;
if (k == 0)
@@ -124,7 +124,7 @@ print_actions (FILE *out, int state)
if (!shiftp->shifts[i])
continue;
state1 = shiftp->shifts[i];
symbol = accessing_symbol[state1];
symbol = state_table[state1].accessing_symbol;
/* The following line used to be turned off. */
if (ISVAR (symbol))
break;
@@ -184,7 +184,7 @@ print_actions (FILE *out, int state)
if (!shiftp->shifts[i])
continue;
state1 = shiftp->shifts[i];
symbol = accessing_symbol[state1];
symbol = state_table[state1].accessing_symbol;
fprintf (out, _(" %-4s\tgo to state %d\n"),
tags[symbol], state1);
}