[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A question about lpeg.Cg() and anonymous groups
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 11 Sep 2023 10:57:04 -0300
> [...]
>
> and apparently only lpeg.Cf() distinguishes all these cases... I
> couldn't find anything else, besides lpeg.Cf(), that would _not_
> coerce the three cases above into five or six separate captures.
>
> Are there other ways - besides lpeg.Cf() - to access the captures
> while they are still in this form,
>
> "a" ("b" "c") ("d" "e")
>
> or
>
> ("a" "b") ("c" "d") ("e" "f"),
>
> before the groups are unpacked?
Not that I know. How that could happen? LPeg groups have no
representation as Lua values. You still want to give them meanings they
don't have.
-- Roberto