[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LPEG: captures
- From: Parke <parke.nexus@...>
- Date: Fri, 29 May 2015 09:47:56 -0700
On Fri, May 29, 2015 at 5:53 AM, Александр Машин <email@example.com> wrote:
> Unfortunately, not. The grammar splits the input line into chunks, which
> have to be re-concatenated to get what I wanted as 'full' field. Iwas able
> to achieve it in a simpler form but hoped to avoid this second step.
I don't know a simple way to do what you want. It might be possible
by using function captures, and/or match time function captures, but I
consider the chucks to be simpler.
It might also be possible to write two patterns, and call LPeg twice.
First to do the "full" match, and then a second time to get the
"items" (and "separator").
> addition, 'Name::' is not inserted, although with this chunked input this is
> not necessary.
I see Name:: inserted into the chunks. Do you really not see it?