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); |