]> git.saurik.com Git - bison.git/blobdiff - src/symtab.c
maint: spell "file system" as two separate words
[bison.git] / src / symtab.c
index f9f78b313667e8eac55a85a5b169c753ca71090b..bfd3ced1b0d1966d64f907ff71e288043a890988 100644 (file)
@@ -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.
@@ -368,10 +368,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;
     }
 }