- {
- int i;
- fprintf (out, "%s\n\n", _("Useless rules:"));
- for (i = nrules + 1; i < nuseless_productions + nrules + 1; i++)
- {
- item_number_t *r;
- fprintf (out, "#%-4d ", rules[i].user_number - 1);
- fprintf (out, "%s:", quotearg_style (escape_quoting_style,
- rules[i].lhs->tag));
- for (r = rules[i].rhs; *r >= 0; r++)
- fprintf (out, " %s", quotearg_style (escape_quoting_style,
- symbols[*r]->tag));
- fputs (";\n", out);
- }
- fputs ("\n\n", out);
- }
+ grammar_rules_partial_print (out, _("Useless rules"),
+ nrules,
+ nrules + nuseless_productions);