Files
bison/src
Akim Demaille d4f854e5b2 cex: also include the counterexamples in the report
The report is the best place to show the details about
counterexamples, since we have the state right under the nose.

For instance:

State 7

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

    "⊕"  shift, and go to state 6

    $end      reduce using rule 2 (exp)
    $end      [reduce using rule 3 (exp)]
    "+"       reduce using rule 2 (exp)
    "+"       [reduce using rule 3 (exp)]
    "⊕"       [reduce using rule 2 (exp)]
    "⊕"       [reduce using rule 3 (exp)]
    $default  reduce using rule 2 (exp)

    Conflict between rule 2 and token "+" resolved as reduce (%left "+").

    Shift/reduce conflict on token "⊕":
        2 exp: exp "+" exp .
        1 exp: exp . "⊕" exp
      Example                  exp "+" exp • "⊕" exp
      First derivation         exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ]
      Example                  exp "+" exp • "⊕" exp
      Second derivation        exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ]

    Reduce/reduce conflict on tokens $end, "+", "⊕":
        2 exp: exp "+" exp .
        3 exp: exp "+" exp .
      Example                  exp "+" exp •
      First derivation         exp ::=[ exp "+" exp • ]
      Example                  exp "+" exp •
      Second derivation        exp ::=[ exp "+" exp • ]

    Shift/reduce conflict on token "⊕":
        3 exp: exp "+" exp .
        1 exp: exp . "⊕" exp
      Example                  exp "+" exp • "⊕" exp
      First derivation         exp ::=[ exp ::=[ exp "+" exp • ] "⊕" exp ]
      Example                  exp "+" exp • "⊕" exp
      Second derivation        exp ::=[ exp "+" exp ::=[ exp • "⊕" exp ] ]

* src/conflicts.h, src/conflicts.c (has_conflicts): New.
* src/counterexample.h, src/counterexample.c (print_counterexample):
Add a `prefix` argument.
(counterexample_report_shift_reduce)
(counterexample_report_reduce_reduce): Show the items when there's a
prefix.
* src/state-item.h, src/state-item.c (print_state_item):
Add a `prefix` argument.
* src/derivation.h, src/derivation.c (derivation_print)
(derivation_print_leaves): Add a prefix argument.
* src/print.c (print_state): When -Wcex is enabled, show the
conflicts.
* tests/report.at: Adjust.
2020-06-16 07:30:26 +02:00
..
2020-06-01 18:52:22 +02:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-06-07 09:18:58 +02:00
2020-06-07 09:18:58 +02:00
2020-06-01 18:52:22 +02:00
2020-01-10 19:16:23 +01:00
2020-05-22 20:35:13 +02:00
2020-05-23 08:43:58 +02:00
2020-06-13 16:58:13 +02:00
2020-06-13 16:58:13 +02:00
2020-04-29 08:47:04 +02:00
2020-01-10 19:16:23 +01:00
2020-05-03 17:37:34 +02:00
2020-01-10 19:16:23 +01:00
2020-05-22 07:52:27 +02:00
2020-03-08 10:13:16 +01:00
2020-03-08 10:13:16 +01:00
2020-03-06 08:30:21 +01:00
2020-05-23 11:19:27 +02:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-06-13 16:58:03 +02:00
2020-06-13 16:58:03 +02:00
2020-06-13 16:58:13 +02:00
2020-01-10 19:16:23 +01:00
2020-06-01 18:52:22 +02:00
2020-01-10 19:16:23 +01:00
2020-03-06 08:30:21 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2008-11-15 10:47:15 +01:00
2020-01-10 19:16:23 +01:00
2008-11-15 10:47:15 +01:00
2020-01-10 19:16:23 +01:00
2008-11-15 10:47:15 +01:00
2020-01-10 19:16:23 +01:00
2020-06-16 07:29:46 +02:00
2020-06-16 07:29:46 +02:00
2020-01-10 19:16:23 +01:00
2020-01-10 19:16:23 +01:00
2020-06-13 16:58:13 +02:00
2020-01-10 19:16:23 +01:00
2020-05-22 08:45:43 +02:00
2020-01-10 19:16:23 +01:00
2019-01-12 10:45:21 +01:00