Hi,

On Sun, 20 Aug 2006 17:39:40 +0200, Jonathan Maasland <nochoice / xs4all.nl>  
wrote:

> Thanks for the reply but I'm a bit at a loss here. I'm a total noob  
> regarding Ruby's compilation process so I'm sorry if this is a stupid  
> question but if I have bison available why should I not be able to  
> compile Ripper against 1.8?

I don't know how to get Ripper working, but depending on what you want to  
do, there might be better solutions like RubyNode or ParseTree.

For example with RubyNode (http://rubynode.rubyforge.org/) you can do:

>> pp "3.times { puts 'Ruby' }".parse_to_nodes.transform
[:iter,
  {:var=>false,
   :iter=>[:call, {:args=>false, :mid=>:times, :recv=>[:lit, {:lit=>3}]}],
   :body=>[:fcall, {:args=>[:array, [[:str, {:lit=>"Ruby"}]]],  
:mid=>:puts}]}]
=> nil

The only thing that RubyNode or ParseTree won't give you are the comments  
and whitespace in the code.


Dominik