[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] LPeg 0.11
- From: Patrick Donnelly <batrick@...>
- Date: Tue, 2 Apr 2013 19:44:26 -0400
On Tue, Apr 2, 2013 at 7:32 PM, Miles Bader <miles@gnu.org> wrote:
> Are you saying I can just do:
>
> FILE =
> (lpeg.P"begin"
> * lpeg.Cmt(SUPER_COMPLEX_GRAMMAR_WITH_LOTS_OF_CAPTURES,
> function () return true end)^0
> * lpeg.P"end")
>
> ?
Yup!
> Will the use of Cmt here affect the speed of
> SUPER_COMPLEX_GRAMMAR_WITH_LOTS_OF_CAPTURES?
No.
> [So basically I could just define my suggested "lpeg.flush" like:
>
> function lpeg_flush (pattern)
> return lpeg.Cmt (pattern, function () return true end)
> end
>
> ?]
Yes.
--
- Patrick Donnelly