mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 00:33:03 +00:00
cex: use usual routines for diagnostics about S/R conflicts
See previous commit. We go from
input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr]
Shift/reduce conflict on token "⊕":
Example exp "+" exp • "⊕" exp
Shift derivation
exp
↳ exp "+" exp
↳ exp • "⊕" exp
to
input.y: warning: 3 reduce/reduce conflicts [-Wconflicts-rr]
input.y: warning: shift/reduce conflict on token "⊕" [-Wcounterexamples]
Example exp "+" exp • "⊕" exp
Shift derivation
exp
↳ exp "+" exp
↳ exp • "⊕" exp
with an hyperlink on -Wcounterexamples.
* src/counterexample.c (counterexample_report_shift_reduce):
Use complain.
* tests/counterexample.at, tests/diagnostics.at, tests/report.at:
Adjust.
This commit is contained in:
@@ -861,7 +861,7 @@ State 5
|
||||
OP [reduce using rule 1 (exp)]
|
||||
$default reduce using rule 1 (exp)
|
||||
|
||||
Shift/reduce conflict on token OP:
|
||||
shift/reduce conflict on token OP:
|
||||
1 exp: exp OP exp .
|
||||
1 exp: exp . OP exp
|
||||
Example exp OP exp . OP exp
|
||||
@@ -1764,7 +1764,7 @@ State 4
|
||||
|
||||
reported_conflicts go to state 6
|
||||
|
||||
Shift/reduce conflict on token 'a':
|
||||
shift/reduce conflict on token 'a':
|
||||
10 reported_conflicts: . %empty
|
||||
8 reported_conflicts: . 'a'
|
||||
First example resolved_conflict . 'a' 'a'
|
||||
@@ -1778,7 +1778,7 @@ State 4
|
||||
`-> resolved_conflict reported_conflicts 'a'
|
||||
`-> .
|
||||
|
||||
Shift/reduce conflict on token 'a':
|
||||
shift/reduce conflict on token 'a':
|
||||
10 reported_conflicts: . %empty
|
||||
9 reported_conflicts: . 'a'
|
||||
First example resolved_conflict . 'a' 'a'
|
||||
|
||||
Reference in New Issue
Block a user