Files
bison/tests
Akim Demaille fff17fe8fe cex: display derivations as trees
Sometimes, understanding the derivations is difficult, because they
are serialized to fit in one line.  For instance, the example taken
from the NEWS file:

    %token ID
    %%
    s: a ID
    a: expr
    expr: expr ID ',' | "expr"

gave

    First example        expr • ID ',' ID $end
    Shift derivation     $accept → [ s → [ a → [ expr → [ expr • ID ',' ] ] ID ] $end ]
    Second example       expr • ID $end
    Reduce derivation    $accept → [ s → [ a → [ expr • ] ID ] $end ]

Printing as trees, it gives:

    First example        expr • ID ',' ID $end
    Shift derivation
      $accept
      ↳ s                      $end
        ↳ a                 ID
          ↳ expr
            ↳ expr • ID ','
    Second example       expr • ID $end
    Reduce derivation
      $accept
      ↳ s             $end
        ↳ a        ID
          ↳ expr •

* src/glyphs.h, src/glyphs.c (down_arrow, empty, derivation_separator):
New.
* src/derivation.c (derivation_print, derivation_print_impl): Rename
as...
(derivation_print_flat, derivation_print_flat_impl): These.
(fputs_if, derivation_depth, derivation_width, derivation_print_tree)
(derivation_print_tree_impl, derivation_print): New.
* src/counterexample.c (print_counterexample): Adjust.
* tests/conflicts.at, tests/counterexample.at, tests/diagnostics.at,
* tests/report.at: Adjust.
2020-07-18 07:54:02 +02:00
..
2019-02-21 06:46:07 +01:00
2020-01-10 19:16:23 +01:00
2020-06-29 06:45:44 +02:00
2020-07-18 07:54:02 +02:00
2020-01-10 19:16:23 +01: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-05-21 20:14:59 +02:00
2020-07-03 06:51:57 +02:00
2020-01-10 19:16:23 +01:00
2020-07-18 07:54:02 +02:00
2020-04-13 16:49:54 +02:00
2020-06-27 11:39:32 +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