mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +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:
@@ -473,7 +473,7 @@ state_lookaheads_count (state *s, bool default_reduction_only_for_accept)
|
||||
s->consistent =
|
||||
!(reds->num > 1
|
||||
|| (reds->num == 1 && trans->num && TRANSITION_IS_SHIFT (trans, 0))
|
||||
|| (reds->num == 1 && reds->rules[0]->number != 0
|
||||
|| (reds->num == 1 && !rule_is_initial (reds->rules[0])
|
||||
&& default_reduction_only_for_accept));
|
||||
|
||||
return s->consistent ? 0 : reds->num;
|
||||
|
||||
Reference in New Issue
Block a user