X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/7b0ca050f7153f3d038243bf1182b23854996788..21cf80399f199a565fc5cffe2cad734313ad4e8f:/src/print_graph.c?ds=sidebyside 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