mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
reports: display %empty in the generated pointed-rules
* src/print.c (print_core): Use %empty for empty rules. * src/print_graph.c (print_core): Ditto. * tests/conflicts.at, tests/output.at, tests/reduce.at: Adjust expectations.
This commit is contained in:
@@ -106,8 +106,11 @@ print_core (FILE *out, state *s)
|
||||
for (sp = rules[r].rhs; sp < sp1; sp++)
|
||||
fprintf (out, " %s", symbols[*sp]->tag);
|
||||
fputs (" .", out);
|
||||
for (/* Nothing */; *sp >= 0; ++sp)
|
||||
fprintf (out, " %s", symbols[*sp]->tag);
|
||||
if (0 <= *rules[r].rhs)
|
||||
for (/* Nothing */; 0 <= *sp; ++sp)
|
||||
fprintf (out, " %s", symbols[*sp]->tag);
|
||||
else
|
||||
fprintf (out, " %%empty");
|
||||
|
||||
/* Display the lookahead tokens? */
|
||||
if (report_flag & report_lookahead_tokens
|
||||
|
||||
@@ -84,8 +84,11 @@ print_core (struct obstack *oout, state *s)
|
||||
|
||||
obstack_1grow (oout, '.');
|
||||
|
||||
for (/* Nothing */; *sp >= 0; ++sp)
|
||||
obstack_printf (oout, " %s", escape (symbols[*sp]->tag));
|
||||
if (0 <= *r->rhs)
|
||||
for (/* Nothing */; *sp >= 0; ++sp)
|
||||
obstack_printf (oout, " %s", escape (symbols[*sp]->tag));
|
||||
else
|
||||
obstack_printf (oout, " %%empty");
|
||||
|
||||
/* Experimental feature: display the lookahead tokens. */
|
||||
if (report_flag & report_lookahead_tokens
|
||||
|
||||
Reference in New Issue
Block a user