]> git.saurik.com Git - bison.git/blobdiff - src/reader.c
(_AT_TEST_GLR_CXXTYPES): Do not include <assert.h>.
[bison.git] / src / reader.c
index 9f83a935b9183c77a3e6815cae2410da155d5ff7..5ed02b2e4971d0f9ed4a81517856b55e4ef514a4 100644 (file)
@@ -1,4 +1,4 @@
-/* Input parser for bison
+/* Input parser for Bison
    Copyright (C) 1984, 1986, 1989, 1992, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
    Copyright (C) 1984, 1986, 1989, 1992, 1998, 2000, 2001, 2002
    Free Software Foundation, Inc.
 
@@ -452,7 +452,8 @@ packgram (void)
        p = p->next;
     }
 
        p = p->next;
     }
 
-  assert (itemno == nritems);
+  if (itemno != nritems)
+    abort ();
 
   if (trace_flag & trace_sets)
     ritem_print (stderr);
 
   if (trace_flag & trace_sets)
     ritem_print (stderr);
@@ -539,11 +540,8 @@ reader (void)
     grammar = p;
   }
 
     grammar = p;
   }
 
-  if (SYMBOL_NUMBER_MAX < nsyms)
-    fatal (_("too many symbols (tokens plus nonterminals); maximum %d"),
-          SYMBOL_NUMBER_MAX);
-
-  assert (nsyms == ntokens + nvars);
+  if (! (nsyms <= SYMBOL_NUMBER_MAX && nsyms == ntokens + nvars))
+    abort ();
 
   xfclose (finput);
 
 
   xfclose (finput);