]> git.saurik.com Git - bison.git/blobdiff - src/main.c
Add src/state.c to the repo.
[bison.git] / src / main.c
index 10d5e0a8457b00e0205ddd06afe1b743ef3a7b78..76caf7a0242b58b0e6c4d360b26aa609d0001f75 100644 (file)
@@ -64,8 +64,7 @@ main (int argc, char *argv[])
   if (complain_message_count)
     exit (1);
 
-  /* Find useless nonterminals and productions and reduce the grammar.
-     In file reduce.c.  */
+  /* Find useless nonterminals and productions and reduce the grammar. */
   reduce_grammar ();
 
   /* Record other info about the grammar.  In files derives and
@@ -119,6 +118,12 @@ main (int argc, char *argv[])
 
   output_files ();
 
+  /* If using alloca.c, flush the alloca'ed memory for the benefit of
+     people running Bison as a library in IDEs.  */
+#if C_ALLOCA
+    alloca (0);
+#endif
+
   return complain_message_count ? EXIT_FAILURE : EXIT_SUCCESS;
 }
 \f