X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/cb9ec4fada480554cf47810fee736997d64e7427..975bb564319aa4f4204c48aba265757ba207a80f:/src/reduce.c?ds=sidebyside diff --git a/src/reduce.c b/src/reduce.c index be7f421c..41bc5ced 100644 --- a/src/reduce.c +++ b/src/reduce.c @@ -1,6 +1,6 @@ /* Grammar reduction for Bison. - Copyright (C) 1988-1989, 2000-2003, 2005-2012 Free Software + Copyright (C) 1988-1989, 2000-2003, 2005-2014 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -49,7 +49,7 @@ static bitset P; static bitset V; /* Set of symbols used to define rule precedence (so they are - `useless', but no warning should be issued). */ + 'useless', but no warning should be issued). */ static bitset V1; static rule_number nuseful_productions; @@ -299,9 +299,9 @@ nonterminals_reduce (void) { nontermmap[i - ntokens] = n++; if (symbols[i]->status != used) - complain_at (symbols[i]->location, Wother, - _("nonterminal useless in grammar: %s"), - symbols[i]->tag); + complain (&symbols[i]->location, Wother, + _("nonterminal useless in grammar: %s"), + symbols[i]->tag); } @@ -383,14 +383,14 @@ static void reduce_print (void) { if (nuseless_nonterminals > 0) - complain (Wother, ngettext ("%d nonterminal useless in grammar", - "%d nonterminals useless in grammar", - nuseless_nonterminals), + complain (NULL, Wother, ngettext ("%d nonterminal useless in grammar", + "%d nonterminals useless in grammar", + nuseless_nonterminals), nuseless_nonterminals); if (nuseless_productions > 0) - complain (Wother, ngettext ("%d rule useless in grammar", - "%d rules useless in grammar", - nuseless_productions), + complain (NULL, Wother, ngettext ("%d rule useless in grammar", + "%d rules useless in grammar", + nuseless_productions), nuseless_productions); } @@ -416,9 +416,9 @@ reduce_grammar (void) reduce_print (); if (!bitset_test (N, accept->number - ntokens)) - complain_at (startsymbol_location, fatal, - _("start symbol %s does not derive any sentence"), - startsymbol->tag); + complain (&startsymbol_location, fatal, + _("start symbol %s does not derive any sentence"), + startsymbol->tag); /* First reduce the nonterminals, as they renumber themselves in the whole grammar. If you change the order, nonterms would be