- for (j = 0; j < nerrs; j++)
- {
- if (!errp->errs[j])
- continue;
- symbol = errp->errs[j];
- /* If something has been added in the NODE_OBSTACK after
- the declaration of the label, then we need a `\n'. */
- if (obstack_object_size (node_obstack) > node_output_size)
- obstack_sgrow (node_obstack, "\\n");
- obstack_fgrow1 (node_obstack, _("%-4s\terror (nonassociative)"),
- tags[symbol]);
- }
- if (j > 0)
- obstack_sgrow (node_obstack, "\\n");
- }
+ for (i = 0; i < trans->num; i++)
+ if (!TRANSITION_IS_DISABLED (trans, i))
+ {
+ state *s1 = trans->states[i];
+ symbol_number sym = s1->accessing_symbol;
+
+ new_edge (&e);
+
+ if (s->number > s1->number)
+ e.type = back_edge;
+ open_edge (&e, fgraph);
+ /* The edge source is the current node. */
+ e.sourcename = node_name;
+ sprintf (buff, "%d", s1->number);
+ e.targetname = buff;
+ /* Shifts are blue, gotos are green, and error is red. */
+ if (TRANSITION_IS_ERROR (trans, i))
+ e.color = red;
+ else
+ e.color = TRANSITION_IS_SHIFT (trans, i) ? blue : green;
+ e.label = symbols[sym]->tag;
+ output_edge (&e, fgraph);
+ close_edge (fgraph);
+ }
+}