lua-users home
lua-l archive

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



On Feb 1, 2018, at 10:59 AM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:

We do not need every item to be lpeg object, only its built class
(item were used ONLY to build class range)

I don't think this is true. All uses of 'item' demand it to be a
pattern. What happens is that other operations (e.g., '*', '-')
coerce it to a pattern when it is not one.


one of item choice is defined, which included user defined constants
that may not be lpeg object. So, the bug is still there.

Sure. It should be fixed, too.

-- Roberto


local item = defined + Range + m.C(any)
+local item = (defined + Range + m.C(any)) / m.P

this should fix it.

-- Albert Chan