Hi,

As you know, I've been playing with Lua for some time now, and my attempt to write a Lua compiler targetting Parrot has not been completely unsuccessful, but it was quite some work.

Anyway, at some point I realized that PIR looks very much like Lua bytecodes (which I had inspected at that time already). So, I thought it may be a nice project to write a Lua2PIR translator, which takes a binary Lua file (compiled with the Lua compiler, so you'll need to get Lua (to be found at www.lua.org))

If you are interested, it can be found at

   http://members.home.nl/joeijoei/lua2pir/

It works pretty good. It needs still many tests, in order to check if all special cases are covered, but quite complex examples do work already. Furthermore, the Lua PMCs have to be integrated, as it just uses the Parrot basic types (Float, String, Hash, etc). It's also nice to see what kind of code the Lua compiler should more or less be generating.

Kind regards,

Klaas-Jan Stol



Reply via email to