181 |
static void |
static void |
182 |
print_state (FILE *out, int state) |
print_state (FILE *out, int state) |
183 |
{ |
{ |
|
fputs ("\n\n", out); |
|
184 |
fprintf (out, _("state %d"), state); |
fprintf (out, _("state %d"), state); |
185 |
fputs ("\n\n", out); |
fputs ("\n\n", out); |
186 |
print_core (out, state); |
print_core (out, state); |
187 |
print_actions (out, state); |
print_actions (out, state); |
188 |
|
fputs ("\n\n", out); |
189 |
} |
} |
190 |
|
|
191 |
/*-----------------------------------------. |
/*-----------------------------------------. |
212 |
int column = 0; |
int column = 0; |
213 |
|
|
214 |
/* rule # : LHS -> RHS */ |
/* rule # : LHS -> RHS */ |
215 |
fprintf (out, "\n%s\n\n", _("Grammar")); |
fprintf (out, "%s\n\n", _("Grammar")); |
216 |
fprintf (out, " %s\n", _("Number, Line, Rule")); |
fprintf (out, " %s\n", _("Number, Line, Rule")); |
217 |
for (i = 1; i <= nrules; i++) |
for (i = 1; i <= nrules; i++) |
218 |
/* Don't print rules disabled in reduce_grammar_tables. */ |
/* Don't print rules disabled in reduce_grammar_tables. */ |
228 |
fprintf (out, " /* %s */", _("empty")); |
fprintf (out, " /* %s */", _("empty")); |
229 |
fputc ('\n', out); |
fputc ('\n', out); |
230 |
} |
} |
231 |
|
fputs ("\n\n", out); |
232 |
|
|
233 |
|
|
234 |
/* TERMINAL (type #) : rule #s terminal is on RHS */ |
/* TERMINAL (type #) : rule #s terminal is on RHS */ |
235 |
fprintf (out, "\n%s\n\n", _("Terminals, with rules where they appear")); |
fprintf (out, "%s\n\n", _("Terminals, with rules where they appear")); |
236 |
fprintf (out, "%s (-1)\n", tags[0]); |
fprintf (out, "%s (-1)\n", tags[0]); |
237 |
|
|
238 |
for (i = 0; i <= max_user_token_number; i++) |
for (i = 0; i <= max_user_token_number; i++) |
254 |
} |
} |
255 |
fprintf (out, "%s\n", buffer); |
fprintf (out, "%s\n", buffer); |
256 |
} |
} |
257 |
|
fputs ("\n\n", out); |
258 |
|
|
259 |
|
|
260 |
fprintf (out, "\n%s\n\n", |
fprintf (out, "%s\n\n", _("Nonterminals, with rules where they appear")); |
|
_("Nonterminals, with rules where they appear")); |
|
261 |
for (i = ntokens; i <= nsyms - 1; i++) |
for (i = ntokens; i <= nsyms - 1; i++) |
262 |
{ |
{ |
263 |
int left_count = 0, right_count = 0; |
int left_count = 0, right_count = 0; |
312 |
} |
} |
313 |
fprintf (out, "%s\n", buffer); |
fprintf (out, "%s\n", buffer); |
314 |
} |
} |
315 |
|
fputs ("\n\n", out); |
316 |
} |
} |
317 |
|
|
318 |
void |
void |
328 |
|
|
329 |
size_t size = obstack_object_size (&output_obstack); |
size_t size = obstack_object_size (&output_obstack); |
330 |
fwrite (obstack_finish (&output_obstack), 1, size, out); |
fwrite (obstack_finish (&output_obstack), 1, size, out); |
331 |
|
if (size) |
332 |
|
fputs ("\n\n", out); |
333 |
|
|
334 |
reduce_output (out); |
reduce_output (out); |
335 |
conflicts_output (out); |
conflicts_output (out); |