`number' is a new member.
Adjust dependencies.
* src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
+2002-04-07 Akim Demaille <akim@epita.fr>
+
+ * src/gram.h (rule_t): Rename `number' as `user_number'.
+ `number' is a new member.
+ Adjust dependencies.
+ * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
+
2002-04-07 Akim Demaille <akim@epita.fr>
As a result of the previous patch, it is no longer needed
/* Data definitions for internal representation of bison's input,
- Copyright 1984, 1986, 1989, 1992, 2001, 2002
+ Copyright (C) 1984, 1986, 1989, 1992, 2001, 2002
Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
{
/* The number of the rule in the source. It is usually the index in
RULES too, except if there are useless rules. */
+ short user_number;
+
+ /* The index in RULES. Usually the rule number in the source,
+ except if some rules are useless. */
short number;
bucket *lhs;
while (p)
{
bucket *ruleprec = p->ruleprec;
+ rules[ruleno].user_number = ruleno;
rules[ruleno].number = ruleno;
rules[ruleno].lhs = p->sym;
rules[ruleno].rhs = ritem + itemno;
for (/* Nothing. */; *rhsp >= 0; ++rhsp)
/* Nothing. */;
*rhsp = -i;
+ rules[i].number = i;
}
nrules -= nuseless_productions;
}
for (i = nrules + 1; i < nuseless_productions + nrules + 1; i++)
{
rule r;
- fprintf (out, "#%-4d ", rules[i].number - 1);
+ fprintf (out, "#%-4d ", rules[i].user_number - 1);
fprintf (out, "%s:", rules[i].lhs->tag);
for (r = rules[i].rhs; *r >= 0; r++)
fprintf (out, " %s", symbols[*r]->tag);