summaryrefslogtreecommitdiff
path: root/src/print_graph.c
diff options
context:
space:
mode:
authorTheophile Ranquet <ranquet@lrde.epita.fr>2012-10-23 15:43:54 +0000
committerAkim Demaille <akim@lrde.epita.fr>2012-11-12 16:46:55 +0100
commitbe3517b007a833ffec1735691f256f6a37e4a67f (patch)
treea72da10a9013d2e63a7dd577300210d8aad650ca /src/print_graph.c
parent489b320d4a70692313a059b10786913a1310f617 (diff)
downloadbison-be3517b007a833ffec1735691f256f6a37e4a67f.tar.gz
xml: match DOT output and xml2dot.xsl processing
Make the DOT produced by XSLT processing equivalent to the one made with the --graph option. * data/xslt/xml2dot.xsl: Stylistic changes, and add support for reductions. * doc/bison.texi (Xml): Update. * src/graphviz.c (conclude_red): Minor stylistic changes to DOT internals. (output_red): Swap enabled and disabled reductions output, for coherence with XSLT output. * src/print_graph.c (print_core): Minor stylistic change to States' output. (print_actions): Swap order of output for reductions and transitions. * tests/local.at (AT_BISON_CHECK_XML): Ignore differences in order. * tests/output.at: Adjust to changes in DOT internals.
Diffstat (limited to 'src/print_graph.c')
-rw-r--r--src/print_graph.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/print_graph.c b/src/print_graph.c
index 5ce0aa98..f4742b16 100644
--- a/src/print_graph.c
+++ b/src/print_graph.c
@@ -76,7 +76,7 @@ print_core (struct obstack *oout, state *s)
}
obstack_printf (oout, _("State %d"), s->number);
- obstack_sgrow (oout, "\\n");
+ obstack_sgrow (oout, "\\n\\l");
for (i = 0; i < snritems; i++)
{
item_number *sp;
@@ -142,9 +142,6 @@ print_actions (state const *s, FILE *fgraph)
transitions const *trans = s->transitions;
int i;
- /* Display reductions. */
- output_red (s, s->reductions, fgraph);
-
if (!trans->num && !s->reductions)
return;
@@ -167,6 +164,8 @@ print_actions (state const *s, FILE *fgraph)
TRANSITION_IS_ERROR (trans, i) ? NULL : symbols[sym]->tag,
style, fgraph);
}
+ /* Display reductions. */
+ output_red (s, s->reductions, fgraph);
}