Using Ripper Could be used to implement macros in Ruby? Interface documented in ripper.y Examples can be found on Rubyforge