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.
This commit is contained in:
Akim Demaille
2020-07-20 07:03:39 +02:00
parent 815a76f558
commit b81229e1f9
7 changed files with 76 additions and 77 deletions

View File

@@ -116,9 +116,9 @@ static void
print_counterexample (const counterexample *cex, FILE *out, const char *prefix) print_counterexample (const counterexample *cex, FILE *out, const char *prefix)
{ {
const bool flat = getenv ("YYFLAT"); const bool flat = getenv ("YYFLAT");
fprintf (out, " %s%-20s ", fprintf (out, flat ? " %s%-20s " : " %s%s: ",
prefix, cex->unifying ? _("Example") : _("First example")); prefix, cex->unifying ? _("Example") : _("First example"));
derivation_print_leaves (cex->d1, out, prefix); derivation_print_leaves (cex->d1, out);
fprintf (out, flat ? " %s%-20s " : " %s%s", fprintf (out, flat ? " %s%-20s " : " %s%s",
prefix, cex->shift_reduce ? _("Shift derivation") : _("First derivation")); prefix, cex->shift_reduce ? _("Shift derivation") : _("First derivation"));
derivation_print (cex->d1, out, prefix); derivation_print (cex->d1, out, prefix);
@@ -128,9 +128,9 @@ print_counterexample (const counterexample *cex, FILE *out, const char *prefix)
// to see the differences. // to see the differences.
if (!cex->unifying || is_styled (stderr)) if (!cex->unifying || is_styled (stderr))
{ {
fprintf (out, " %s%-20s ", fprintf (out, flat ? " %s%-20s " : " %s%s: ",
prefix, cex->unifying ? _("Example") : _("Second example")); prefix, cex->unifying ? _("Example") : _("Second example"));
derivation_print_leaves (cex->d2, out, prefix); derivation_print_leaves (cex->d2, out);
} }
fprintf (out, flat ? " %s%-20s " : " %s%s", fprintf (out, flat ? " %s%-20s " : " %s%s",
prefix, cex->shift_reduce ? _("Reduce derivation") : _("Second derivation")); prefix, cex->shift_reduce ? _("Reduce derivation") : _("Second derivation"));

View File

@@ -428,10 +428,9 @@ derivation_print_flat (const derivation *deriv, FILE *out, const char *prefix)
} }
void void
derivation_print_leaves (const derivation *deriv, FILE *out, const char *prefix) derivation_print_leaves (const derivation *deriv, FILE *out)
{ {
int counter = 0; int counter = 0;
fputs (prefix, out);
derivation_print_flat_impl ((derivation *)deriv, out, true, &counter, ""); derivation_print_flat_impl ((derivation *)deriv, out, true, &counter, "");
fputc ('\n', out); fputc ('\n', out);
} }

View File

@@ -64,7 +64,7 @@ static inline derivation *derivation_new_leaf (symbol_number sym)
// Number of symbols. // Number of symbols.
size_t derivation_size (const derivation *deriv); size_t derivation_size (const derivation *deriv);
void derivation_print (const derivation *deriv, FILE *out, const char *prefix); void derivation_print (const derivation *deriv, FILE *out, const char *prefix);
void derivation_print_leaves (const derivation *deriv, FILE *out, const char *prefix); void derivation_print_leaves (const derivation *deriv, FILE *out);
void derivation_free (derivation *deriv); void derivation_free (derivation *deriv);
void derivation_retain (derivation *deriv); void derivation_retain (derivation *deriv);

View File

@@ -864,7 +864,7 @@ State 5
shift/reduce conflict on token OP: shift/reduce conflict on token OP:
1 exp: exp OP exp . 1 exp: exp OP exp .
1 exp: exp . OP exp 1 exp: exp . OP exp
Example exp OP exp . OP exp Example: exp OP exp . OP exp
Shift derivation Shift derivation
exp exp
`-> exp OP exp `-> exp OP exp
@@ -1212,7 +1212,7 @@ State 1
reduce/reduce conflict on token $end: reduce/reduce conflict on token $end:
3 num: '0' . 3 num: '0' .
4 id: '0' . 4 id: '0' .
Example '0' . Example: '0' .
First derivation First derivation
exp exp
`-> num `-> num
@@ -1767,12 +1767,12 @@ State 4
shift/reduce conflict on token 'a': shift/reduce conflict on token 'a':
10 reported_conflicts: . %empty 10 reported_conflicts: . %empty
8 reported_conflicts: . 'a' 8 reported_conflicts: . 'a'
First example resolved_conflict . 'a' 'a' First example: resolved_conflict . 'a' 'a'
Shift derivation Shift derivation
start start
`-> resolved_conflict reported_conflicts 'a' `-> resolved_conflict reported_conflicts 'a'
`-> . 'a' `-> . 'a'
Second example resolved_conflict . 'a' Second example: resolved_conflict . 'a'
Reduce derivation Reduce derivation
start start
`-> resolved_conflict reported_conflicts 'a' `-> resolved_conflict reported_conflicts 'a'
@@ -1781,12 +1781,12 @@ State 4
shift/reduce conflict on token 'a': shift/reduce conflict on token 'a':
10 reported_conflicts: . %empty 10 reported_conflicts: . %empty
9 reported_conflicts: . 'a' 9 reported_conflicts: . 'a'
First example resolved_conflict . 'a' 'a' First example: resolved_conflict . 'a' 'a'
Shift derivation Shift derivation
start start
`-> resolved_conflict reported_conflicts 'a' `-> resolved_conflict reported_conflicts 'a'
`-> . 'a' `-> . 'a'
Second example resolved_conflict . 'a' Second example: resolved_conflict . 'a'
Reduce derivation Reduce derivation
start start
`-> resolved_conflict reported_conflicts 'a' `-> resolved_conflict reported_conflicts 'a'
@@ -1806,7 +1806,7 @@ State 5
reduce/reduce conflict on token 'a': reduce/reduce conflict on token 'a':
8 reported_conflicts: 'a' . 8 reported_conflicts: 'a' .
9 reported_conflicts: 'a' . 9 reported_conflicts: 'a' .
Example 'a' . Example: 'a' .
First derivation First derivation
reported_conflicts reported_conflicts
`-> 'a' . `-> 'a' .
@@ -1996,7 +1996,7 @@ AT_CHECK([[cat input.output | sed -n '/^State 0$/,/^State 1$/p']], 0,
reduce/reduce conflict on token 'c': reduce/reduce conflict on token 'c':
12 empty_c2: . %empty 12 empty_c2: . %empty
13 empty_c3: . %empty 13 empty_c3: . %empty
Example . 'c' Example: . 'c'
First derivation First derivation
start start
`-> empty_c2 'c' `-> empty_c2 'c'

View File

@@ -55,7 +55,7 @@ y: A | A B;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples] input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
Example A . B C Example: A . B C
Shift derivation Shift derivation
s s
`-> y c `-> y c
@@ -95,7 +95,7 @@ bc: B bc C | B C;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples] input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
Example A . B C Example: A . B C
Shift derivation Shift derivation
s s
`-> ac `-> ac
@@ -107,7 +107,7 @@ input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
`-> a bc `-> a bc
`-> A . `-> B C `-> A . `-> B C
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples] 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 Shift derivation
s s
`-> ac `-> ac
@@ -157,7 +157,7 @@ xby: B | X xby Y;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr] [[input.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples] input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
Example A . B Example: A . B
Shift derivation Shift derivation
s s
`-> A xby `-> A xby
@@ -168,14 +168,14 @@ input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
`-> A x `-> B y `-> A x `-> B y
`-> . `-> %empty `-> . `-> %empty
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples] 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 Shift derivation
$accept $accept
`-> s $end `-> s $end
`-> A xby `-> A xby
`-> X xby Y `-> X xby Y
`-> . B `-> . B
Second example A X . B y $end Second example: A X . B y $end
Reduce derivation Reduce derivation
$accept $accept
`-> s $end `-> s $end
@@ -220,14 +220,14 @@ bc: B C;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token C [-Wcounterexamples] input.y: warning: shift/reduce conflict on token C [-Wcounterexamples]
First example B . C $end First example: B . C $end
Shift derivation Shift derivation
$accept $accept
`-> g $end `-> g $end
`-> x `-> x
`-> bc `-> bc
`-> B . C `-> B . C
Second example B . C D $end Second example: B . C D $end
Reduce derivation Reduce derivation
$accept $accept
`-> g $end `-> g $end
@@ -265,14 +265,14 @@ y: A A B;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token A [-Wcounterexamples] input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
First example A . A B $end First example: A . A B $end
Shift derivation Shift derivation
$accept $accept
`-> s $end `-> s $end
`-> t `-> t
`-> y `-> y
`-> A . A B `-> A . A B
Second example A . A $end Second example: A . A $end
Reduce derivation Reduce derivation
$accept $accept
`-> s $end `-> s $end
@@ -314,7 +314,7 @@ y: Y;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr] [[input.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token A [-Wcounterexamples] input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
Example b . A X X Y Example: b . A X X Y
Shift derivation Shift derivation
a a
`-> s `-> s
@@ -326,13 +326,13 @@ input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
`-> b . `-> A x xy `-> b . `-> A x xy
`-> X `-> X Y `-> X `-> X Y
input.y: warning: shift/reduce conflict on token X [-Wcounterexamples] input.y: warning: shift/reduce conflict on token X [-Wcounterexamples]
First example A X . X First example: A X . X
Shift derivation Shift derivation
a a
`-> t `-> t
`-> A xx `-> A xx
`-> X . X `-> X . X
Second example X . X xy Second example: X . X xy
Reduce derivation Reduce derivation
a a
`-> x t `-> x t
@@ -372,7 +372,7 @@ b : A | b;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr] [[input.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples] input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
Example A b . Example: A b .
First derivation First derivation
a a
`-> A b . `-> A b .
@@ -409,13 +409,13 @@ b: D;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr] [[input.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr]
input.y: warning: reduce/reduce conflict on tokens A, C [-Wcounterexamples] input.y: warning: reduce/reduce conflict on tokens A, C [-Wcounterexamples]
First example D . A $end First example: D . A $end
First derivation First derivation
$accept $accept
`-> s $end `-> s $end
`-> a A `-> a A
`-> D . `-> D .
Second example B D . A $end Second example: B D . A $end
Second derivation Second derivation
$accept $accept
`-> s $end `-> s $end
@@ -452,13 +452,13 @@ AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token J [-Wcounterexamples] input.y: warning: shift/reduce conflict on token J [-Wcounterexamples]
time limit exceeded: XXX time limit exceeded: XXX
First example H i . J K $end First example: H i . J K $end
Shift derivation Shift derivation
$accept $accept
`-> a $end `-> a $end
`-> H i `-> H i
`-> i . J K `-> i . J K
Second example H i . J $end Second example: H i . J $end
Reduce derivation Reduce derivation
$accept $accept
`-> s $end `-> s $end
@@ -499,7 +499,7 @@ b: A B C | A B D;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples] input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
Example N A . B C Example: N A . B C
Shift derivation Shift derivation
s s
`-> n `-> n
@@ -511,7 +511,7 @@ input.y: warning: shift/reduce conflict on token B [-Wcounterexamples]
`-> N a B `-> N a B
`-> A . `-> A .
input.y: warning: shift/reduce conflict on token B [-Wcounterexamples] 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 Shift derivation
s s
`-> n `-> n
@@ -562,7 +562,7 @@ C : A c A;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 4 reduce/reduce conflicts [-Wconflicts-rr] [[input.y: warning: 4 reduce/reduce conflicts [-Wconflicts-rr]
input.y: warning: reduce/reduce conflict on tokens b, c [-Wcounterexamples] input.y: warning: reduce/reduce conflict on tokens b, c [-Wcounterexamples]
Example B . b c Example: B . b c
First derivation First derivation
S S
`-> B C `-> B C
@@ -576,7 +576,7 @@ input.y: warning: reduce/reduce conflict on tokens b, c [-Wcounterexamples]
`-> A b A `-> A b A
`-> . `-> %empty `-> . `-> %empty
input.y: warning: reduce/reduce conflict on tokens b, c [-Wcounterexamples] input.y: warning: reduce/reduce conflict on tokens b, c [-Wcounterexamples]
Example C . c b Example: C . c b
First derivation First derivation
S S
`-> C B `-> C B
@@ -622,13 +622,13 @@ AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: 6 reduce/reduce conflicts [-Wconflicts-rr] input.y: warning: 6 reduce/reduce conflicts [-Wconflicts-rr]
input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples] input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
First example . c A A $end First example: . c A A $end
First derivation First derivation
$accept $accept
`-> a $end `-> a $end
`-> b d `-> b d
`-> . `-> c A A `-> . `-> c A A
Second example . c A A $end Second example: . c A A $end
Second derivation Second derivation
$accept $accept
`-> a $end `-> a $end
@@ -636,7 +636,7 @@ input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
`-> . `-> c A A `-> . `-> c A A
input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples] input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
time limit exceeded: XXX time limit exceeded: XXX
First example b . c A A $end First example: b . c A A $end
First derivation First derivation
$accept $accept
`-> a $end `-> a $end
@@ -644,7 +644,7 @@ time limit exceeded: XXX
`-> a `-> a
`-> b d `-> b d
`-> . `-> c A A `-> . `-> c A A
Second example b . A $end Second example: b . A $end
Second derivation Second derivation
$accept $accept
`-> a $end `-> a $end
@@ -653,7 +653,7 @@ time limit exceeded: XXX
`-> . `-> .
input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples] input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
time limit exceeded: XXX time limit exceeded: XXX
First example c . c A A $end First example: c . c A A $end
First derivation First derivation
$accept $accept
`-> a $end `-> a $end
@@ -661,7 +661,7 @@ time limit exceeded: XXX
`-> a `-> a
`-> b d `-> b d
`-> . `-> c A A `-> . `-> c A A
Second example c . A $end Second example: c . A $end
Second derivation Second derivation
$accept $accept
`-> a $end `-> a $end
@@ -670,12 +670,12 @@ time limit exceeded: XXX
`-> . `-> .
input.y: warning: shift/reduce conflict on token A [-Wcounterexamples] input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
time limit exceeded: XXX time limit exceeded: XXX
First example b c . A First example: b c . A
Shift derivation Shift derivation
a a
`-> b d `-> b d
`-> c . A `-> c . A
Second example b c . c A A $end Second example: b c . c A A $end
Reduce derivation Reduce derivation
$accept $accept
`-> a $end `-> a $end
@@ -686,7 +686,7 @@ time limit exceeded: XXX
`-> b d `-> b d
`-> . `-> c A A `-> . `-> c A A
input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples] 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 First derivation
$accept $accept
`-> a $end `-> a $end
@@ -696,7 +696,7 @@ input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
`-> a `-> a
`-> b d `-> b d
`-> . `-> c A A `-> . `-> c A A
Second example b c . A $end Second example: b c . A $end
Second derivation Second derivation
$accept $accept
`-> a $end `-> a $end
@@ -706,12 +706,12 @@ input.y: warning: reduce/reduce conflict on token A [-Wcounterexamples]
`-> c A `-> c A
`-> . `-> .
input.y: warning: shift/reduce conflict on token A [-Wcounterexamples] input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
First example b c . A First example: b c . A
Shift derivation Shift derivation
a a
`-> b d `-> b d
`-> c . A `-> c . A
Second example b c . A $end Second example: b c . A $end
Reduce derivation Reduce derivation
$accept $accept
`-> a $end `-> a $end
@@ -721,7 +721,7 @@ input.y: warning: shift/reduce conflict on token A [-Wcounterexamples]
`-> c A `-> c A
`-> . `-> .
input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples] input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
Example b d . Example: b d .
First derivation First derivation
a a
`-> b d . `-> b d .
@@ -730,7 +730,7 @@ input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
`-> b d `-> b d
`-> d . `-> d .
input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples] input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
Example c d . Example: c d .
First derivation First derivation
a a
`-> c d . `-> c d .
@@ -810,7 +810,7 @@ i: %empty | i J;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token J [-Wcounterexamples] input.y: warning: shift/reduce conflict on token J [-Wcounterexamples]
Example H i J . J J Example: H i J . J J
Shift derivation Shift derivation
s s
`-> a J `-> a J
@@ -854,7 +854,7 @@ d: D;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token D [-Wcounterexamples] input.y: warning: shift/reduce conflict on token D [-Wcounterexamples]
Example A a . D Example: A a . D
Shift derivation Shift derivation
s s
`-> A a d `-> A a d
@@ -896,13 +896,13 @@ d: D;
AT_BISON_CHECK_CEX( AT_BISON_CHECK_CEX(
[[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr] [[input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
input.y: warning: shift/reduce conflict on token D [-Wcounterexamples] input.y: warning: shift/reduce conflict on token D [-Wcounterexamples]
First example A a . D $end First example: A a . D $end
Shift derivation Shift derivation
$accept $accept
`-> s $end `-> s $end
`-> A a d `-> A a d
`-> . D `-> . D
Second example A a . D E $end Second example: A a . D E $end
Reduce derivation Reduce derivation
$accept $accept
`-> s $end `-> s $end

View File

@@ -536,45 +536,45 @@ exp
| "num" | "num"
]], ]],
[1], [1],
[[input.y: <error>error:</error> shift/reduce conflicts: 4 found, 0 expected [[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>] 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 Shift derivation
<cex-0><cex-step>exp</cex-step></cex-0> <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-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> <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 Reduce derivation
<cex-0><cex-step>exp</cex-step></cex-0> <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-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> <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>] 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 Shift derivation
<cex-0><cex-step>exp</cex-step></cex-0> <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-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> <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 Reduce derivation
<cex-0><cex-step>exp</cex-step></cex-0> <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-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> <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>] 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 Shift derivation
<cex-0><cex-step>exp</cex-step></cex-0> <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-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> <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 Reduce derivation
<cex-0><cex-step>exp</cex-step></cex-0> <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-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> <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>] 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 Shift derivation
<cex-0><cex-step>exp</cex-step></cex-0> <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-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> <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 Reduce derivation
@@ -618,7 +618,7 @@ input.y:31.4: <warning>warning:</warning> empty rule without %empty [<warning>-W
31 | e2: 31 | e2:
| <warning>^</warning> | <warning>^</warning>
| <fixit-insert>%empty</fixit-insert> | <fixit-insert>%empty</fixit-insert>
input.y: <error>error:</error> reduce/reduce conflicts: 1 found, 0 expected 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>] 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 First derivation
@@ -628,7 +628,7 @@ input.y: <warning>warning:</warning> reduce/reduce conflict on token "X" [<warni
<cex-2><cex-step> ↳ <cex-3><cex-step>x3</cex-step></cex-3></cex-step></cex-2><cex-6><cex-step> ↳ <cex-7><cex-step>foo3</cex-step></cex-7></cex-step></cex-6><cex-13><cex-step> ↳ <cex-14><cex-step>x3</cex-step></cex-14></cex-step></cex-13> <cex-2><cex-step> ↳ <cex-3><cex-step>x3</cex-step></cex-3></cex-step></cex-2><cex-6><cex-step> ↳ <cex-7><cex-step>foo3</cex-step></cex-7></cex-step></cex-6><cex-13><cex-step> ↳ <cex-14><cex-step>x3</cex-step></cex-14></cex-step></cex-13>
<cex-3><cex-step> ↳ <cex-leaf>"X"</cex-leaf><cex-dot> •</cex-dot></cex-step></cex-3><cex-7><cex-step> ↳ <cex-8><cex-step>x1</cex-step></cex-8><cex-11><cex-step> foo4</cex-step></cex-11></cex-step></cex-7><cex-14><cex-step> ↳ <cex-leaf>"X"</cex-leaf></cex-step></cex-14> <cex-3><cex-step> ↳ <cex-leaf>"X"</cex-leaf><cex-dot> •</cex-dot></cex-step></cex-3><cex-7><cex-step> ↳ <cex-8><cex-step>x1</cex-step></cex-8><cex-11><cex-step> foo4</cex-step></cex-11></cex-step></cex-7><cex-14><cex-step> ↳ <cex-leaf>"X"</cex-leaf></cex-step></cex-14>
<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-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-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> <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 Second derivation

View File

@@ -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 shift/reduce conflicts [-Wconflicts-sr]
input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr] input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr]
input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples] input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
Example exp "+" exp • "⊕" exp Example: exp "+" exp • "⊕" exp
Shift derivation Shift derivation
exp exp
↳ exp "+" exp ↳ exp "+" exp
@@ -1548,7 +1548,7 @@ input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
↳ exp "⊕" exp ↳ exp "⊕" exp
↳ exp "+" exp • ↳ exp "+" exp •
input.y: warning: reduce/reduce conflict on tokens $end, "+", "⊕" [-Wcounterexamples] input.y: warning: reduce/reduce conflict on tokens $end, "+", "⊕" [-Wcounterexamples]
Example exp "+" exp • Example: exp "+" exp •
First derivation First derivation
exp exp
↳ exp "+" exp • ↳ exp "+" exp •
@@ -1556,7 +1556,7 @@ input.y: warning: reduce/reduce conflict on tokens $end, "+", "⊕" [-Wcounterex
exp exp
↳ exp "+" exp • ↳ exp "+" exp •
input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples] input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
Example exp "+" exp • "⊕" exp Example: exp "+" exp • "⊕" exp
Shift derivation Shift derivation
exp exp
↳ exp "+" exp ↳ exp "+" exp
@@ -1566,7 +1566,7 @@ input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
↳ exp "⊕" exp ↳ exp "⊕" exp
↳ exp "+" exp • ↳ exp "+" exp •
input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples] input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
Example exp "⊕" exp • "⊕" exp Example: exp "⊕" exp • "⊕" exp
Shift derivation Shift derivation
exp exp
↳ exp "⊕" exp ↳ exp "⊕" exp
@@ -1576,7 +1576,7 @@ input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
↳ exp "⊕" exp ↳ exp "⊕" exp
↳ exp "⊕" exp • ↳ exp "⊕" exp •
input.y: warning: shift/reduce conflict on token "+" [-Wcounterexamples] input.y: warning: shift/reduce conflict on token "+" [-Wcounterexamples]
Example exp "⊕" exp • "+" exp Example: exp "⊕" exp • "+" exp
Shift derivation Shift derivation
exp exp
↳ exp "⊕" exp ↳ exp "⊕" exp
@@ -1586,7 +1586,7 @@ input.y: warning: shift/reduce conflict on token "+" [-Wcounterexamples]
↳ exp "+" exp ↳ exp "+" exp
↳ exp "⊕" exp • ↳ exp "⊕" exp •
input.y: warning: shift/reduce conflict on token "+" [-Wcounterexamples] input.y: warning: shift/reduce conflict on token "+" [-Wcounterexamples]
Example exp "⊕" exp • "+" exp Example: exp "⊕" exp • "+" exp
Shift derivation Shift derivation
exp exp
↳ exp "⊕" exp ↳ exp "⊕" exp
@@ -1742,7 +1742,7 @@ State 7
shift/reduce conflict on token "⊕": shift/reduce conflict on token "⊕":
2 exp: exp "+" exp • 2 exp: exp "+" exp •
1 exp: exp • "⊕" exp 1 exp: exp • "⊕" exp
Example exp "+" exp • "⊕" exp Example: exp "+" exp • "⊕" exp
Shift derivation Shift derivation
exp exp
↳ exp "+" exp ↳ exp "+" exp
@@ -1755,7 +1755,7 @@ State 7
reduce/reduce conflict on tokens $end, "+", "⊕": reduce/reduce conflict on tokens $end, "+", "⊕":
2 exp: exp "+" exp • 2 exp: exp "+" exp •
3 exp: exp "+" exp • 3 exp: exp "+" exp •
Example exp "+" exp • Example: exp "+" exp •
First derivation First derivation
exp exp
↳ exp "+" exp • ↳ exp "+" exp •
@@ -1766,7 +1766,7 @@ State 7
shift/reduce conflict on token "⊕": shift/reduce conflict on token "⊕":
3 exp: exp "+" exp • 3 exp: exp "+" exp •
1 exp: exp • "⊕" exp 1 exp: exp • "⊕" exp
Example exp "+" exp • "⊕" exp Example: exp "+" exp • "⊕" exp
Shift derivation Shift derivation
exp exp
↳ exp "+" exp ↳ exp "+" exp
@@ -1795,7 +1795,7 @@ State 8
shift/reduce conflict on token "⊕": shift/reduce conflict on token "⊕":
1 exp: exp "⊕" exp • 1 exp: exp "⊕" exp •
1 exp: exp • "⊕" exp 1 exp: exp • "⊕" exp
Example exp "⊕" exp • "⊕" exp Example: exp "⊕" exp • "⊕" exp
Shift derivation Shift derivation
exp exp
↳ exp "⊕" exp ↳ exp "⊕" exp
@@ -1808,7 +1808,7 @@ State 8
shift/reduce conflict on token "+": shift/reduce conflict on token "+":
1 exp: exp "⊕" exp • 1 exp: exp "⊕" exp •
2 exp: exp • "+" exp 2 exp: exp • "+" exp
Example exp "⊕" exp • "+" exp Example: exp "⊕" exp • "+" exp
Shift derivation Shift derivation
exp exp
↳ exp "⊕" exp ↳ exp "⊕" exp
@@ -1821,7 +1821,7 @@ State 8
shift/reduce conflict on token "+": shift/reduce conflict on token "+":
1 exp: exp "⊕" exp • 1 exp: exp "⊕" exp •
3 exp: exp • "+" exp 3 exp: exp • "+" exp
Example exp "⊕" exp • "+" exp Example: exp "⊕" exp • "+" exp
Shift derivation Shift derivation
exp exp
↳ exp "⊕" exp ↳ exp "⊕" exp