mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 13:23:04 +00:00
* src/gram.h (rule_s): prec and precsym are now pointers
to the bucket giving the priority/associativity. Member `associativity' removed: useless. * src/reduce.c, src/conflicts.c: Adjust.
This commit is contained in:
11
src/reader.c
11
src/reader.c
@@ -1705,10 +1705,7 @@ packgram (void)
|
||||
/* A rule gets by default the precedence and associativity
|
||||
of the last token in it. */
|
||||
if (p->sym->class == token_sym)
|
||||
{
|
||||
rules[ruleno].prec = p->sym->prec;
|
||||
rules[ruleno].assoc = p->sym->assoc;
|
||||
}
|
||||
rules[ruleno].prec = p->sym;
|
||||
if (p)
|
||||
p = p->next;
|
||||
}
|
||||
@@ -1717,11 +1714,9 @@ packgram (void)
|
||||
the specified symbol's precedence replaces the default. */
|
||||
if (ruleprec)
|
||||
{
|
||||
rules[ruleno].prec = ruleprec->prec;
|
||||
rules[ruleno].assoc = ruleprec->assoc;
|
||||
rules[ruleno].precsym = ruleprec->number;
|
||||
rules[ruleno].precsym = ruleprec;
|
||||
rules[ruleno].prec = ruleprec;
|
||||
}
|
||||
|
||||
ritem[itemno++] = -ruleno;
|
||||
ruleno++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user