* src/gram.c (ritem_print): Be sure to subtract 1 when displaying

rule line numbers.
* src/closure.c (print_closure): Likewise.
* src/derives.c (print_derives): Likewise.
* tests/sets.at (Nullable): Adjust: the rule numbers are correct
now.
This commit is contained in:
Akim Demaille
2001-12-29 14:16:46 +00:00
parent 7c6b64d023
commit 29d29c8fff
5 changed files with 31 additions and 22 deletions

View File

@@ -43,7 +43,7 @@ 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 - 1);
}