mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 01:03:04 +00:00
cex: use usual routines for diagnostics about R/R conflicts
This is more consistent, and brings benefits: users know that these
diagnostics are attached to -Wcounterexamples, and they can also click
on the hyperlink if permitted by their terminal.
We go from
warning: 1 reduce/reduce conflict [-Wconflicts-rr]
Reduce/reduce conflict on token $end:
Example A b .
First derivation a -> [ A b . ]
Second derivation a -> [ A b -> [ b . ] ]
to
warning: 1 reduce/reduce conflict [-Wconflicts-rr]
input.y: warning: reduce/reduce conflict on token $end [-Wcounterexamples]
Example A b .
First derivation a -> [ A b . ]
Second derivation a -> [ A b -> [ b . ] ]
with an hyperlink on -Wcounterexamples.
* src/counterexample.c (counterexample_report_reduce_reduce):
Use complain.
* tests/counterexample.at, tests/diagnostics.at, tests/report.at:
Adjust.
This commit is contained in:
@@ -1548,7 +1548,7 @@ Shift/reduce conflict on token "⊕":
|
||||
↳ exp "⊕" exp
|
||||
↳ exp "+" exp •
|
||||
|
||||
Reduce/reduce conflict on tokens $end, "+", "⊕":
|
||||
input.y: warning: reduce/reduce conflict on tokens $end, "+", "⊕" [-Wcounterexamples]
|
||||
Example exp "+" exp •
|
||||
First derivation
|
||||
exp
|
||||
@@ -1758,7 +1758,7 @@ State 7
|
||||
↳ exp "⊕" exp
|
||||
↳ exp "+" exp •
|
||||
|
||||
Reduce/reduce conflict on tokens $end, "+", "⊕":
|
||||
reduce/reduce conflict on tokens $end, "+", "⊕":
|
||||
2 exp: exp "+" exp •
|
||||
3 exp: exp "+" exp •
|
||||
Example exp "+" exp •
|
||||
|
||||
Reference in New Issue
Block a user