Problem with new LPeg #5

Open
stuta opened this Issue Nov 15, 2013 · 3 comments

Projects

None yet

3 participants

@stuta

Hello.

I tried to test this with new lpeg in osx, but I get this error:

./lxsh/lexers/init.lua:38: bad argument #1 to 'B' (pattern may not have fixed length)

test code:

require 'lxsh'
-- Run the lexer on a string of source code.
for kind, text, lnum, cnum in lxsh.lexers.lua.gmatch 'i = i + 1\n-- example' do
print(string.format('%s: %q (%i:%i)', kind, text, lnum, cnum))
end

@mooffie

I can confirm the above report: when you use lpeg 0.12 or lpeg 0.11 you get that error.

lxsh doesn't work with lpeg 0.9 either:

.../lxsh/lexers/init.lua:38: attempt to call field 'B' (a nil value)

It does work with lpeg 0.10.

@daurnimator

This is indeed an issue. Just posted to the lua mailing list about it.

@daurnimator

lpeg 1.0 fixes the bug in lpeg that causes this.

If you add a dependency on lpeg >= 1.0 I think this issue can be marked done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment