mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 15:23:02 +00:00
cex: prefer → to ::=
It does not make a lot of sense to use ::= in our counterexamples, that's not something that belongs to the Bison "vocabulary". Using the colon makes sense, but it's too discreet. Let's use the arrow, which we already use in some reports (HTML and Dot). * src/gram.h (print_dot_fallback): Generalize into... (print_fallback): this. (print_arrow): New. * src/derivation.c: Use it. * NEWS, tests/conflicts.at, tests/counterexample.at, * tests/diagnostics.at, tests/report.at: Adjust. * doc/bison.texi: Ditto. Unfortunately the literal `→` is output as `↦`. So we need to use @arrow.
This commit is contained in:
@@ -1539,33 +1539,33 @@ AT_CHECK([LC_ALL="$locale" bison -fno-caret -o input.cc -rall -Wcex --graph=inpu
|
||||
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 ]
|
||||
Second derivation exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ]
|
||||
First derivation exp → [ exp → [ exp "+" exp • ] "⊕" exp ]
|
||||
Second derivation exp → [ exp "+" exp → [ exp • "⊕" exp ] ]
|
||||
|
||||
Reduce/reduce conflict on tokens $end, "+", "⊕":
|
||||
Example exp "+" exp •
|
||||
First derivation exp ::=[ exp "+" exp • ]
|
||||
Second derivation exp ::=[ exp "+" exp • ]
|
||||
First derivation exp → [ exp "+" exp • ]
|
||||
Second derivation exp → [ exp "+" exp • ]
|
||||
|
||||
Shift/reduce conflict on token "⊕":
|
||||
Example exp "+" exp • "⊕" exp
|
||||
First derivation exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ]
|
||||
Second derivation exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ]
|
||||
First derivation exp → [ exp → [ 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 ]
|
||||
Second derivation exp ::=[ exp "⊕" exp ::=[ exp • "⊕" exp ] ]
|
||||
First derivation exp → [ exp → [ 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 ]
|
||||
Second derivation exp ::=[ exp "⊕" exp ::=[ exp • "+" exp ] ]
|
||||
First derivation exp → [ exp → [ 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 ]
|
||||
Second derivation exp ::=[ exp "⊕" exp ::=[ exp • "+" exp ] ]
|
||||
First derivation exp → [ exp → [ exp "⊕" exp • ] "+" exp ]
|
||||
Second derivation exp → [ exp "⊕" exp → [ exp • "+" exp ] ]
|
||||
|
||||
input.y:6.3-13: warning: rule useless in parser due to conflicts [-Wother]
|
||||
]])
|
||||
@@ -1714,22 +1714,22 @@ State 7
|
||||
2 exp: exp "+" exp •
|
||||
1 exp: exp • "⊕" exp
|
||||
Example exp "+" exp • "⊕" exp
|
||||
First derivation exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ]
|
||||
Second derivation exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ]
|
||||
First derivation exp → [ exp → [ exp "+" exp • ] "⊕" exp ]
|
||||
Second derivation exp → [ exp "+" exp → [ exp • "⊕" exp ] ]
|
||||
|
||||
Reduce/reduce conflict on tokens $end, "+", "⊕":
|
||||
2 exp: exp "+" exp •
|
||||
3 exp: exp "+" exp •
|
||||
Example exp "+" exp •
|
||||
First derivation exp ::=[ exp "+" exp • ]
|
||||
Second derivation exp ::=[ exp "+" exp • ]
|
||||
First derivation exp → [ exp "+" exp • ]
|
||||
Second derivation exp → [ exp "+" exp • ]
|
||||
|
||||
Shift/reduce conflict on token "⊕":
|
||||
3 exp: exp "+" exp •
|
||||
1 exp: exp • "⊕" exp
|
||||
Example exp "+" exp • "⊕" exp
|
||||
First derivation exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ]
|
||||
Second derivation exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ]
|
||||
First derivation exp → [ exp → [ exp "+" exp • ] "⊕" exp ]
|
||||
Second derivation exp → [ exp "+" exp → [ exp • "⊕" exp ] ]
|
||||
|
||||
|
||||
|
||||
@@ -1751,22 +1751,22 @@ State 8
|
||||
1 exp: exp "⊕" exp •
|
||||
1 exp: exp • "⊕" exp
|
||||
Example exp "⊕" exp • "⊕" exp
|
||||
First derivation exp ::=[ exp ::=[ exp "⊕" exp • ] "⊕" exp ]
|
||||
Second derivation exp ::=[ exp "⊕" exp ::=[ exp • "⊕" exp ] ]
|
||||
First derivation exp → [ exp → [ exp "⊕" exp • ] "⊕" exp ]
|
||||
Second derivation exp → [ exp "⊕" exp → [ exp • "⊕" exp ] ]
|
||||
|
||||
Shift/reduce conflict on token "+":
|
||||
1 exp: exp "⊕" exp •
|
||||
2 exp: exp • "+" exp
|
||||
Example exp "⊕" exp • "+" exp
|
||||
First derivation exp ::=[ exp ::=[ exp "⊕" exp • ] "+" exp ]
|
||||
Second derivation exp ::=[ exp "⊕" exp ::=[ exp • "+" exp ] ]
|
||||
First derivation exp → [ exp → [ exp "⊕" exp • ] "+" exp ]
|
||||
Second derivation exp → [ exp "⊕" exp → [ exp • "+" exp ] ]
|
||||
|
||||
Shift/reduce conflict on token "+":
|
||||
1 exp: exp "⊕" exp •
|
||||
3 exp: exp • "+" exp
|
||||
Example exp "⊕" exp • "+" exp
|
||||
First derivation exp ::=[ exp ::=[ exp "⊕" exp • ] "+" exp ]
|
||||
Second derivation exp ::=[ exp "⊕" exp ::=[ exp • "+" exp ] ]
|
||||
First derivation exp → [ exp → [ exp "⊕" exp • ] "+" exp ]
|
||||
Second derivation exp → [ exp "⊕" exp → [ exp • "+" exp ] ]
|
||||
|
||||
]])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user