[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LPeg capturing too much?
- From: Michael Wolf <miwo@...>
- Date: Sat, 07 Apr 2007 07:54:50 +0200
Peter Odding wrote:
Hi all! I’m trying to write an LPeg parser for semi-structured text
ala Textile & Markdown. It’s coming along very nicely: I think I’m
almost done! However I’ve run into a pattern with LPeg that I can’t
seem to get right. Quoting from my command-prompt:
> = lpeg.match(lpeg.P'*' * lpeg.C((1 - lpeg.S'\r\n\f*')^1) * '*',
Did I mis-interpret the manual or is this a bug? Quoting part of the
summary table from the LPeg manual:
patt1 - patt2 Matches patt1 if patt2 does not match.
I interpret the manual like you, it should work. And it works correctly
with lpeg 0.4 but not with 0.5!
So I think it's a bug in the 0.5 version.