* src/gram.h (rule_t): New.

(rule_table): New.
(rrhs, rlhs): Remove, part of state_t.
* src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
* src/lalr.c, src/nullable.c, src/output.c, src/print.c,
* src/reader.c, src/reduce.c: Adjust.
This commit is contained in:
Akim Demaille
2001-11-19 10:19:20 +00:00
parent edad70670f
commit b2ed6e5826
13 changed files with 106 additions and 70 deletions

View File

@@ -1922,8 +1922,7 @@ packgram (void)
bucket *ruleprec;
ritem = XCALLOC (short, nitems + 1);
rlhs = XCALLOC (short, nrules) - 1;
rrhs = XCALLOC (short, nrules) - 1;
rule_table = XCALLOC (rule_t, nrules) - 1;
rprec = XCALLOC (short, nrules) - 1;
rprecsym = XCALLOC (short, nrules) - 1;
rassoc = XCALLOC (short, nrules) - 1;
@@ -1934,8 +1933,8 @@ packgram (void)
p = grammar;
while (p)
{
rlhs[ruleno] = p->sym->value;
rrhs[ruleno] = itemno;
rule_table[ruleno].lhs = p->sym->value;
rule_table[ruleno].rhs = itemno;
ruleprec = p->ruleprec;
p = p->next;