/* Find and resolve or report look-ahead conflicts for bison,
- Copyright (C) 1984, 1989, 1992, 2000, 2001, 2002
+ Copyright (C) 1984, 1989, 1992, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of Bison, the GNU Compiler Compiler.
}
}
- /* 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))
{
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. */
if (expected_conflicts != -1)
{
if (! src_ok)
- complain (ngettext ("expected %d shift/reduce conflict",
- "expected %d shift/reduce conflicts",
- expected_conflicts),
- expected_conflicts);
+ warn (ngettext ("expected %d shift/reduce conflict",
+ "expected %d shift/reduce conflicts",
+ expected_conflicts),
+ expected_conflicts);
if (rrc_total)
- complain (_("expected 0 reduce/reduce conflicts"));
+ warn (_("expected 0 reduce/reduce conflicts"));
}
}