lua-users home
lua-l archive

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


Hi Henk,

I wrote Luma against a pretty old version of LPEG, 0.7. I have updated
luma.re to work with LPEG 0.10, forking LPEG's re.lua. The changes are
simple:

* allow _ as a non-terminal name
* search for non-terminals in the definitions first (instead of
requiring definitions to be prepended by %)

These changes make writing and composing grammars much more convenient.

I have put a new rockspec online, and moved the repository to github:

http://github.com/mascarenhas/luma

The test suite passes with the latest versions of LPEG and Cosmo
installed (there is no luma.cosmo anymore, BTW, it just uses the
installed Cosmo).

--
Fabio Mascarenhas


On Sun, Apr 10, 2011 at 1:26 AM, Henk Boom <henk@henk.ca> wrote:
> I'm trying to use luma for a project I'm working on, but I'm having
> trouble getting it to run.
>
> After installing luma.lua, luma/re.lua, and luma/cosmo.lua in my
> project, running 'lua luma.lua' gives the following:
>
>
> lua: ./luma/re.lua:62: attempt to call field 'Ca' (a nil value)
> stack traceback:
>        ./luma/re.lua:62: in main chunk
>        [C]: in function 'require'
>        luma.lua:2: in main chunk
>        [C]: ?
>
> I'm a bit surprised that it packages re.lua and cosmo.lua, are those
> just specific versions or are they customized? They definitely differ
> from the ones installed on my system.
>
> I tried using the development version, but kept getting errors when
> trying to download it with darcs.
>
> Is anyone using luma that can help me find out what's going wrong?
>
>    henk
>
>