lua-users home
lua-l archive

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



Try Hisham's luatoc at http://www.inf.puc-rio.br/~hisham/ .


Thank you, this absolutely looks promising.

It does...interesting reading. One non-trivial problem I can see, however, is that the converted code doesn't (yet) support tail calls. The TAILCALL opcode is "downgraded" and rendered using a CALL.

If you have any constructs which rely on tail calls, such as state machines, then you are in some sort of trouble.

There are libraries for implementing proper tail calls in C, of course. For example:

www.complang.tuwien.ac.at/schani/diplarb.ps

So it should be "easy enough" to implement TAILCALL if you need to :-)