Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with new LPeg #5

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

Problem with new LPeg #5

stuta opened this issue Nov 15, 2013 · 3 comments

Comments

@stuta
Copy link

stuta commented Nov 15, 2013

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
Copy link

mooffie commented Dec 12, 2013

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
Copy link

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

@daurnimator
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants