lua-users home
lua-l archive

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

> Here's a patch for it, including the part from the previous e-mail
> about not compiling unreferenced rules. It passes lpeg-1.0.0/test.lua,
> and no segfault.

I think you are right about not being necessary to follow the next
rule (sib2 of TRule), but we still need to control recursion in
TCall nodes (as I said in the previous message). Try the following
grammar with your patch:

p = lpeg.C(-lpeg.P{lpeg.P'x' * lpeg.V(1) + lpeg.P'y'})


-- Roberto