mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
cex: indent the diagnostics to highlight the structure
Instead of
Shift/reduce conflict on token D:
Example A a • D
First derivation s ::=[ A a a ::=[ b ::=[ c ::=[ • ] ] ] d ::=[ D ] ]
Example A a • D
Second derivation s ::=[ A a d ::=[ • D ] ]
display
Shift/reduce conflict on token D:
Example A a • D
First derivation s ::=[ A a a ::=[ b ::=[ c ::=[ • ] ] ] d ::=[ D ] ]
Example A a • D
Second derivation s ::=[ A a d ::=[ • D ] ]
* src/counterexample.c (print_counterexample): Indent.
* tests/counterexample.at: Adjust.
This commit is contained in:
@@ -102,14 +102,14 @@ free_counterexample (counterexample *cex)
|
||||
static void
|
||||
print_counterexample (counterexample *cex, FILE *out)
|
||||
{
|
||||
fprintf (out, "%-20s ", cex->unifying ? _("Example") : _("First example"));
|
||||
fprintf (out, " %-20s ", cex->unifying ? _("Example") : _("First example"));
|
||||
derivation_print_leaves (cex->d1, out);
|
||||
fprintf (out, "%-20s ", _("First derivation"));
|
||||
fprintf (out, " %-20s ", _("First derivation"));
|
||||
derivation_print (cex->d1, out);
|
||||
|
||||
fprintf (out, "%-20s ", cex->unifying ? _("Example") : _("Second example"));
|
||||
fprintf (out, " %-20s ", cex->unifying ? _("Example") : _("Second example"));
|
||||
derivation_print_leaves (cex->d2, out);
|
||||
fprintf (out, "%-20s ", _("Second derivation"));
|
||||
fprintf (out, " %-20s ", _("Second derivation"));
|
||||
derivation_print (cex->d2, out);
|
||||
|
||||
fputc ('\n', out);
|
||||
|
||||
Reference in New Issue
Block a user