[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: LPeg and Lua 5.3 operators
- From: Coroutines <coroutines@...>
- Date: Wed, 14 May 2014 17:24:10 -0700
Thoughts on using Lua 5.3's new operators in LPeg?
patt1 + patt2 --> patt1 | patt2
patt1 - patt2 --> patt1 ~ patt2
-patt --> ~patt
I know * was chosen for "concatenating patterns" because it closer
resembles the dot operator, but imo it'd make sense to use + for that.
Anyway, this is what I'd prefer -- what do you other people want? :-)
The biggest criticism I see against this is that it would be a bad
move to mess with a an already established set of operators.
Should it change at all?
PS: I was trying to figure out a way that << or >> could be used for captures.