lua-users home
lua-l archive

Re: LPEG > 0.10 regression: 'B' (pattern may not have fixed length)

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


On Fri, Apr 15, 2016 at 12:48 AM, Daurnimator <quae@daurnimator.com> wrote:
>
> Consider this piece of code:
>
> ```
> local lpeg = require 'lpeg'
>
> local D = lpeg.R'09'
> local I = lpeg.R('AZ', 'az', '127円255円') + '_'
> local SOS = lpeg.P(function(s, i) return i == 1 end) -- start of string
This is completely tangential to the topic at hand, but wouldn't this
work just as well for SOS?
local SOS = -lpeg.B(1)

AltStyle によって変換されたページ (->オリジナル) /