[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lpeg and deep nesting
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 3 Mar 2010 09:22:44 -0300
> This example raises a "too many pending calls/choices" error.
> I imagined Lpeg stores on stack some sort of closure for the inner
> captures it might find, and reading the source I've noticed the 400
> entries limitation.
> My questions are: did I understand it right? if so, is there a
> recipe to circumvent this limitation?
Yes. Currently no. (For many patterns you can rewrite it to avoid
pending choices or calls, but not if you need a recursive pattern able
to descend so many levels.)
The next version of LPEG will have a resizable stack. It will still
have a limit, to detect bad-written patterns, but there is a function
to change that limit.