Re: LPEG > 0.10 regression: 'B' (pattern may not have fixed length)
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: LPEG > 0.10 regression: 'B' (pattern may not have fixed length)
- From: Duncan Cross <duncan.cross@...>
- Date: 2016年4月15日 18:11:36 +0100
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)