lua-users home
lua-l archive

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


> LPEG seems not to be very good at optimising around lpeg.V references. In
> particular they defeat character set combination. This can be a bit
> harmful to readability of grammars. For example,
> 
> [...]

LPEG does not even try to optimize references. Usually the best approach
is to define the low-level entities outside the grammar (as you did in
your "fast" case) and use them inside the grammar. For instance, we used
this technique in the "Arithmetic expressions" example in the manual.
(The "lexical elements" are all defined outside the grammar.)

-- Roberto