lua-users home
lua-l archive

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

2017-10-23 4:52 GMT+02:00 Charles Heywood <>:

> I really don't think there's anything that Lua patterns can do that LPeg
> can't do. If there are, I think it'd be a fun challenge to try and prove
> otherwise.

Since it is quite easy to compose an LPeg pattern that simply filters
the entire input string through a Lua function, obviously there is nothing
that Lua without LPeg can do that P:match(str) can't. If you disqualify
LPeg's ability to call Lua, the question becomes academically interesting.
I.e. uninteresting to everybody except the kind of geek that hangs out
on places like, um, this list.

> However, I don't think LPeg patterns should replace Lua patterns.
> LPeg patterns are *much* more sophisticated and replacing the Lua patterns
> with them would make a mile-high barrier of entry, as well as being
> completely backwards incompatible.