[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Yieldable LPEG Parser
- From: Tony Finch <dot@...>
- Date: Wed, 1 Feb 2012 12:03:17 +0000
Miles Bader <miles@gnu.org> wrote:
>
> [Hmm, that brings to mind another question: How much of the input
> string does it have to accumulate in memory? Can it start discarding
> earlier portions of it at some point? If not, it wouldn't be so useful
> for the use I have in mind: parsing really big files without needing to
> have them entirely in memory.]
lpeg doesn't bother trying to discard unneeded string prefixes. In theory
it can only discard the prefix of a string that is not covered by any
captures and which has no alternation backtracking points in it.
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
Rockall, Malin: South 5 to 7, decreasing 4 at times in Malin. Moderate or
rough, occasionally very rough in Rockall. Occasional rain in Rockall.
Moderate or good.