lua-users home
lua-l archive

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

On Tue, Jun 21, 2011 at 10:03:04AM +0200, steve donovan wrote:
> On Tue, Jun 21, 2011 at 9:37 AM, Dirk Laurie <> wrote:
> > Instead, I'm asking whether a question similar to this has burgeoned
> > in the brain of a list member for long enough that some work in this
> > direction has been done.
> Ah, but what would be gained from getting _identical functionality_?
> We already have Lua patterns.(And there's always
1. We're gaining immediate reusability of Lua pattern expertise, which
    many people have.

2. Lua's character classes become available to LPEG.

> Now, if it could work with Lua patterns + alternation, say, then that
> would be worth expending some cycles on.
Once it's an LPEG pattern, all the operators are available.

pat1 = lpeg.L(lpat1)
pat2 = lpeg.L(lpat2)
pat1+pat2   -- pat1 or pat2
pat1-pat2   -- pat1 unless pat2