]> git.saurik.com Git - bison.git/blobdiff - src/symtab.c
(symbol_new): Report an error if the input grammar contains too many
[bison.git] / 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;
 }