mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 06:43:03 +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:
@@ -865,8 +865,8 @@ State 5
|
||||
1 exp: exp OP exp .
|
||||
1 exp: exp . OP exp
|
||||
Example exp OP exp . OP exp
|
||||
First derivation exp ::=[ exp ::=[ exp OP exp . ] OP exp ]
|
||||
Second derivation exp ::=[ exp OP exp ::=[ exp . OP exp ] ]
|
||||
First derivation exp -> [ exp -> [ exp OP exp . ] OP exp ]
|
||||
Second derivation exp -> [ exp OP exp -> [ exp . OP exp ] ]
|
||||
|
||||
]])
|
||||
|
||||
@@ -1207,8 +1207,8 @@ State 1
|
||||
3 num: '0' .
|
||||
4 id: '0' .
|
||||
Example '0' .
|
||||
First derivation exp ::=[ num ::=[ '0' . ] ]
|
||||
Second derivation exp ::=[ id ::=[ '0' . ] ]
|
||||
First derivation exp -> [ num -> [ '0' . ] ]
|
||||
Second derivation exp -> [ id -> [ '0' . ] ]
|
||||
|
||||
|
||||
|
||||
@@ -1754,17 +1754,17 @@ State 4
|
||||
10 reported_conflicts: . %empty
|
||||
8 reported_conflicts: . 'a'
|
||||
First example resolved_conflict . 'a'
|
||||
First derivation start ::=[ resolved_conflict reported_conflicts ::=[ . ] 'a' ]
|
||||
First derivation start -> [ resolved_conflict reported_conflicts -> [ . ] 'a' ]
|
||||
Second example resolved_conflict . 'a' 'a'
|
||||
Second derivation start ::=[ resolved_conflict reported_conflicts ::=[ . 'a' ] 'a' ]
|
||||
Second derivation start -> [ resolved_conflict reported_conflicts -> [ . 'a' ] 'a' ]
|
||||
|
||||
Shift/reduce conflict on token 'a':
|
||||
10 reported_conflicts: . %empty
|
||||
9 reported_conflicts: . 'a'
|
||||
First example resolved_conflict . 'a'
|
||||
First derivation start ::=[ resolved_conflict reported_conflicts ::=[ . ] 'a' ]
|
||||
First derivation start -> [ resolved_conflict reported_conflicts -> [ . ] 'a' ]
|
||||
Second example resolved_conflict . 'a' 'a'
|
||||
Second derivation start ::=[ resolved_conflict reported_conflicts ::=[ . 'a' ] 'a' ]
|
||||
Second derivation start -> [ resolved_conflict reported_conflicts -> [ . 'a' ] 'a' ]
|
||||
|
||||
|
||||
|
||||
@@ -1781,8 +1781,8 @@ State 5
|
||||
8 reported_conflicts: 'a' .
|
||||
9 reported_conflicts: 'a' .
|
||||
Example 'a' .
|
||||
First derivation reported_conflicts ::=[ 'a' . ]
|
||||
Second derivation reported_conflicts ::=[ 'a' . ]
|
||||
First derivation reported_conflicts -> [ 'a' . ]
|
||||
Second derivation reported_conflicts -> [ 'a' . ]
|
||||
|
||||
|
||||
|
||||
@@ -1965,8 +1965,8 @@ AT_CHECK([[cat input.output | sed -n '/^State 0$/,/^State 1$/p']], 0,
|
||||
12 empty_c2: . %empty
|
||||
13 empty_c3: . %empty
|
||||
Example . 'c'
|
||||
First derivation start ::=[ empty_c2 ::=[ . ] 'c' ]
|
||||
Second derivation start ::=[ empty_c3 ::=[ . ] 'c' ]
|
||||
First derivation start -> [ empty_c2 -> [ . ] 'c' ]
|
||||
Second derivation start -> [ empty_c3 -> [ . ] 'c' ]
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user