- fprintf (stderr, "\t%s derives\n", symbols[i]->tag);
- for (j = 0; j <= nrules; j++)
- if (bitset_test (FDERIVES (i), j))
- {
- short *rhsp;
- fprintf (stderr, "\t\t%d:", j - 1);
- for (rhsp = &ritem[rules[j].rhs]; *rhsp >= 0; ++rhsp)
- fprintf (stderr, " %s", symbols[*rhsp]->tag);
- fputc ('\n', stderr);
- }
+ bitset_iterator iter;
+ fprintf (stderr, " %s derives\n", symbols[i]->tag);
+ BITSET_FOR_EACH (iter, FDERIVES (i), r, 0)
+ {
+ fprintf (stderr, " %3d ", r);
+ rule_rhs_print (&rules[r], stderr);
+ fprintf (stderr, "\n");
+ }