X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/69363a9e4d0b8d3b51536434d3395d38519f617b..6175ffe3211dad578ce6585584c4eb85cf891830:/src/conflicts.c?ds=inline diff --git a/src/conflicts.c b/src/conflicts.c index 21ea7ce5..fe1f6f9f 100644 --- a/src/conflicts.c +++ b/src/conflicts.c @@ -237,9 +237,12 @@ resolve_sr_conflict (state *s, int ruleno, symbol **errors) } } - /* Some tokens have been explicitly made errors. Allocate a - permanent errs structure for this state, to record them. */ - state_errs_set (s, nerrs, errors); + if (nerrs) + { + /* Some tokens have been explicitly made errors. Allocate a + permanent errs structure for this state, to record them. */ + state_errs_set (s, nerrs, errors); + } if (obstack_object_size (&solved_conflicts_obstack)) { @@ -277,10 +280,7 @@ set_conflicts (state *s, symbol **errors) for (i = 0; i < reds->num; ++i) if (reds->rules[i]->prec && reds->rules[i]->prec->prec && !bitset_disjoint_p (reds->lookaheads[i], lookaheadset)) - { - resolve_sr_conflict (s, i, errors); - break; - } + resolve_sr_conflict (s, i, errors); /* Loop over all rules which require lookahead in this state. Check for conflicts not resolved above. */