On 2005-04-26, at 23:46:10 +0200, Hans Aberg wrote:
Again, this is probably a question for Paul to answer, who wrote the current C-parser. I thought that the C-parser was dynamic, except when free store runs out, in which case one is toast anyway. What
Yes, it is dynamic. Up to YYMAXDEPTH.
Besides, I don't think that anyone will ever get the parser to exhaust its stack. But my test suite checks the "parser overflow" error and that test will leak memory if any stray objects aren't cleaned up. Which is bad for the memory leak checker...
Why don't you define YYMAXDEPTH to the MAXINT or something? Then you can only get overflow by memory running out.
> parser stack dynamic reallocation, and gets stack overflow, how doyou intend to recover. I mean, then the parser cannot handle the input semantics properly anyway.
Sure. I don't want to recover. I just don't want to leak memory. As I mentioned, the parser is embedded in a Perl module, and the module shouldn't leak memory as the code using the module may run for long periods of time.
There I do not see exactly what you need. Perhaps Paul can help. -- Hans Aberg
_______________________________________________ Help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison