> There are AFAIK at least two projects that convert Ruby code into 
> bytecode, I wonder how easy it would be to modify them so they emit 
> parrot bytecode? I admit I'm not clear about how they work.

One of these projects may be ByteCodeRuby [1]. Feel free to use
lib/bcr/compile.rb if it helps you and the licence (Ruby's) suits you.
Better to look in CVS rather than use the latest build, which is a
little old now.

However I'm not sure how good the fit will be. BCR works off a
DOM-style parser (Ruth) and compiles to a stack-based virtual machine.
It sounds like you might be using Ripper, which is SAX-style, and
compiling to Parrot, which is register-based.

-- George

[1] http://rubyforge.org/projects/bytecoderuby/