lua-users home
lua-l archive

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

On 30 May 2015 at 11:31, Daurnimator <> wrote:
> Trying to use Peter Odding's lxsh
> Issue has been filed for a while over there:
> 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
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.