[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Metatables for numbers
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 28 Jun 2008 18:19:20 -0300
> I was trying to use metatables to create a abstract syntax tree (AST)
> like lisp from lua code.
There's a similar example in the SPE paper:
See section "Using fallbacks", starting at "Another unusual facility
provided by fallbacks is the reuse of Lua's parser".
The code in that paper is for Lua 2.1 but it can be readily adapted for Lua 5.1.