mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23:33:03 +00:00
* src/derives.c (print_derives): Be sure to use >= 0', not > 0',
when walking through ritem, even via rule->rhs. * src/reduce.c (dump_grammar, useful_production, reduce_output) (useful_production, useless_nonterminals): Likewise. (reduce_grammar_tables): Likewise, plus update nritems. * src/nullable.c (set_nullable): Likewise. * src/lalr.c (build_relations): Likewise. * tests/sets.at (Nullable): Adjust. Fortunately, now, the $axiom is no longer nullable.
This commit is contained in:
@@ -43,9 +43,9 @@ print_derives (void)
|
||||
{
|
||||
short *rhsp;
|
||||
fprintf (stderr, "\t\t%d:", *sp);
|
||||
for (rhsp = ritem + rule_table[*sp].rhs; *rhsp > 0; ++rhsp)
|
||||
for (rhsp = ritem + rule_table[*sp].rhs; *rhsp >= 0; ++rhsp)
|
||||
fprintf (stderr, " %s", tags[*rhsp]);
|
||||
fprintf (stderr, " (rule %d)\n", -*rhsp);
|
||||
fprintf (stderr, " (rule %d)\n", -*rhsp - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user