[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: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 12 Apr 2016 15:27:30 -0300
> On 30 May 2015 at 11:31, Daurnimator <quae@daurnimator.com> wrote:
> > Trying to use Peter Odding's lxsh
> > Issue has been filed for a while over there:
> > https://github.com/xolox/lua-lxsh/issues/5
> > But this should probably be fixed in LPEG itself?
> >
> >
> > The below works fine with lpeg 0.10:
> >
> >> lpeg = require"lpeg"
> >> D = lpeg.R'09'
> >> BB = lpeg.B(-D, 1)
> > stdin:1: bad argument #1 to 'B' (pattern may not have fixed length)
>
> Today I finally got around to looking at this again.
> I was working on updating peter odding's lxsh module for lua 5.3
> https://github.com/daurnimator/lua-lxsh
> And found that in lpeg 1.0 some of the tests fail (they passed in lpeg 0.10).
>
> To get things working, I had to force a check for the length via a lookahead.
> See https://github.com/daurnimator/lua-lxsh/commit/b620081cb8644e577f7f642d482087e3a0d366ba
I am not sure what this message is about. Is it trying to say that
the above piece of code does not work with LPeg 1.0?
-- Roberto