graphs: style: prefix rules and change shapes

* src/graphviz.c (start_graph): Use box rather than ellipsis.
* src/print_graph.c (print_core): Prefix rules with their number.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
Theophile Ranquet
2012-10-10 17:14:02 +00:00
committed by Akim Demaille
parent 47a31596c6
commit 2be37f19fe
2 changed files with 2 additions and 1 deletions

View File

@@ -51,6 +51,7 @@ start_graph (FILE *fout)
"digraph %s\n"
"{\n",
quote (grammar_file));
fprintf (fout, "node [shape=box]\n");
}
void

View File

@@ -68,7 +68,7 @@ print_core (struct obstack *oout, state *s)
r = item_number_as_rule_number (*sp);
obstack_printf (oout, "\n%s -> ", rules[r].lhs->tag);
obstack_printf (oout, "\n%d: %s -> ", r, rules[r].lhs->tag);
for (sp = rules[r].rhs; sp < sp1; sp++)
obstack_printf (oout, "%s ", symbols[*sp]->tag);