lua-users home
lua-l archive

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


> However, I would like to know if there is a way for me to
> use Lua's load string,
> then get access to byte-compiled code  and then translate the
> bytecompile
> code into whatever I need

My old lua2c does that but I don't think that's what you need. I think
you need a source-to-source translator. Otherwise, you'd get stuck in
semantics mismatch. Try luac -l to see what kind of bytecode Lua uses.
 
> Wouldn't this be simpler for me to do (as then Lua takes care of lexing,
> parsing, etc)

If you want that, check out my lstrip (especially the -d option):
	http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lstrip