On Wed, Jul 14, 2010 at 1:49 PM, Amadeu A. Barbosa Jr <[email protected]> wrote:
> I think that LuaFish isn't longer supported by David Manura, at least there 
> isn't no update
> since 2007.

Sort-of.  I think LuaFish should be updated to generate a MetaLua
compatible AST [1], whose design has been well thought out by Fabien,
so if you want to do that be my guest.  I just haven't gotten around
to it.  Most of the Lua parsing stuff I've since done [2], luaanalyze
included, has used the Metalua libraries instead (some using the
latest 0.5 git branch).  The Metalua parser is written in pure Lua,
which always works though should be less efficient than an LPeg
implementation.  IMO, it would be preferable if code like this that
needs to access a Lua AST could work identically with both pure Lua
and LPeg implementations of a source->AST translator, so that the user
could choose whichever implementation is preferred in terms of
performance and deployment criteria.

Note that Metalua's parser actually parses a more general grammar (gg)
to support syntax extensions in Lua.  Syntax extensions are not always
necessary, and it wasn't in [2].  luaanalyze, for example, recognizes
specially formatted comments in the source rather than relying on
syntax extensions.

> I didn't understand well
> the recent changes in LPeg stuff but I have tested some LuaFish examples 
> againts
> LPeg 0.8 and it works fine (we've noticed some problems using LuaFish 0.7 + 
> LPeg 0.9).

There have been some changes in LPeg.  Patches are welcome on the
LuaFish wiki page.  See also Leg [3].  That, like LuaFish, parses Lua
using LPeg.  However, out-of-the-box it doesn't generate an AST.  It
doesn't look like Leg has been updated recently either though.

[1] http://metalua.luaforge.net/manual006.html#toc17
[2] e.g. luaanalyze, lua2c, SourceOptimizer, and LuaInspect
[3] http://leg.luaforge.net/

_______________________________________________
Luarocks-developers mailing list
[email protected]
http://lists.luaforge.net/cgi-bin/mailman/listinfo/luarocks-developers

Reply via email to