summaryrefslogtreecommitdiff
path: root/src/print_graph.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/print_graph.c')
-rw-r--r--src/print_graph.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/print_graph.c b/src/print_graph.c
index 7e429dbd..f15bc523 100644
--- a/src/print_graph.c
+++ b/src/print_graph.c
@@ -84,8 +84,11 @@ print_core (struct obstack *oout, state *s)
obstack_1grow (oout, '.');
- for (/* Nothing */; *sp >= 0; ++sp)
- obstack_printf (oout, " %s", escape (symbols[*sp]->tag));
+ if (0 <= *r->rhs)
+ for (/* Nothing */; *sp >= 0; ++sp)
+ obstack_printf (oout, " %s", escape (symbols[*sp]->tag));
+ else
+ obstack_printf (oout, " %%empty");
/* Experimental feature: display the lookahead tokens. */
if (report_flag & report_lookahead_tokens