mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +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:
@@ -216,8 +216,7 @@ static void
|
||||
print_reduction (FILE *out, int level, char const *lookahead,
|
||||
rule *r, bool enabled)
|
||||
{
|
||||
const bool final = r->lhs->symbol == acceptsymbol;
|
||||
if (final)
|
||||
if (rule_is_initial (r))
|
||||
xml_printf (out, level,
|
||||
"<reduction symbol=\"%s\" rule=\"accept\" enabled=\"%s\"/>",
|
||||
xml_escape (lookahead),
|
||||
|
||||
Reference in New Issue
Block a user