transitions const *trans = s->transitions;
+ /* Display reductions. */
+ output_red (s, s->reductions, fgraph);
+
if (!trans->num && !s->reductions)
return;
for (i = 0; i < trans->num; i++)
if (!TRANSITION_IS_DISABLED (trans, i))
{
- state *s1 = trans->states[i];
- symbol_number sym = s1->accessing_symbol;
-
- /* Shifts are solid, gotos are dashed, and error is dotted. */
- char const *style =
- (TRANSITION_IS_ERROR (trans, i) ? "dotted"
- : TRANSITION_IS_SHIFT (trans, i) ? "solid"
- : "dashed");
-
- if (TRANSITION_IS_ERROR (trans, i)
- && strcmp (symbols[sym]->tag, "error") != 0)
- abort ();
- output_edge (s->number, s1->number,
- TRANSITION_IS_ERROR (trans, i) ? NULL : symbols[sym]->tag,
- style, fgraph);
+ state *s1 = trans->states[i];
+ symbol_number sym = s1->accessing_symbol;
+
+ /* Shifts are solid, gotos are dashed, and error is dotted. */
+ char const *style =
+ (TRANSITION_IS_ERROR (trans, i) ? "dotted"
+ : TRANSITION_IS_SHIFT (trans, i) ? "solid"
+ : "dashed");
+
+ if (TRANSITION_IS_ERROR (trans, i)
+ && STRNEQ (symbols[sym]->tag, "error"))
+ abort ();
+ output_edge (s->number, s1->number,
+ TRANSITION_IS_ERROR (trans, i) ? NULL : symbols[sym]->tag,
+ style, fgraph);
}
}
/* A node's label contains its items. */
obstack_init (&node_obstack);
print_core (&node_obstack, s);
- obstack_1grow (&node_obstack, '\0');
- output_node (s->number, obstack_finish (&node_obstack), fgraph);
+ output_node (s->number, obstack_finish0 (&node_obstack), fgraph);
obstack_free (&node_obstack, 0);
/* Output the edges. */