mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 14:23:04 +00:00
warnings: factoring: complaints
* src/complain.c (error_message): Accept warning categories (an integer) as argument. Location is a 'const location *' instead of 'location *'. (ERROR_MESSAGE): Delete it. * src/complain.c, src/complain.h (complains): New function. (complain, complain_at, complain_at_indent): Generic functions for complaints. Call 'complains'. (warn_at, warn_at_indent, warn, yacc_at, midrule_value_at) (fatal_at, fatal): Delete them. Adjust dependencies. * src/complain.h (enum warnings): New fields 'complaint' and 'fatal'. * bootstrap.conf (XGETTEXT_OPTIONS): Adjust.
This commit is contained in:
committed by
Akim Demaille
parent
d0f11c1b62
commit
6fb8b25619
@@ -584,7 +584,7 @@ conflicts_print (void)
|
||||
|
||||
if (! glr_parser && rrc_total > 0 && expected_rr_conflicts != -1)
|
||||
{
|
||||
warn (_("%%expect-rr applies only to GLR parsers"));
|
||||
complain (Wother, _("%%expect-rr applies only to GLR parsers"));
|
||||
expected_rr_conflicts = -1;
|
||||
}
|
||||
|
||||
@@ -618,14 +618,14 @@ conflicts_print (void)
|
||||
if (expected_sr_conflicts != -1 || expected_rr_conflicts != -1)
|
||||
{
|
||||
if (! src_ok)
|
||||
complain (ngettext ("expected %d shift/reduce conflict",
|
||||
"expected %d shift/reduce conflicts",
|
||||
src_expected),
|
||||
complain (complaint, ngettext ("expected %d shift/reduce conflict",
|
||||
"expected %d shift/reduce conflicts",
|
||||
src_expected),
|
||||
src_expected);
|
||||
if (! rrc_ok)
|
||||
complain (ngettext ("expected %d reduce/reduce conflict",
|
||||
"expected %d reduce/reduce conflicts",
|
||||
rrc_expected),
|
||||
complain (complaint, ngettext ("expected %d reduce/reduce conflict",
|
||||
"expected %d reduce/reduce conflicts",
|
||||
rrc_expected),
|
||||
rrc_expected);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user