[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] LPeg 0.11
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 1 Apr 2013 10:16:36 -0300
> Hmmm, could you add my request about LPeg memory management too?
>
> http://lua-users.org/lists/lua-l/2012-04/msg00898.html
>
> I'm not really sure how clear that message was, but ... basically it
> would be nice if one could add grammar hints to control memory
> management in LPeg, so that parsing extremely large-but-flat inputs
> with a single grammar is possible.
I am not sure I understood what you want. If you do not want to keep
any captures from ONE_STATEMENT, why does it have captures in the
first place?
Anyway, I guess you can force the release of all captures made by
ONE_STATEMENT with the following code:
lpeg.Cmt(ONE_STATEMENT / 0, function () return true end)
-- Roberto