lua-users home
lua-l archive

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

2016-04-09 8:27 GMT+02:00 Chris Emerson <>:
> As an example from the paper, the regular expression "(ba|a)*a" is not, as you
> might expect, converted to the structurally similar:
>     ((P"ba" + P"a")^0) * P"a"

That is the sort of thing I don't mind having to do manually.
With LPeg, there is no need to express every single case in
the PEG itself, you've got all of Lua to help you.  P(1)^0/myfunc
if nothing else works.