lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Roberto Ierusalimschy <> writes:
> 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?

Any results from ONE_STATEMENT are already recorded via side-effects,
so any captures inside it have already been used, and I want to
discard them for the "next iteration" (of ONE_STATEMENT).

Trying this in real life leads to memory explosion, whereas just using
an explicit loop outside of LPeg doesn't, so clearly something's
being kept around inside LPeg between iterations.


Virtues, n. pl. Certain abstentions.