cex: use usual routines for diagnostics about S/R conflicts
commitea138cd1f191ee1aff65c0a706a9646316538916
authorAkim Demaille <akim.demaille@gmail.com>
Sun, 19 Jul 2020 17:34:34 +0000 (19 19:34 +0200)
committerAkim Demaille <akim.demaille@gmail.com>
Mon, 20 Jul 2020 04:45:27 +0000 (20 06:45 +0200)
tree7b25989bcf9059626225befd8c71f82902431f23
parent9922f1f877f7ef20dd1ba87221ce6907093fc9d1
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.
src/counterexample.c
tests/conflicts.at
tests/counterexample.at
tests/diagnostics.at
tests/report.at