--- [EMAIL PROTECTED] wrote:
> The default maximum stack depth is 100.  If you are planning

Have you given any consideration to a variable sized yystack?

Parser memory used might be less in typical cases considering 
sizeof(yyStackEntry)*100 = 2000 bytes on x86.

The yyParser struct would need a few new members (malloc function 
pointer, free function pointer, stack capacity).
The API for ParseAlloc() would need an additional argument for a 
free function to resize yystack on demand in yy_shift() -
but ParseFree() could then lose its free function argument since it 
would already be in the yyParser struct.

SQLite may not need such a deep stack, but I can see other Lemon
generated parsers benefitting from this.

> on parsing some deeply right-recursive SQL statements (and apparently
> you are) then you will need to increase the depth of the stack.
> If you use the version of Lemon that I just checked in to build
> the parser, then you do this by compiling the parse.c file using
> 
>     -DYYSTACKDEPTH=10000



 
____________________________________________________________________________________
We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to