graphs: show reductions

* src/graphviz.c (output_red): New, show reductions on the graph.
(no_reduce_bitset_init): New, initialize a bitset.
(print_token): New, print a lookahead token.
(escape): New, print "foo" as \"foo\" because Dot doesn't like quotes within
a label.

* src/graphviz.h : Adjust.
* src/print_graph.c (print_actions): Call output_red here.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
Theophile Ranquet
2012-10-08 06:11:41 +00:00
committed by Akim Demaille
parent 9fc99ca350
commit 83bae26d3f
3 changed files with 94 additions and 1 deletions

View File

@@ -120,6 +120,9 @@ print_actions (state const *s, FILE *fgraph)
transitions const *trans = s->transitions;
/* Display reductions. */
output_red (s, s->reductions, fgraph);
if (!trans->num && !s->reductions)
return;