Files
bison/tests
Akim Demaille e51fd547ca %expect: tune the number of conflicts per rule
Currently on a grammar such as

    exp: "number" | exp "+" exp | exp "*" exp

we count only one sr-conflict for both binary rules, i.e., we expect:

    exp: "number" | exp "+" exp  %expect 1 | exp "*" exp  %expect 1

although there are 4 conflicts in total.  That's because in the states
in conflict, for instance that for the "+" rule:

    State 6

        2 exp: exp . "+" exp
        2    | exp "+" exp .  [$end, "+", "*"]
        3    | exp . "*" exp

        "+"  shift, and go to state 4
        "*"  shift, and go to state 5

        "+"       [reduce using rule 2 (exp)]
        "*"       [reduce using rule 2 (exp)]
        $default  reduce using rule 2 (exp)

we count only a single conflict, although there are two (one on "+"
and another with "*").

See https://lists.gnu.org/archive/html/bison-patches/2013-02/msg00106.html.

* src/conflicts.c (rule_has_state_sr_conflicts): Rename as...
(count_rule_state_sr_conflicts): this.
DWIM.
(count_rule_sr_conflicts): Adjust.
* tests/conflicts.at (%expect in grammar rules): New.
2018-11-21 22:10:35 +01:00
..
2008-11-16 19:46:16 +01:00
2018-11-16 17:37:47 +01:00
2018-11-13 07:46:08 +01:00
2018-11-12 07:41:46 +01:00
2018-05-12 18:18:41 +02:00
2018-05-12 18:18:41 +02:00
2018-11-12 07:28:20 +01:00
2018-08-11 18:09:29 +02:00
2018-05-12 18:18:41 +02:00
2018-11-12 07:28:20 +01:00