]> git.saurik.com Git - bison.git/blobdiff - src/print_graph.c
reports: display %empty in the generated pointed-rules
[bison.git] / src / print_graph.c
index 7e429dbd107999e9ce5ff38c73cfdad635f07548..f15bc5230d1c8dfe43d610a50b312d1b9e6ce2dd 100644 (file)
@@ -84,8 +84,11 @@ print_core (struct obstack *oout, state *s)
 
       obstack_1grow (oout, '.');
 
 
       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
 
       /* Experimental feature: display the lookahead tokens. */
       if (report_flag & report_lookahead_tokens