(conflicts_print): If the user specifies "%expect N", report an error

if there are any reduce/reduce conflicts.  This is what the manual
says should happen.  This fixes Debian bug 130890, reported by Anthony
DeRobertis.
This commit is contained in:
Paul Eggert
2002-12-26 22:10:52 +00:00
parent 983c5c2c2a
commit 76be9271f2

View File

@@ -534,11 +534,16 @@ conflicts_print (void)
else
warn ("%s", conflict_report (src_total, rrc_total));
if (expected_conflicts != -1 && !src_ok)
complain (ngettext ("expected %d shift/reduce conflict",
"expected %d shift/reduce conflicts",
expected_conflicts),
expected_conflicts);
if (expected_conflicts != -1)
{
if (! src_ok)
complain (ngettext ("expected %d shift/reduce conflict",
"expected %d shift/reduce conflicts",
expected_conflicts),
expected_conflicts);
if (rrc_total)
complain (_("expected 0 reduce/reduce conflicts"));
}
}