]> git.saurik.com Git - bison.git/blobdiff - src/reader.c
#
[bison.git] / src / reader.c
index bd8359133912648dd7dffe34a7b62dfab2638180..6433bb98157054d80e55aa382f93bb6be04455f6 100644 (file)
@@ -29,7 +29,7 @@ The entry point is reader().  */
 #include <ctype.h>
 #include "system.h"
 #include "files.h"
-#include "new.h"
+#include "alloc.h"
 #include "symtab.h"
 #include "lex.h"
 #include "gram.h"
@@ -122,6 +122,7 @@ static int lastprec;  /* incremented for each %left, %right or %nonassoc seen */
 static int gensym_count;  /* incremented for each generated symbol */
 
 static bucket *errtoken;
+static bucket *undeftoken;
 
 /* Nonzero if any action or guard uses the @n construct.  */
 static int yylsp_needed;
@@ -190,7 +191,9 @@ reader()
   errtoken->user_token_number = 256; /* Value specified by posix.  */
   /* construct a token that represents all undefined literal tokens. */
   /* it is always token number 2.  */
-  getsym("$undefined.")->class = STOKEN;
+  undeftoken = getsym("$undefined.");
+  undeftoken->class = STOKEN;
+  undeftoken->user_token_number = 2;
   /* Read the declaration section.  Copy %{ ... %} groups to ftable and fdefines file.
      Also notice any %token, %left, etc. found there.  */
   if (noparserflag)
@@ -1142,7 +1145,7 @@ int stack_offset;
              continue;
            }
          else
-           warni(_("$%s is invalid"), printable_version(c));
+           warns(_("$%s is invalid"), printable_version(c));
 
          break;
 
@@ -1156,7 +1159,7 @@ int stack_offset;
            }
          else
            {
-             warni(_("@%s is invalid"), printable_version(c));
+             warns(_("@%s is invalid"), printable_version(c));
              n = 1;
            }
 
@@ -1364,7 +1367,7 @@ int stack_offset;
                  continue;
                }
              else
-               warni(_("$%s is invalid"), printable_version(c));
+               warns(_("$%s is invalid"), printable_version(c));
 
              break;