93 |
/* Look for lookaheads corresponding to this rule. */ |
/* Look for lookaheads corresponding to this rule. */ |
94 |
for (j = 0; j < state->nlookaheads; ++j) |
for (j = 0; j < state->nlookaheads; ++j) |
95 |
for (k = 0; k < ntokens; ++k) |
for (k = 0; k < ntokens; ++k) |
96 |
if (bitset_test (LA[state->lookaheadsp + j], k) |
if (bitset_test (state->lookaheads[j], k) |
97 |
&& LArule[state->lookaheadsp + j]->number == rule) |
&& state->lookaheads_rule[j]->number == rule) |
98 |
nlookaheads++; |
nlookaheads++; |
99 |
if (nlookaheads) |
if (nlookaheads) |
100 |
{ |
{ |
101 |
obstack_sgrow (oout, " ["); |
obstack_sgrow (oout, " ["); |
102 |
for (j = 0; j < state->nlookaheads; ++j) |
for (j = 0; j < state->nlookaheads; ++j) |
103 |
for (k = 0; k < ntokens; ++k) |
for (k = 0; k < ntokens; ++k) |
104 |
if (bitset_test (LA[state->lookaheadsp + j], k) |
if (bitset_test (state->lookaheads[j], k) |
105 |
&& LArule[state->lookaheadsp + j]->number == rule) |
&& state->lookaheads_rule[j]->number == rule) |
106 |
obstack_fgrow2 (oout, "%s%s", |
obstack_fgrow2 (oout, "%s%s", |
107 |
symbol_tag_get (symbols[k]), |
symbol_tag_get (symbols[k]), |
108 |
--nlookaheads ? ", " : ""); |
--nlookaheads ? ", " : ""); |