summaryrefslogtreecommitdiff
path: root/src/graphviz.c
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2020-11-08 17:50:46 +0100
committerAkim Demaille <akim.demaille@gmail.com>2020-11-10 07:08:03 +0100
commita38d0b914507d2c9163eef84240bf1a059a0659f (patch)
tree1f3144fb95578c93107e8fc09553d7514f2ed8d5 /src/graphviz.c
parent4b0cd01fb7a1586e6886207376c587516c3152b5 (diff)
downloadbison-a38d0b914507d2c9163eef84240bf1a059a0659f.tar.gz
multistart: introduce and use rule_is_initial
* src/gram.h (rule_is_initial): New. * src/graphviz.c, src/print-xml.c, src/print.c, src/lalr.c: Use it. Some of these occurrences were incorrect (checking whether this is rule 0), and not behaving properly in the case of multistart.
Diffstat (limited to 'src/graphviz.c')
-rw-r--r--src/graphviz.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/graphviz.c b/src/graphviz.c
index 799d5bef..da4db481 100644
--- a/src/graphviz.c
+++ b/src/graphviz.c
@@ -135,7 +135,7 @@ conclude_red (struct obstack *out, int source, rule_number ruleno,
/* Build the associated diamond representation of the target rule. */
fprintf (fout, " \"%dR%d%s\" [label=\"",
source, ruleno, ed);
- bool final = rules[ruleno].lhs->symbol == acceptsymbol;
+ bool const final = rule_is_initial (&rules[ruleno]);
if (final)
fprintf (fout, "Acc");
else