[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lpeg recursive patterns, bug ?
- From: Wim Langers <wim.langers@...>
- Date: Mon, 21 Feb 2011 20:29:43 +0100
Thanks for explaining that to me. I changed my code to use "patt / function" instead and I'm back on track (a wiser man, trying to hunt down the original problem :-)
On Mon, Feb 21, 2011 at 3:26 PM, Tony Finch <firstname.lastname@example.org>
On Mon, 21 Feb 2011, Wim Langers wrote:
> The actual pattern creates objects from the match time captures. Since theThat doesn't require match-time captures. You only need match-time
> data has a tree structure these objects combined with other data generate
> encapsulating objects etc...
captures if you need to use Lua code to determine whether or not a match
occurred. Just constructing a parse tree should be done with normal
No match-time captures. Normal captures are evaluated after matching has
> Your explanation sounds logical (given my very limited knowledge of LPEG),
> but then why does the following example behave "as expected" (my pattern
> further stripped down) ?
completed, after all backtracking has been resolved.
Irish Sea: Southeast 4 or 5, occasionally 6 at first. Moderate becoming
slight. Occasional rain. Moderate or good, occasionally poor.