1705 |
/* A rule gets by default the precedence and associativity |
/* A rule gets by default the precedence and associativity |
1706 |
of the last token in it. */ |
of the last token in it. */ |
1707 |
if (p->sym->class == token_sym) |
if (p->sym->class == token_sym) |
1708 |
{ |
rules[ruleno].prec = p->sym; |
|
rules[ruleno].prec = p->sym->prec; |
|
|
rules[ruleno].assoc = p->sym->assoc; |
|
|
} |
|
1709 |
if (p) |
if (p) |
1710 |
p = p->next; |
p = p->next; |
1711 |
} |
} |
1714 |
the specified symbol's precedence replaces the default. */ |
the specified symbol's precedence replaces the default. */ |
1715 |
if (ruleprec) |
if (ruleprec) |
1716 |
{ |
{ |
1717 |
rules[ruleno].prec = ruleprec->prec; |
rules[ruleno].precsym = ruleprec; |
1718 |
rules[ruleno].assoc = ruleprec->assoc; |
rules[ruleno].prec = ruleprec; |
|
rules[ruleno].precsym = ruleprec->number; |
|
1719 |
} |
} |
|
|
|
1720 |
ritem[itemno++] = -ruleno; |
ritem[itemno++] = -ruleno; |
1721 |
ruleno++; |
ruleno++; |
1722 |
|
|