X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/297e263a0050959e0fd139ad66e71383fc9ac4db..e36ec1f41ffbe9f00db405c775201dbbc384c45c:/src/reduce.c diff --git a/src/reduce.c b/src/reduce.c index 736cbb6a..171af398 100644 --- a/src/reduce.c +++ b/src/reduce.c @@ -299,9 +299,9 @@ nonterminals_reduce (void) { nontermmap[i - ntokens] = n++; if (symbols[i]->status != used) - warn_at (symbols[i]->location, - _("nonterminal useless in grammar: %s"), - symbols[i]->tag); + complain (&symbols[i]->location, Wother, + _("nonterminal useless in grammar: %s"), + symbols[i]->tag); } @@ -383,15 +383,15 @@ static void reduce_print (void) { if (nuseless_nonterminals > 0) - warn (ngettext ("%d nonterminal useless in grammar", - "%d nonterminals useless in grammar", - nuseless_nonterminals), - nuseless_nonterminals); + complain (NULL, Wother, ngettext ("%d nonterminal useless in grammar", + "%d nonterminals useless in grammar", + nuseless_nonterminals), + nuseless_nonterminals); if (nuseless_productions > 0) - warn (ngettext ("%d rule useless in grammar", - "%d rules useless in grammar", - nuseless_productions), - nuseless_productions); + complain (NULL, Wother, ngettext ("%d rule useless in grammar", + "%d rules useless in grammar", + nuseless_productions), + nuseless_productions); } void @@ -416,7 +416,7 @@ reduce_grammar (void) reduce_print (); if (!bitset_test (N, accept->number - ntokens)) - fatal_at (startsymbol_location, + complain (&startsymbol_location, fatal, _("start symbol %s does not derive any sentence"), startsymbol->tag); @@ -432,8 +432,8 @@ reduce_grammar (void) { grammar_dump (stderr, "Reduced Grammar"); - fprintf (stderr, "reduced %s defines %d terminals, %d nonterminals\ -, and %d productions.\n", + fprintf (stderr, "reduced %s defines %d terminals, %d nonterminals" + ", and %d productions.\n", grammar_file, ntokens, nvars, nrules); } }