- /* rule # : LHS -> RHS */
- fprintf (out, "%s\n\n", _("Grammar"));
- fprintf (out, " %s\n", _("Number, Line, Rule"));
- for (i = 1; i <= nrules; i++)
- /* Don't print rules disabled in reduce_grammar_tables. */
- if (rule_table[i].useful)
- {
- fprintf (out, _(" %3d %3d %s ->"),
- i - 1, rule_table[i].line, escape (symbols[rule_table[i].lhs]->tag));
- rule = &ritem[rule_table[i].rhs];
- if (*rule >= 0)
- while (*rule >= 0)
- fprintf (out, " %s", escape (symbols[*rule++]->tag));
- else
- fprintf (out, " /* %s */", _("empty"));
- fputc ('\n', out);
- }
- fputs ("\n\n", out);
-