summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-07-20 07:03:39 +0200
committerAkim Demaille <akim.demaille@gmail.com>2020-07-20 07:09:31 +0200
commitb81229e1f93999c77887422c0795407154876823 (patch)
tree3a8e04268085cc7801af05c5b8a935068051ecb3 /tests
parent815a76f5583311c6d00024584d153544e9391d5d (diff)
downloadbison-b81229e1f93999c77887422c0795407154876823.tar.gz
cex: improve readability of the subsections
Now that the derivation is no longer printed on one line, aligning the example and the derivation is no longer useful. It can actually be harmful, as it makes the overall structure less clear. * src/derivation.h, src/derivation.c (derivation_print_leaves): Remove the `prefix` argument. * src/counterexample.c (print_counterexample): Put the example next to its label. * tests/conflicts.at, tests/counterexample.at, tests/diagnostics.at, * tests/report.at: Adjust.
Diffstat (limited to 'tests')
-rw-r--r--tests/conflicts.at16
-rw-r--r--tests/counterexample.at80
-rw-r--r--tests/diagnostics.at20
-rw-r--r--tests/report.at24
4 files changed, 70 insertions, 70 deletions
diff --git a/tests/conflicts.at b/tests/conflicts.at
index 187085c3..1cfae5b1 100644
--- a/tests/conflicts.at
+++ b/tests/conflicts.at
@@ -864,7 +864,7 @@ State 5
shift/reduce conflict on token OP:
1 exp: exp OP exp .
1 exp: exp . OP exp
- Example exp OP exp . OP exp
+ Example: exp OP exp . OP exp
Shift derivation
exp
`-> exp OP exp
@@ -1212,7 +1212,7 @@ State 1
reduce/reduce conflict on token $end:
3 num: '0' .
4 id: '0' .
- Example '0' .
+ Example: '0' .
First derivation
exp
`-> num
@@ -1767,12 +1767,12 @@ State 4
shift/reduce conflict on token 'a':
10 reported_conflicts: . %empty
8 reported_conflicts: . 'a'
- First example resolved_conflict . 'a' 'a'
+ First example: resolved_conflict . 'a' 'a'
Shift derivation
start
`-> resolved_conflict reported_conflicts 'a'
`-> . 'a'
- Second example resolved_conflict . 'a'
+ Second example: resolved_conflict . 'a'
Reduce derivation
start
`-> resolved_conflict reported_conflicts 'a'
@@ -1781,12 +1781,12 @@ State 4
shift/reduce conflict on token 'a':
10 reported_conflicts: . %empty
9 reported_conflicts: . 'a'
- First example resolved_conflict . 'a' 'a'
+ First example: resolved_conflict . 'a' 'a'
Shift derivation
start
`-> resolved_conflict reported_conflicts 'a'
`-> . 'a'
- Second example resolved_conflict . 'a'
+ Second example: resolved_conflict . 'a'
Reduce derivation
start
`-> resolved_conflict reported_conflicts 'a'
@@ -1806,7 +1806,7 @@ State 5
reduce/reduce conflict on token 'a':
8 reported_conflicts: 'a' .
9 reported_conflicts: 'a' .
- Example 'a' .
+ Example: 'a' .
First derivation
reported_conflicts
`-> 'a' .
@@ -1996,7 +1996,7 @@ AT_CHECK([[cat input.output | sed -n '/^State 0$/,/^State 1$/p']], 0,
reduce/reduce conflict on token 'c':
12 empty_c2: . %empty
13 empty_c3: . %empty
- Example . 'c'
+ Example: . 'c'
First derivation
start
`-> empty_c2 'c'
diff --git a/tests/counterexample.at b/tests/counterexample.at
index f371ad14..97c72401 100644
--- a/tests/counterexample.at
+++ b/tests/counterexample.at
@@ -55,7 +55,7 @@ y: A | A B;
AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
- Example A . B C
+ Example: A . B C
Shift derivation
s
`-> y c
@@ -95,7 +95,7 @@ bc: B bc C | B C;
AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
- Example A . B C
+ Example: A . B C
Shift derivation
s
`-> ac
@@ -107,7 +107,7 @@ input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
`-> a bc
`-> A . `-> B C
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
- Example A A . B B C C
+ Example: A A . B B C C
Shift derivation
s
`-> ac
@@ -157,7 +157,7 @@ xby: B | X xby Y;
AT_BISON_CHECK_CEX(
[[input.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
- Example A . B
+ Example: A . B
Shift derivation
s
`-> A xby
@@ -168,14 +168,14 @@ input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
`-> A x `-> B y
`-> . `-> %empty
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
- First example A X . B Y $end
+ First example: A X . B Y $end
Shift derivation
$accept
`-> s $end
`-> A xby
`-> X xby Y
`-> . B
- Second example A X . B y $end
+ Second example: A X . B y $end
Reduce derivation
$accept
`-> s $end
@@ -220,14 +220,14 @@ bc: B C;
AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token C [-Wcounterexamples]
- First example B . C $end
+ First example: B . C $end
Shift derivation
$accept
`-> g $end
`-> x
`-> bc
`-> B . C
- Second example B . C D $end
+ Second example: B . C D $end
Reduce derivation
$accept
`-> g $end
@@ -265,14 +265,14 @@ y: A A B;
AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
- First example A . A B $end
+ First example: A . A B $end
Shift derivation
$accept
`-> s $end
`-> t
`-> y
`-> A . A B
- Second example A . A $end
+ Second example: A . A $end
Reduce derivation
$accept
`-> s $end
@@ -314,7 +314,7 @@ y: Y;
AT_BISON_CHECK_CEX(
[[input.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
- Example b . A X X Y
+ Example: b . A X X Y
Shift derivation
a
`-> s
@@ -326,13 +326,13 @@ input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
`-> b . `-> A x xy
`-> X `-> X Y
input.y: warning: shift/reduce conflict on token X [-Wcounterexamples]
- First example A X . X
+ First example: A X . X
Shift derivation
a
`-> t
`-> A xx
`-> X . X
- Second example X . X xy
+ Second example: X . X xy
Reduce derivation
a
`-> x t
@@ -372,7 +372,7 @@ b : A | b;
AT_BISON_CHECK_CEX(
[[input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
- Example A b .
+ Example: A b .
First derivation
a
`-> A b .
@@ -409,13 +409,13 @@ b: D;
AT_BISON_CHECK_CEX(
[[input.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr]
input.y: warning: reduce/reduce conflict on tokens A, C [-Wcounterexamples]
- First example D . A $end
+ First example: D . A $end
First derivation
$accept
`-> s $end
`-> a A
`-> D .
- Second example B D . A $end
+ Second example: B D . A $end
Second derivation
$accept
`-> s $end
@@ -452,13 +452,13 @@ AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token J [-Wcounterexamples]
time limit exceeded: XXX
- First example H i . J K $end
+ First example: H i . J K $end
Shift derivation
$accept
`-> a $end
`-> H i
`-> i . J K
- Second example H i . J $end
+ Second example: H i . J $end
Reduce derivation
$accept
`-> s $end
@@ -499,7 +499,7 @@ b: A B C | A B D;
AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
- Example N A . B C
+ Example: N A . B C
Shift derivation
s
`-> n
@@ -511,7 +511,7 @@ input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
`-> N a B
`-> A .
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
- Example N N A . B D C
+ Example: N N A . B D C
Shift derivation
s
`-> n
@@ -562,7 +562,7 @@ C : A c A;
AT_BISON_CHECK_CEX(
[[input.y: warning: 4 reduce/reduce conflicts [-Wconflicts-rr]
input.y: warning: reduce/reduce conflict on tokens b, c [-Wcounterexamples]
- Example B . b c
+ Example: B . b c
First derivation
S
`-> B C
@@ -576,7 +576,7 @@ input.y: warning: reduce/reduce conflict on tokens b, c [-Wcounterexamples]
`-> A b A
`-> . `-> %empty
input.y: warning: reduce/reduce conflict on tokens b, c [-Wcounterexamples]
- Example C . c b
+ Example: C . c b
First derivation
S
`-> C B
@@ -622,13 +622,13 @@ AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: 6 reduce/reduce conflicts [-Wconflicts-rr]
input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
- First example . c A A $end
+ First example: . c A A $end
First derivation
$accept
`-> a $end
`-> b d
`-> . `-> c A A
- Second example . c A A $end
+ Second example: . c A A $end
Second derivation
$accept
`-> a $end
@@ -636,7 +636,7 @@ input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
`-> . `-> c A A
input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
time limit exceeded: XXX
- First example b . c A A $end
+ First example: b . c A A $end
First derivation
$accept
`-> a $end
@@ -644,7 +644,7 @@ time limit exceeded: XXX
`-> a
`-> b d
`-> . `-> c A A
- Second example b . A $end
+ Second example: b . A $end
Second derivation
$accept
`-> a $end
@@ -653,7 +653,7 @@ time limit exceeded: XXX
`-> .
input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
time limit exceeded: XXX
- First example c . c A A $end
+ First example: c . c A A $end
First derivation
$accept
`-> a $end
@@ -661,7 +661,7 @@ time limit exceeded: XXX
`-> a
`-> b d
`-> . `-> c A A
- Second example c . A $end
+ Second example: c . A $end
Second derivation
$accept
`-> a $end
@@ -670,12 +670,12 @@ time limit exceeded: XXX
`-> .
input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
time limit exceeded: XXX
- First example b c . A
+ First example: b c . A
Shift derivation
a
`-> b d
`-> c . A
- Second example b c . c A A $end
+ Second example: b c . c A A $end
Reduce derivation
$accept
`-> a $end
@@ -686,7 +686,7 @@ time limit exceeded: XXX
`-> b d
`-> . `-> c A A
input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
- First example b c . c A A $end
+ First example: b c . c A A $end
First derivation
$accept
`-> a $end
@@ -696,7 +696,7 @@ input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
`-> a
`-> b d
`-> . `-> c A A
- Second example b c . A $end
+ Second example: b c . A $end
Second derivation
$accept
`-> a $end
@@ -706,12 +706,12 @@ input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
`-> c A
`-> .
input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
- First example b c . A
+ First example: b c . A
Shift derivation
a
`-> b d
`-> c . A
- Second example b c . A $end
+ Second example: b c . A $end
Reduce derivation
$accept
`-> a $end
@@ -721,7 +721,7 @@ input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
`-> c A
`-> .
input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
- Example b d .
+ Example: b d .
First derivation
a
`-> b d .
@@ -730,7 +730,7 @@ input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
`-> b d
`-> d .
input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
- Example c d .
+ Example: c d .
First derivation
a
`-> c d .
@@ -810,7 +810,7 @@ i: %empty | i J;
AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token J [-Wcounterexamples]
- Example H i J . J J
+ Example: H i J . J J
Shift derivation
s
`-> a J
@@ -854,7 +854,7 @@ d: D;
AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token D [-Wcounterexamples]
- Example A a . D
+ Example: A a . D
Shift derivation
s
`-> A a d
@@ -896,13 +896,13 @@ d: D;
AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token D [-Wcounterexamples]
- First example A a . D $end
+ First example: A a . D $end
Shift derivation
$accept
`-> s $end
`-> A a d
`-> . D
- Second example A a . D E $end
+ Second example: A a . D E $end
Reduce derivation
$accept
`-> s $end
diff --git a/tests/diagnostics.at b/tests/diagnostics.at
index ffec2928..d92e8bf4 100644
--- a/tests/diagnostics.at
+++ b/tests/diagnostics.at
@@ -536,45 +536,45 @@ exp
[1],
[[input.y: <error>error:</error> shift/reduce conflicts: 4 found, 0 expected
input.y: <warning>warning:</warning> shift/reduce conflict on token "+" [<warning>-Wcounterexamples</warning>]
- Example <cex-0><cex-leaf>exp</cex-leaf> <cex-leaf>"+"</cex-leaf><cex-1> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-1></cex-0>
+ Example: <cex-0><cex-leaf>exp</cex-leaf> <cex-leaf>"+"</cex-leaf><cex-1> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-1></cex-0>
Shift derivation
<cex-0><cex-step>exp</cex-step></cex-0>
<cex-0><cex-step>↳ <cex-leaf>exp</cex-leaf><cex-leaf> "+"</cex-leaf><cex-1><cex-step> exp</cex-step></cex-1></cex-step></cex-0>
<cex-1><cex-step> ↳ <cex-leaf>exp</cex-leaf><cex-dot> •</cex-dot><cex-leaf> "+"</cex-leaf><cex-leaf> exp</cex-leaf></cex-step></cex-1>
- Example <cex-0><cex-1><cex-leaf>exp</cex-leaf> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot></cex-1> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-0>
+ Example: <cex-0><cex-1><cex-leaf>exp</cex-leaf> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot></cex-1> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-0>
Reduce derivation
<cex-0><cex-step>exp</cex-step></cex-0>
<cex-0><cex-step>↳ <cex-1><cex-step>exp</cex-step></cex-1><cex-leaf> "+"</cex-leaf><cex-leaf> exp</cex-leaf></cex-step></cex-0>
<cex-1><cex-step> ↳ <cex-leaf>exp</cex-leaf><cex-leaf> "+"</cex-leaf><cex-leaf> exp</cex-leaf><cex-dot> •</cex-dot></cex-step></cex-1>
input.y: <warning>warning:</warning> shift/reduce conflict on token "else" [<warning>-Wcounterexamples</warning>]
- Example <cex-0><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf><cex-1> <cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot> <cex-leaf>"else"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-1></cex-0>
+ Example: <cex-0><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf><cex-1> <cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot> <cex-leaf>"else"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-1></cex-0>
Shift derivation
<cex-0><cex-step>exp</cex-step></cex-0>
<cex-0><cex-step>↳ <cex-leaf>"if"</cex-leaf><cex-leaf> exp</cex-leaf><cex-leaf> "then"</cex-leaf><cex-1><cex-step> exp</cex-step></cex-1></cex-step></cex-0>
<cex-1><cex-step> ↳ <cex-leaf>"if"</cex-leaf><cex-leaf> exp</cex-leaf><cex-leaf> "then"</cex-leaf><cex-leaf> exp</cex-leaf><cex-dot> •</cex-dot><cex-leaf> "else"</cex-leaf><cex-leaf> exp</cex-leaf></cex-step></cex-1>
- Example <cex-0><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf><cex-1> <cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot></cex-1> <cex-leaf>"else"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-0>
+ Example: <cex-0><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf><cex-1> <cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot></cex-1> <cex-leaf>"else"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-0>
Reduce derivation
<cex-0><cex-step>exp</cex-step></cex-0>
<cex-0><cex-step>↳ <cex-leaf>"if"</cex-leaf><cex-leaf> exp</cex-leaf><cex-leaf> "then"</cex-leaf><cex-1><cex-step> exp</cex-step></cex-1><cex-leaf> "else"</cex-leaf><cex-leaf> exp</cex-leaf></cex-step></cex-0>
<cex-1><cex-step> ↳ <cex-leaf>"if"</cex-leaf><cex-leaf> exp</cex-leaf><cex-leaf> "then"</cex-leaf><cex-leaf> exp</cex-leaf><cex-dot> •</cex-dot></cex-step></cex-1>
input.y: <warning>warning:</warning> shift/reduce conflict on token "+" [<warning>-Wcounterexamples</warning>]
- Example <cex-0><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf><cex-1> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-1></cex-0>
+ Example: <cex-0><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf><cex-1> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-1></cex-0>
Shift derivation
<cex-0><cex-step>exp</cex-step></cex-0>
<cex-0><cex-step>↳ <cex-leaf>"if"</cex-leaf><cex-leaf> exp</cex-leaf><cex-leaf> "then"</cex-leaf><cex-1><cex-step> exp</cex-step></cex-1></cex-step></cex-0>
<cex-1><cex-step> ↳ <cex-leaf>exp</cex-leaf><cex-dot> •</cex-dot><cex-leaf> "+"</cex-leaf><cex-leaf> exp</cex-leaf></cex-step></cex-1>
- Example <cex-0><cex-1><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot></cex-1> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-0>
+ Example: <cex-0><cex-1><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot></cex-1> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-0>
Reduce derivation
<cex-0><cex-step>exp</cex-step></cex-0>
<cex-0><cex-step>↳ <cex-1><cex-step>exp</cex-step></cex-1><cex-leaf> "+"</cex-leaf><cex-leaf> exp</cex-leaf></cex-step></cex-0>
<cex-1><cex-step> ↳ <cex-leaf>"if"</cex-leaf><cex-leaf> exp</cex-leaf><cex-leaf> "then"</cex-leaf><cex-leaf> exp</cex-leaf><cex-dot> •</cex-dot></cex-step></cex-1>
input.y: <warning>warning:</warning> shift/reduce conflict on token "+" [<warning>-Wcounterexamples</warning>]
- Example <cex-0><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"else"</cex-leaf><cex-1> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-1></cex-0>
+ Example: <cex-0><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"else"</cex-leaf><cex-1> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-1></cex-0>
Shift derivation
<cex-0><cex-step>exp</cex-step></cex-0>
<cex-0><cex-step>↳ <cex-leaf>"if"</cex-leaf><cex-leaf> exp</cex-leaf><cex-leaf> "then"</cex-leaf><cex-leaf> exp</cex-leaf><cex-leaf> "else"</cex-leaf><cex-1><cex-step> exp</cex-step></cex-1></cex-step></cex-0>
<cex-1><cex-step> ↳ <cex-leaf>exp</cex-leaf><cex-dot> •</cex-dot><cex-leaf> "+"</cex-leaf><cex-leaf> exp</cex-leaf></cex-step></cex-1>
- Example <cex-0><cex-1><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"else"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot></cex-1> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-0>
+ Example: <cex-0><cex-1><cex-leaf>"if"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"then"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-leaf>"else"</cex-leaf> <cex-leaf>exp</cex-leaf> <cex-dot>•</cex-dot></cex-1> <cex-leaf>"+"</cex-leaf> <cex-leaf>exp</cex-leaf></cex-0>
Reduce derivation
<cex-0><cex-step>exp</cex-step></cex-0>
<cex-0><cex-step>↳ <cex-1><cex-step>exp</cex-step></cex-1><cex-leaf> "+"</cex-leaf><cex-leaf> exp</cex-leaf></cex-step></cex-0>
@@ -618,7 +618,7 @@ input.y:31.4: <warning>warning:</warning> empty rule without %empty [<warning>-W
| <fixit-insert>%empty</fixit-insert>
input.y: <error>error:</error> reduce/reduce conflicts: 1 found, 0 expected
input.y: <warning>warning:</warning> reduce/reduce conflict on token "X" [<warning>-Wcounterexamples</warning>]
- Example <cex-0><cex-1><cex-2><cex-3><cex-leaf>"X"</cex-leaf> <cex-dot>•</cex-dot></cex-3></cex-2></cex-1><cex-4></cex-4><cex-5><cex-6><cex-7><cex-8><cex-9><cex-10> <cex-leaf>"X"</cex-leaf></cex-10></cex-9></cex-8><cex-11> <cex-leaf>"quuux"</cex-leaf></cex-11></cex-7></cex-6></cex-5><cex-12><cex-13><cex-14> <cex-leaf>"X"</cex-leaf></cex-14></cex-13></cex-12></cex-0>
+ Example: <cex-0><cex-1><cex-2><cex-3><cex-leaf>"X"</cex-leaf> <cex-dot>•</cex-dot></cex-3></cex-2></cex-1><cex-4></cex-4><cex-5><cex-6><cex-7><cex-8><cex-9><cex-10> <cex-leaf>"X"</cex-leaf></cex-10></cex-9></cex-8><cex-11> <cex-leaf>"quuux"</cex-leaf></cex-11></cex-7></cex-6></cex-5><cex-12><cex-13><cex-14> <cex-leaf>"X"</cex-leaf></cex-14></cex-13></cex-12></cex-0>
First derivation
<cex-0><cex-step>exp</cex-step></cex-0>
<cex-0><cex-step>↳ <cex-1><cex-step>x1</cex-step></cex-1><cex-4><cex-step> e1</cex-step></cex-4><cex-5><cex-step> foo1</cex-step></cex-5><cex-12><cex-step> x1</cex-step></cex-12></cex-step></cex-0>
@@ -628,7 +628,7 @@ input.y: <warning>warning:</warning> reduce/reduce conflict on token "X" [<warni
<cex-8><cex-step> ↳ <cex-9><cex-step>x2</cex-step></cex-9></cex-step></cex-8><cex-11><cex-step> ↳ <cex-leaf>"quuux"</cex-leaf></cex-step></cex-11>
<cex-9><cex-step> ↳ <cex-10><cex-step>x3</cex-step></cex-10></cex-step></cex-9>
<cex-10><cex-step> ↳ <cex-leaf>"X"</cex-leaf></cex-step></cex-10>
- Example <cex-0><cex-1><cex-2><cex-3><cex-leaf>"X"</cex-leaf> <cex-dot>•</cex-dot></cex-3></cex-2></cex-1><cex-4></cex-4><cex-5><cex-6><cex-7><cex-8><cex-9><cex-10> <cex-leaf>"X"</cex-leaf></cex-10></cex-9></cex-8><cex-11> <cex-leaf>"quuux"</cex-leaf></cex-11></cex-7></cex-6></cex-5><cex-12><cex-13><cex-14> <cex-leaf>"X"</cex-leaf></cex-14></cex-13></cex-12></cex-0>
+ Example: <cex-0><cex-1><cex-2><cex-3><cex-leaf>"X"</cex-leaf> <cex-dot>•</cex-dot></cex-3></cex-2></cex-1><cex-4></cex-4><cex-5><cex-6><cex-7><cex-8><cex-9><cex-10> <cex-leaf>"X"</cex-leaf></cex-10></cex-9></cex-8><cex-11> <cex-leaf>"quuux"</cex-leaf></cex-11></cex-7></cex-6></cex-5><cex-12><cex-13><cex-14> <cex-leaf>"X"</cex-leaf></cex-14></cex-13></cex-12></cex-0>
Second derivation
<cex-0><cex-step>exp</cex-step></cex-0>
<cex-0><cex-step>↳ <cex-1><cex-step>y1</cex-step></cex-1><cex-4><cex-step> e2</cex-step></cex-4><cex-5><cex-step> bar1</cex-step></cex-5><cex-12><cex-step> y1</cex-step></cex-12></cex-step></cex-0>
diff --git a/tests/report.at b/tests/report.at
index 645c3b57..8d0a210b 100644
--- a/tests/report.at
+++ b/tests/report.at
@@ -1538,7 +1538,7 @@ AT_CHECK([LC_ALL="$locale" bison -fno-caret -o input.cc -rall -Wcex --graph=inpu
[[input.y: warning: 3 shift/reduce conflicts [-Wconflicts-sr]
input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr]
input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
- Example exp "+" exp • "⊕" exp
+ Example: exp "+" exp • "⊕" exp
Shift derivation
exp
↳ exp "+" exp
@@ -1548,7 +1548,7 @@ input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
↳ exp "⊕" exp
↳ exp "+" exp •
input.y: warning: reduce/reduce conflict on tokens $end, "+", "⊕" [-Wcounterexamples]
- Example exp "+" exp •
+ Example: exp "+" exp •
First derivation
exp
↳ exp "+" exp •
@@ -1556,7 +1556,7 @@ input.y: warning: reduce/reduce conflict on tokens $end, "+", "⊕" [-Wcounterex
exp
↳ exp "+" exp •
input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
- Example exp "+" exp • "⊕" exp
+ Example: exp "+" exp • "⊕" exp
Shift derivation
exp
↳ exp "+" exp
@@ -1566,7 +1566,7 @@ input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
↳ exp "⊕" exp
↳ exp "+" exp •
input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
- Example exp "⊕" exp • "⊕" exp
+ Example: exp "⊕" exp • "⊕" exp
Shift derivation
exp
↳ exp "⊕" exp
@@ -1576,7 +1576,7 @@ input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
↳ exp "⊕" exp
↳ exp "⊕" exp •
input.y: warning: shift/reduce conflict on token "+" [-Wcounterexamples]
- Example exp "⊕" exp • "+" exp
+ Example: exp "⊕" exp • "+" exp
Shift derivation
exp
↳ exp "⊕" exp
@@ -1586,7 +1586,7 @@ input.y: warning: shift/reduce conflict on token "+" [-Wcounterexamples]
↳ exp "+" exp
↳ exp "⊕" exp •
input.y: warning: shift/reduce conflict on token "+" [-Wcounterexamples]
- Example exp "⊕" exp • "+" exp
+ Example: exp "⊕" exp • "+" exp
Shift derivation
exp
↳ exp "⊕" exp
@@ -1742,7 +1742,7 @@ State 7
shift/reduce conflict on token "⊕":
2 exp: exp "+" exp •
1 exp: exp • "⊕" exp
- Example exp "+" exp • "⊕" exp
+ Example: exp "+" exp • "⊕" exp
Shift derivation
exp
↳ exp "+" exp
@@ -1755,7 +1755,7 @@ State 7
reduce/reduce conflict on tokens $end, "+", "⊕":
2 exp: exp "+" exp •
3 exp: exp "+" exp •
- Example exp "+" exp •
+ Example: exp "+" exp •
First derivation
exp
↳ exp "+" exp •
@@ -1766,7 +1766,7 @@ State 7
shift/reduce conflict on token "⊕":
3 exp: exp "+" exp •
1 exp: exp • "⊕" exp
- Example exp "+" exp • "⊕" exp
+ Example: exp "+" exp • "⊕" exp
Shift derivation
exp
↳ exp "+" exp
@@ -1795,7 +1795,7 @@ State 8
shift/reduce conflict on token "⊕":
1 exp: exp "⊕" exp •
1 exp: exp • "⊕" exp
- Example exp "⊕" exp • "⊕" exp
+ Example: exp "⊕" exp • "⊕" exp
Shift derivation
exp
↳ exp "⊕" exp
@@ -1808,7 +1808,7 @@ State 8
shift/reduce conflict on token "+":
1 exp: exp "⊕" exp •
2 exp: exp • "+" exp
- Example exp "⊕" exp • "+" exp
+ Example: exp "⊕" exp • "+" exp
Shift derivation
exp
↳ exp "⊕" exp
@@ -1821,7 +1821,7 @@ State 8
shift/reduce conflict on token "+":
1 exp: exp "⊕" exp •
3 exp: exp • "+" exp
- Example exp "⊕" exp • "+" exp
+ Example: exp "⊕" exp • "+" exp
Shift derivation
exp
↳ exp "⊕" exp