Files
bison/tests
Akim Demaille b0bb4cde2e cex: suggest -Wcounterexamples when there are unexpected conflicts
Suggesting -Wcounterexamples when there are conflicts is probably not
what the user wants.  If she knows her conflicts and has set
%expect/%expect-rr appropriately, we shouldn't warn.

The commit also swaps the counterexamples and the report of conflicts,
into, IMHO, a more natural order: from

    Shift/reduce conflict on token B:
    1:    3 a: A .
    1:    8 y: A . B
    Example              A • B C
    First derivation     s ::=[ a ::=[ A • ] x ::=[ B C ] ]
    Example              A • B C
    Second derivation    s ::=[ y ::=[ A • B ] c ::=[ C ] ]

    input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
    input.y:4.4: warning: rule useless in parser due to conflicts [-Wother]

to

    input.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
    Shift/reduce conflict on token B:
    1:    3 a: A .
    1:    8 y: A . B
    Example              A • B C
    First derivation     s ::=[ a ::=[ A • ] x ::=[ B C ] ]
    Example              A • B C
    Second derivation    s ::=[ y ::=[ A • B ] c ::=[ C ] ]

    input.y:4.4: warning: rule useless in parser due to conflicts [-Wother]

* src/conflicts.c (rule_conflicts_print): Rename as...
(report_rule_expectation_mismatches): this.
Move the handling of report_counterexamples to...
(conflicts_print): Here.
Display this warning when applicable.
2020-06-10 09:51:39 +02:00
..
2019-02-21 06:46:07 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-05-02 09:27:16 +02:00
2020-05-02 09:27:16 +02:00
2020-01-10 19:16:23 +01:00
2020-05-22 07:52:27 +02:00
2020-05-21 20:14:59 +02:00
2020-01-10 19:16:23 +01:00
2020-05-17 08:28:12 +02:00
2020-04-13 16:49:54 +02:00
2020-01-10 19:16:23 +01:00
2020-05-22 07:52:27 +02:00
2019-11-03 10:32:22 +01:00
2020-03-04 08:24:36 +01:00