[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LPeg - stack overflow (too many runtime captures) with match time capture
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 15 Jun 2011 15:16:42 -0300
> I have a relatively simple contrived grammar (below) which works great
> with small files.
> When I try to feed it a large file though I get an error:
>
> stack overflow (too many runtime captures)
You may try something like this: (Warning: untested code!!)
- Name = Cmt(Name, function(str, pos, name)
- count = count + 1
- return true, name
- end)
+ Name = C(Cmt(Name, function(str, pos)
+ count = count + 1
+ return true
+ end))
That is, get the name as a regular capture, instead of a runtime one.
-- Roberto