I am trying to create a self-referential pattern in lua/lpeg
local group = lpeg.P(sep1 * (1 - sep2)^0 * group^0 * sep2)
notice that group refers to itself. This is not possible since group is undefined. lpeg.V does not work outside a grammar definition. Is there any way to solve this chicken and egg problem?