mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
* lib/libiberty.h: New.
* lib: Update the bitset implementation from upstream. * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c, * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE. * src/main.c: Adjust bitset stats calls.
This commit is contained in:
@@ -90,26 +90,24 @@ print_core (struct obstack *oout, state_t *state)
|
||||
&& state->nlookaheads)
|
||||
{
|
||||
int j, k;
|
||||
bitset_iterator biter;
|
||||
int nlookaheads = 0;
|
||||
|
||||
/* Look for lookaheads corresponding to this rule. */
|
||||
for (j = 0; j < state->nlookaheads; ++j)
|
||||
BITSET_EXECUTE (state->lookaheads[j], 0, k,
|
||||
{
|
||||
BITSET_FOR_EACH (biter, state->lookaheads[j], k, 0)
|
||||
if (state->lookaheads_rule[j]->number == rule)
|
||||
nlookaheads++;
|
||||
});
|
||||
|
||||
if (nlookaheads)
|
||||
{
|
||||
obstack_sgrow (oout, " [");
|
||||
for (j = 0; j < state->nlookaheads; ++j)
|
||||
BITSET_EXECUTE (state->lookaheads[j], 0, k,
|
||||
{
|
||||
BITSET_FOR_EACH (biter, state->lookaheads[j], k, 0)
|
||||
if (state->lookaheads_rule[j]->number == rule)
|
||||
obstack_fgrow2 (oout, "%s%s",
|
||||
symbols[k]->tag,
|
||||
--nlookaheads ? ", " : "");
|
||||
});
|
||||
obstack_sgrow (oout, "]");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user