[antlr-interest] Stack Overflow for Tree grammar CSharp target
Martin Probst
mail at martin-probst.com
Wed Sep 3 01:04:22 PDT 2008
Hi,
> if ( _expressionDepth > 50 )
> throw new OperationCanceledException( "Expression nested
> too deeply." );
If you're using a VM language (C#?), why don't you simply catch the
StackOverflowException outside of your parsing code, in the driver?
That way, you only signal an error when it's really needed, and people
can fix the issue by increasing the stack size.
Regards,
/Martin
More information about the antlr-interest
mailing list