* src/lalr.h (reduction_table, shift_table): Removed arrays, which

contents is now members of...
(state_t): this structure.
* src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
Adjust.
This commit is contained in:
Akim Demaille
2001-11-19 09:10:12 +00:00
parent 93337ac41c
commit cfc3acf242
7 changed files with 46 additions and 54 deletions

View File

@@ -530,7 +530,7 @@ action_row (int state)
default_rule = 0;
nreds = 0;
redp = reduction_table[state];
redp = state_table[state].reduction_table;
if (redp)
{
@@ -569,7 +569,7 @@ action_row (int state)
}
}
shiftp = shift_table[state];
shiftp = state_table[state].shift_table;
/* Now see which tokens are allowed for shifts in this state. For
them, record the shift as the thing to do. So shift is preferred
@@ -747,8 +747,6 @@ free_shifts (void)
{
shifts *sp, *sptmp; /* JF derefrenced freed ptr */
XFREE (shift_table);
for (sp = first_shift; sp; sp = sptmp)
{
sptmp = sp->next;
@@ -762,8 +760,6 @@ free_reductions (void)
{
reductions *rp, *rptmp; /* JF fixed freed ptr */
XFREE (reduction_table);
for (rp = first_reduction; rp; rp = rptmp)
{
rptmp = rp->next;