Files
bison/tests
Akim Demaille 325ec7d324 cex: always show ε/%empty in counterexamples
On a case such as
    %%
    exp
    : empty "a"
    | "a" empty

    empty
    : %empty

we used to display

    warning: shift/reduce conflict on token "a" [-Wcounterexamples]
    Example: • "a"
    Shift derivation
      exp
      ↳ 2: • "a" empty
                 ↳ 2: ε
    Example: • "a"
    Reduce derivation
      exp
      ↳ 1: empty  "a"
           ↳ 3: •

where the shift derivation shows an item "2: empty → ε", with an
explicit "ε", but the reduce derivation shows "3: empty → •", without
"ε".

For consistency, let's always show ε/%empty in rules with an empty
rhs:

    Reduce derivation
      exp
      ↳ 1: empty    "a"
           ↳ 3: ε •

* src/derivation.c (derivation_width, derivation_print_tree_impl):
Always show ε/%empty in counterexamples.
* tests/diagnostics.at: Check that case.
* tests/conflicts.at, tests/counterexample.at: Adjust.
2020-09-02 07:31:55 +02:00
..
2019-02-21 06:46:07 +01:00
2020-01-10 19:16:23 +01:00
2020-08-30 10:45:21 +02:00
2020-08-30 10:45:21 +02:00
2020-01-10 19:16:23 +01:00
2020-08-30 10:45:21 +02:00
2020-06-28 09:49:00 +02:00
2020-05-02 09:27:16 +02:00
2020-01-10 19:16:23 +01:00
2020-08-30 10:45:21 +02:00
2020-05-21 20:14:59 +02:00
2020-01-10 19:16:23 +01:00
2020-08-30 19:20:49 +02:00
2020-05-22 07:52:27 +02:00
2019-11-03 10:32:22 +01:00
2020-08-30 10:45:21 +02:00