mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 00:03:03 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user