]> git.saurik.com Git - bison.git/commitdiff
(symbol_new): Report an error if the input grammar contains too many
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2004 00:08:21 +0000 (00:08 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2004 00:08:21 +0000 (00:08 +0000)
symbols.

src/symtab.c

index c0368f715493e8c6cf8b70646371fa4e17ef5a1a..63f3bf3913c2c597088b247d135419a4cdf5ef27 100644 (file)
@@ -66,6 +66,9 @@ symbol_new (uniqstr tag, location loc)
   res->alias = NULL;
   res->class = unknown_sym;
 
+  if (nsyms == SYMBOL_NUMBER_MAXIMUM)
+    fatal (_("too many symbols in input grammar (limit is %d)"),
+          SYMBOL_NUMBER_MAXIMUM);
   nsyms++;
   return res;
 }