mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
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:
committed by
Akim Demaille
parent
47a31596c6
commit
2be37f19fe
@@ -51,6 +51,7 @@ start_graph (FILE *fout)
|
||||
"digraph %s\n"
|
||||
"{\n",
|
||||
quote (grammar_file));
|
||||
fprintf (fout, "node [shape=box]\n");
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user