lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, Jul 4, 2014 at 11:21 PM, Sean Conner <> wrote:
> lpeg.Cg() does a group capture, which is what you are trying to do here,
> trying to group multiple captures of "capture_A_or_B" and passing them all
> into a single function.
That makes sense. But then, why did it work the way I expected when I
added a dummy capture?

> Unless you are writing recursive patterns [1] you don't really need the
> extra baggage of using grammars (in my opinion).
I used them in the example because I used one in the original. I
probably didn't benefit from using one in the original either. It's
mostly habit. I'll take your advice on the matter to heart.