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

Diff of /bison/src/nullable.c

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

revision 1.10.2.7 by akim, Wed Dec 5 09:16:37 2001 UTC revision 1.10.2.8 by akim, Wed Dec 5 09:16:51 2001 UTC
# Line 107  set_nullable (void) Line 107  set_nullable (void)
107      }      }
108    
109    while (s1 < s2)    while (s1 < s2)
110      {      for (p = rsets[*s1++]; p; p = p->next)
111        p = rsets[*s1++];        {
112        while (p)          int ruleno = p->value;
113          {          if (--rcount[ruleno] == 0)
114            int ruleno = p->value;            if (rule_table[ruleno].useful && !nullable[rule_table[ruleno].lhs])
           p = p->next;  
           if (--rcount[ruleno] == 0)  
115              {              {
116                int symbol = rule_table[ruleno].lhs;                nullable[rule_table[ruleno].lhs] = 1;
117                if (symbol >= 0 && !nullable[symbol])                *s2++ = rule_table[ruleno].lhs;
                 {  
                   nullable[symbol] = 1;  
                   *s2++ = symbol;  
                 }  
118              }              }
119          }        }
     }  
120    
121    XFREE (squeue);    XFREE (squeue);
122    XFREE (rcount);    XFREE (rcount);

Legend:
Removed from v.1.10.2.7  
changed lines
  Added in v.1.10.2.8

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