lua-users home
lua-l archive

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


> Questions:
> ==========
> What is the official name of this data structure? Is there a place in
> which it is described in more details than in the Lpeg manual? Where?

Maybe I am misuderstanding something, but there is no such data
structure. Captures are computations. You may try to represent
the result of one single capture as a data structure, but there is
no structure to represent the tree of all captures made in a match.

A most archetypal capture is the function capture. What structure
would represent the following match?

  ((lpeg.C(1) * lpeg.C(1)) / function (a,b)
    return string.char(string.byte(a) + string.byte(b))
  end):match(" '")

-- Roberto