ParseTree version 3.0.0 has been released!

| | Comments (0)

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]]]]]

Changes:

3.0.0 / 2008-10-22

  • 3 major enhancements:

    • Split out sexp_processor project.
    • ParseTree#process outputs a UnifiedRuby parse tree.
    • Switched all ParseTree tests to RawParseTree tests.
    • Added ParseTree tests.
    • Added UnifiedRuby#process.
  • 28 minor enhancements:

    • PTTC: Added a comprehensive suite of tests for every combo of defn args.
    • PTTC: Added a ton of new tests.
    • PTTC: Added extra tests for mri verbose flag testing (horrid horrid bug imhfo)
    • PTTC: Don't generate tests if class has "TestCase" in the class name.
    • PTTC: Made self.previous more overridable.
    • PTTC: Now all tests that have "mriverboseflag" activate $VERBOSE
    • PTTC: Officially added clonesame phase to generatetests
    • PTTC: Refactored test generation to make subclasses more flexible.
    • PTTC: Refactored to use new add_tests. Much much cleaner.
    • PTTC: Removed Unique from PTTC... subclasses need to deal with this
    • PTTC: Removed some stupid tests.
    • PTTC: Renamed a bunch of tests to be more uniform.
    • UR: Added rewrite_attrasgn to normalize arg array into arglist.
    • UR: Added rewriteopasgn1 to ensure the arglist is an arglist.
    • UR: Flattened resbodies in rescue node.
    • UR: Flattened super and yield args yet, deal with array arg properly.
    • UR: Handle yield(*ary) properly.
    • UR: Nuked argspush.
    • UR: Removed begin node from unified sexps.
    • UR: Removed block from rewritten resbody if only 1 element.
    • UR: Removed dasgn, dasgn_curr, and dvar nodes.
    • UR: Removed s(:block_arg, :block) in favor of :"&block"
    • UR: Rewrote argscat to be a splat inside an array.
    • UR: Rewrote block_pass into arglist of inner call/super.
    • UR: Rewrote call to ALWAYS have an argslist (no more splat as arglist).
    • UR: Rewrote rewrite_resbody from scratch... MUUCH cleaner.
    • UR: zarray -> array
    • Used Hoe#addincludedirs to clean up rakefile.
    • Moved PT dependent code from ruby2ruby to here (eg Proc#to_sexp & friends).
  • 2 bug fixes:

    • UR: Fixed a bug with resbody that starts with an lasgn.
    • UR: Fixed args for attrset
    • Fixed export of symbols to work across platforms.
  • http://rubyforge.org/projects/parsetree/

  • http://www.zenspider.com/ZSS/Products/ParseTree/
  • ryand-ruby@zenspider.com

Leave a comment

About this Entry

This page contains a single entry by zenspider published on October 22, 2008 8:14 PM.

RubyInline version 3.8.0 has been released! was the previous entry in this blog.

ruby2ruby version 1.2.0 has been released! is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 4.23-en