[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Request for LPeg feature
- From: Sean Conner <sean@...>
- Date: Fri, 20 Apr 2018 20:30:19 -0400
It was thus said that the Great Albert Chan once stated:
> On Apr 19, 2018, at 11:10 PM, Sean Conner <sean@conman.org> wrote:
>
> >
> > More specifically, a production in the 're' module of LPeg, for folding
> > captures. I even have a proposed syntax:
> >
> > {^name^ p ^} folding capture equivalent to lpeg.Cf(p,defs[name])
> >
>
> ~> for folding capture is probably better
>
> http://lua-users.org/lists/lua-l/2015-08/msg00029.html
Heh ... I forgot about that.
I looked at re.lua last night and realized my own proposal could be done
in one line of code, much like Alex's proposal is also one line of code.
I'm not wedded to my syntax [1] but I would like the ability to do a folding
capture added to re, that way I don't have to rely upon a custom version
just to have nice looking code.
Please, Roberto? Please?
-spc
[1] I based mine off the named group capture; Alex based his off the
match-time capture.