RubyGems.org

ParseTree

3.0.6

ParseTree is a C extension (using RubyInline) that extracts the parse tree for an entire class or a specific method and returns it as a s-expression (aka sexp) using ruby's arrays, strings, symbols, and integers. As an example: def conditional1(arg1) if arg1 == 0 then return 1 end return 0 end becomes: [:defn, :conditional1, [:scope, [:block, [:args, :arg1], [:if, [:call, [:lvar, :arg1], :==, [:array, [:lit, 0]]], [:return, [:lit, 1]], nil], [:return, [:lit, 0]]]]]

installgem install ParseTree
Authors

Ryan Davis

36,024 total downloads 223 for this version
Versions
  1. 3.0.6 September 1, 2010
  2. 3.0.5 March 27, 2010
  3. 3.0.4 June 23, 2009
  4. 3.0.3 January 20, 2009
  5. 3.0.3 January 20, 2009 x86-mingw32
Show all versions (39 total)