[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Problems with lpeg.Cmt captures
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 10 Apr 2008 14:02:13 -0300
> So for some reason, despite returning the fact that I said the match
> succeeded, it appears to have failed and is calling it again. At this
> point, I'm not sure what captured element is being provided, unless its the
> entire table of chunks.
In your trace there is this sequence, just after the Cmt execution:
|| s: | three| stck: 12 c: 16 89: commit -> 102
|| s: | three| stck: 11 c: 16 102: ret
|| s: | three| stck: 10 c: 16 197: failtwice
The commit seems consistent with the choice in your rule (" + Cs...");
The return seems to finish the rule EndifExpr. But then there is this
failtwice. This instruction is generated only by a not predicate ('a-b'
or '-b'). Are you sure your pattern does not have this predicate?
-- Roberto