X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/d143e9c33f07e1a9966c10077f43e2f81232bf6c..63951be29fcb8e21146a9377176d53d509c575ca:/src/symtab.c?ds=inline diff --git a/src/symtab.c b/src/symtab.c index f9f78b31..002f6e37 100644 --- a/src/symtab.c +++ b/src/symtab.c @@ -1,6 +1,6 @@ /* Symbol table manager for Bison. - Copyright (C) 1984, 1989, 2000-2002, 2004-2011 Free Software + Copyright (C) 1984, 1989, 2000-2002, 2004-2012 Free Software Foundation, Inc. This file is part of Bison, the GNU Compiler Compiler. @@ -22,7 +22,6 @@ #include "system.h" #include -#include #include "complain.h" #include "gram.h" @@ -368,10 +367,11 @@ symbol_user_token_number_set (symbol *sym, int user_token_number, location loc) if (user_token_number == 0) { endtoken = sym; - endtoken->number = 0; /* It is always mapped to 0, so it was already counted in NTOKENS. */ - --ntokens; + if (endtoken->number != NUMBER_UNDEFINED) + --ntokens; + endtoken->number = 0; } } @@ -408,11 +408,11 @@ void symbol_make_alias (symbol *sym, symbol *str, location loc) { if (str->alias) - warn_at (loc, _("symbol `%s' used more than once as a literal string"), - str->tag); + warn_at (loc, _("symbol %s used more than once as a literal string"), + str->tag); else if (sym->alias) - warn_at (loc, _("symbol `%s' given more than one literal string"), - sym->tag); + warn_at (loc, _("symbol %s given more than one literal string"), + sym->tag); else { str->class = token_sym;