Lines Matching refs:out
68 rule_lhs_print (rule *r, symbol *previous_lhs, FILE *out)
70 fprintf (out, " %3d ", r->number);
73 fprintf (out, "%s:", r->lhs->tag);
79 fputc (' ', out);
80 fputc ('|', out);
85 rule_lhs_print_xml (rule *r, FILE *out, int level)
87 xml_printf (out, level, "<lhs>%s</lhs>", r->lhs->tag);
101 rule_rhs_print (rule *r, FILE *out)
107 fprintf (out, " %s", symbols[*rp]->tag);
108 fputc ('\n', out);
112 fprintf (out, " /* %s */\n", _("empty"));
117 rule_rhs_print_xml (rule *r, FILE *out, int level)
122 xml_puts (out, level, "<rhs>");
124 xml_printf (out, level + 1, "<symbol>%s</symbol>",
126 xml_puts (out, level, "</rhs>");
130 xml_puts (out, level, "<rhs>");
131 xml_puts (out, level + 1, "<empty/>");
132 xml_puts (out, level, "</rhs>");
137 rule_print (rule *r, FILE *out)
139 fprintf (out, "%s:", r->lhs->tag);
140 rule_rhs_print (r, out);
144 ritem_print (FILE *out)
147 fputs ("RITEM\n", out);
150 fprintf (out, " %s", symbols[ritem[i]]->tag);
152 fprintf (out, " (rule %d)\n", item_number_as_rule_number (ritem[i]));
153 fputs ("\n\n", out);
173 grammar_rules_partial_print (FILE *out, const char *title,
186 fprintf (out, "%s\n\n", title);
188 fputc ('\n', out);
190 rule_lhs_print (&rules[r], previous_lhs, out);
191 rule_rhs_print (&rules[r], out);
195 fputs ("\n\n", out);
199 grammar_rules_print (FILE *out)
201 grammar_rules_partial_print (out, _("Grammar"), rule_useful_in_grammar_p);
205 grammar_rules_print_xml (FILE *out, int level)
213 xml_puts (out, level + 1, "<rules>");
223 xml_indent (out, level + 2);
224 fprintf (out, "<rule number=\"%d\" usefulness=\"%s\"",
227 fprintf (out, " percent_prec=\"%s\"",
229 fputs (">\n", out);
231 rule_lhs_print_xml (&rules[r], out, level + 3);
232 rule_rhs_print_xml (&rules[r], out, level + 3);
233 xml_puts (out, level + 2, "</rule>");
236 xml_puts (out, level + 1, "</rules>");
238 xml_puts (out, level + 1, "<rules/>");
242 grammar_dump (FILE *out, const char *title)
244 fprintf (out, "%s\n\n", title);
245 fprintf (out,
250 fprintf (out, "Variables\n---------\n\n");
253 fprintf (out, "Value Sprec Sassoc Tag\n");
256 fprintf (out, "%5d %5d %5d %s\n",
260 fprintf (out, "\n\n");
263 fprintf (out, "Rules\n-----\n\n");
266 fprintf (out, "Num (Prec, Assoc, Useful, Ritem Range) Lhs -> Rhs (Ritem range) [Num]\n");
276 fprintf (out, "%3d (%2d, %2d, %2d, %2u-%2u) %2d ->",
286 fprintf (out, " %3d", *rp);
287 fprintf (out, " [%d]\n", item_number_as_rule_number (*rp));
290 fprintf (out, "\n\n");
292 fprintf (out, "Rules interpreted\n-----------------\n\n");
297 fprintf (out, "%-5d ", r);
298 rule_print (&rules[r], out);
301 fprintf (out, "\n\n");