* 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:
Akim Demaille
2001-12-29 14:15:33 +00:00
parent 9e7f6bbd59
commit 3d4daee374
6 changed files with 32 additions and 17 deletions

View File

@@ -418,7 +418,7 @@ build_relations (void)
state_t *state = state_table[from_state[i]];
states[0] = state->number;
for (rp = ritem + rule_table[*rulep].rhs; *rp > 0; rp++)
for (rp = &ritem[rule_table[*rulep].rhs]; *rp >= 0; rp++)
{
shifts *sp = state->shifts;
int j;