From: Ryan Davis Date: 2005-02-16T02:36:47+09:00 Subject: Re: [ANN] ruby-ast-c++ 0.0.1 On Feb 15, 2005, at 1:39 AM, Phil Tomson wrote: >> I've got a C99 (not C++) AST-constructor if you're interested too. >> Pure ruby (right down to the lexer) though, so pretty slow at the >> moment. The AST nodes are of different Node classes rather than just >> being nested arrays. You can also use it to parse snippets (e.g., >> just a statement or a type name or something). >> >> If you're interested. > > > Yes, please share. These sorts of things could really help us to > translate the Ruby C libs into pure Ruby. I don't think that is the case actually. There is just far too much going on on the C side that isn't necessary once ported to ruby. We hand translated a smallish C file and it dropped about 40% off the size. What we CAN do with it is make another feeder into the ruby2c tool chain and play with making more analysis tools. I'd LOVE to have something that can do the C family so I can extend parse_tree_abc and do complexity metrics on C (and with some work objective-c) code. This can help us identify the stickier files and get cracking on those first (or at least help people decide if they want to take a crack at it :). -- ryand-ruby@zenspider.com - Seattle.rb - http://www.zenspider.com/seattle.rb http://blog.zenspider.com/ - http://rubyforge.org/projects/ruby2c