lua-users home
lua-l archive

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


On 1 August 2015 at 13:46, Christian Thaeter <ct@pipapo.org> wrote:
> Otherwise, in the long run I would prefer a much saner
> macro/metaprogramming solution, Think about metalua, maybe a 'little'
> less features but some way to hook into the parse tree and manipulate
> it at compile-time with lua code itself would be close to awesome.
> possibly ravi's type system and some optimizers could be implemented
> in this way already.
>

It is my hope that one day I will have new (alternative) parser /
compiler infrastructure for Lua that generates ASTs and allows all
kinds of tooling & optimizations. Lua's existing parser is designed
for speed and memory efficiency - so it is harder to extend it. In
fact I have not yet seen an independently implemented parser / byte
code generator for Lua - everyone seems to just port and enhance the
official versions. In my case I did the same for 2 reasons: a) I can't
beat the current implementation when it comes to speed and memory
efficiency, and b) the code generation is quite hard to follow, so I
am not yet sure I understand how it works even after 6 months (but
then maybe writing my own will solve this!).


Regards
Dibyendu