diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2020-06-19 07:06:24 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2020-06-22 19:33:30 +0200 |
commit | 0f120354b623b10dc7e130f931348a030839cd75 (patch) | |
tree | 3c8346986b0e9b5a5e76d26f98ab6fe9abc759f3 /tests/report.at | |
parent | 69e3b405d98a5a95eb2a3ab0ff98c22829f7600e (diff) | |
download | bison-0f120354b623b10dc7e130f931348a030839cd75.tar.gz |
cex: don't display twice unifying examples if there is no color
It makes no sense, and is actually confusing, to display twice the
same example with no visible difference.
* src/complain.h, src/complain.c (is_styled): New.
* src/counterexample.c (print_counterexample): Display the unified
example a second time only if it makes a difference.
* tests/conflicts.at, tests/counterexample.at, tests/report.at: Adjust.
* tests/diagnostics.at: Make sure we do display the unifying examples
twice when colors are enabled. And check those colors.
Diffstat (limited to 'tests/report.at')
-rw-r--r-- | tests/report.at | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/tests/report.at b/tests/report.at index bc2e5dbb..1d93f9a5 100644 --- a/tests/report.at +++ b/tests/report.at @@ -1173,25 +1173,21 @@ input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr] Shift/reduce conflict on token "⊕": Example exp "+" exp • "⊕" exp First derivation exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ] - Example exp "+" exp • "⊕" exp Second derivation exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ] Reduce/reduce conflict on tokens $end, "+", "⊕": Example exp "+" exp • First derivation exp ::=[ exp "+" exp • ] - Example exp "+" exp • Second derivation exp ::=[ exp "+" exp • ] Shift/reduce conflict on token "⊕": Example exp "+" exp • "⊕" exp First derivation exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ] - Example exp "+" exp • "⊕" exp Second derivation exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ] Shift/reduce conflict on token "⊕": Example exp "⊕" exp • "⊕" exp First derivation exp ::=[ exp ::=[ exp "⊕" exp • ] "⊕" exp ] - Example exp "⊕" exp • "⊕" exp Second derivation exp ::=[ exp "⊕" exp ::=[ exp • "⊕" exp ] ] input.y:6.3-13: warning: rule useless in parser due to conflicts [-Wother] @@ -1342,7 +1338,6 @@ State 7 1 exp: exp • "⊕" exp Example exp "+" exp • "⊕" exp First derivation exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ] - Example exp "+" exp • "⊕" exp Second derivation exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ] Reduce/reduce conflict on tokens $end, "+", "⊕": @@ -1350,7 +1345,6 @@ State 7 3 exp: exp "+" exp • Example exp "+" exp • First derivation exp ::=[ exp "+" exp • ] - Example exp "+" exp • Second derivation exp ::=[ exp "+" exp • ] Shift/reduce conflict on token "⊕": @@ -1358,7 +1352,6 @@ State 7 1 exp: exp • "⊕" exp Example exp "+" exp • "⊕" exp First derivation exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ] - Example exp "+" exp • "⊕" exp Second derivation exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ] @@ -1382,7 +1375,6 @@ State 8 1 exp: exp • "⊕" exp Example exp "⊕" exp • "⊕" exp First derivation exp ::=[ exp ::=[ exp "⊕" exp • ] "⊕" exp ] - Example exp "⊕" exp • "⊕" exp Second derivation exp ::=[ exp "⊕" exp ::=[ exp • "⊕" exp ] ] ]]) |