I remember there was some interests here about analyzing Ruby programs
with MOOSE, and apparently there is a complete Ruby parser done with
SmaCC (Smalltalk/X version):
https://swing.fit.cvut.cz/projects/smallruby
Look inside the svn repository to find the code. I dunno the licence.
Regards,
--
Serge Stinckwich
UCBN & UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/