mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 07:13:02 +00:00
* src/closure.c (print_firsts, print_fderives, closure):
Use BITSET_EXECUTE. * src/lalr.c (lookaheads_print): Likewise. * src/state.c (state_rule_lookaheads_print): Likewise. * src/print_graph.c (print_core): Likewise. * src/print.c (print_reductions): Likewise. * src/output.c (action_row): Likewise. Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
This commit is contained in:
11
src/lalr.c
11
src/lalr.c
@@ -424,11 +424,12 @@ lookaheads_print (FILE *out)
|
||||
i, states[i]->nlookaheads);
|
||||
|
||||
for (j = 0; j < states[i]->nlookaheads; ++j)
|
||||
for (k = 0; k < ntokens; ++k)
|
||||
if (bitset_test (states[i]->lookaheads[j], k))
|
||||
fprintf (out, " on %d (%s) -> rule %d\n",
|
||||
k, symbol_tag_get (symbols[k]),
|
||||
states[i]->lookaheads_rule[j]->number - 1);
|
||||
BITSET_EXECUTE (states[i]->lookaheads[j], 0, k,
|
||||
{
|
||||
fprintf (out, " on %d (%s) -> rule %d\n",
|
||||
k, symbol_tag_get (symbols[k]),
|
||||
states[i]->lookaheads_rule[j]->number - 1);
|
||||
});
|
||||
}
|
||||
fprintf (out, "Lookaheads: END\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user