/[bison]/bison/src/reader.c
ViewVC logotype

Diff of /bison/src/reader.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.156 by akim, Sun Apr 7 17:41:28 2002 UTC revision 1.157 by akim, Sun Apr 7 17:42:31 2002 UTC
# Line 1705  packgram (void) Line 1705  packgram (void)
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          }          }
# Line 1717  packgram (void) Line 1714  packgram (void)
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    

Legend:
Removed from v.1.156  
changed lines
  Added in v.1.157

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26