How to increase stack size in bison (and solve “memory exhausted”)
My bison-based parser started choking on some moderately sized files I've generated recently. It throws an exception about "memory exhausted." The bison man page says that this is likely due to use of right-hand recursion. Without trying to rewrite the grammar (I am on a tight deadline), I would like to simply increase the stack to get the parser to parse this file. I tried to follow the bison man page and #define YYMAXDEPTH to some number larger than the default 10000, but that didn't work. When I look at the output from bison, it seems like YYMAXDEPTH is only conditionally used when YYSTACK