lua-users home
lua-l archive

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


On Sat, Sep 7, 2013 at 12:31 AM, Hisham <h@hisham.hm> wrote:
> On 6 September 2013 15:22, Alexander Gladysh <agladysh@gmail.com> wrote:
>> Hi, list,
>>
>> A lazy question here.
>>
>> I need to build Lua 5.1 AST for a bunch of files — as a bunch of
>> nested plain Lua tables.
>>
>> I.e., more or less, what Metalua does.
>>
>> I do not need that library to do anything with these tables — I'll
>> manage that myself (but I can just ignore extra functionality, no
>> problem — as long as it is not too bloated).
>>
>> Last time I looked (several years ago), Metalua was not a very clean
>> solution (if I remember correctly). I would like a plain Lua 5.1 code,
>> supported by LuaJIT, installable as a neat and self-contained rock,
>> which would not affect anything in my environment and do what it is
>> told.
>>
>> I see that several new libraries appeared on a horizon, and Metalua
>> itself moved on a bit.
>>
>> Is there something out there that will suit my desires? Or what I can
>> adapt reasonably well?
>
> Not sure if it does what you want, but did you check out Leg? It has a
> Lua 5.1 grammar in LPeg, and it's available as a rock.

I did not (for reasons mentioned below), but I will. As I said, this
is a lazy question :-)

But projects which were not updates since luaforge demise make me
worry. Also, this project depends on LPeg and was not updated after
LPeg was rewritten by Roberto — which is a bad sign too.

...Well I'm looking at the Leg docs now, but I do not see AST-related
stuff. Looks like I'd have to build it myself if I will go with Leg.
Is there anything higher-level out there?

Alexander.