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

"loop body may accept empty string" while running sitegen #4

Closed
tiye opened this issue Jan 9, 2014 · 4 comments
Closed

"loop body may accept empty string" while running sitegen #4

tiye opened this issue Jan 9, 2014 · 4 comments

Comments

@tiye
Copy link

tiye commented Jan 9, 2014

After sitegen worked, I got error generating the site leafo/sitegen#1

➤➤ l
Makefile          highlight.coffee  pack_html.js      site.moon         www/
client.coffee     index.md          readme.md         style.scss
compiler/         moonscript/       ref.scss          templates/
➤➤ make
sitegen
moon:...r/local/Cellar/luarocks/2.0.13/share/lua/5.1//re.lua:183: loop body may accept empty string
stack traceback:
    [C]: in function 'f'
    ...r/local/Cellar/luarocks/2.0.13/share/lua/5.1//re.lua:183: in function <...r/local/Cellar/luarocks/2.0.13/share/lua/5.1//re.lua:183>
    [C]: in function 'match'
    ...r/local/Cellar/luarocks/2.0.13/share/lua/5.1//re.lua:208: in function <...r/local/Cellar/luarocks/2.0.13/share/lua/5.1//re.lua:206>
    (tail call): ?
    /usr/local/share/lua/5.1/cosmo/grammar.lua:166: in main chunk
    [C]: in function 'require'
    /usr/local/share/lua/5.1/cosmo.lua:3: in main chunk
    [C]: in function 'require'
    /usr/local/bin/sitegen:5: in main chunk
  Suffix = m.Cf(m.V"Primary" * S *
          ( ( m.P"+" * m.Cc(1, mt.__pow)
            + m.P"*" * m.Cc(0, mt.__pow)
            + m.P"?" * m.Cc(-1, mt.__pow)
            + "^" * ( m.Cg(num * m.Cc(mult))
                    + m.Cg(m.C(m.S"+-" * m.R"09"^1) * m.Cc(mt.__pow))
                    )
            + "->" * S * ( m.Cg((String + num) * m.Cc(mt.__div))
                         + m.P"{}" * m.Cc(nil, m.Ct)
                         + m.Cg(Def / getdef * m.Cc(mt.__div))
                         )
            + "=>" * S * m.Cg(Def / getdef * m.Cc(m.Cmt))
            ) * S
          )^0, function (a,b,f) return f(a,b) end ); ---- this line is 183
@leafo
Copy link
Owner

leafo commented Jan 9, 2014

what version of cosmo and lpeg do you have? luarocks list cosmo luarocks list lpeg

@tiye
Copy link
Author

tiye commented Jan 9, 2014

➤➤ luarocks list cosmo

Installed rocks:
----------------

cosmo
   13.01.30-1 (installed) - /usr/local//lib/luarocks/rocks

➤➤ luarocks list lpeg

Installed rocks:
----------------

lpeg
   0.12-1 (installed) - /usr/local//lib/luarocks/rocks
➤➤ lua -v
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
➤➤ luarocks --version
/usr/local/bin/luarocks 2.1.1
LuaRocks main command-line interface

@leafo
Copy link
Owner

leafo commented Jan 9, 2014

Looks like cosmo/lpeg are messed up but it's been fixed: mascarenhas/cosmo#5

I'm actually running lpeg 0.10. So I guess you could either downgrade or try installing cosmo from source. That's a shame.

@tiye
Copy link
Author

tiye commented Jan 9, 2014

With cosmo from source, now working: http://moon-script.org/
So it's a bug of cosmo, closing.

@tiye tiye closed this as completed Jan 9, 2014
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

2 participants