Forum: Ruby ParseTree 3.0.0 Released

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ryan D. (Guest)
on 2008-10-23 07:26
(Received via mailing list)
ParseTree version 3.0.0 has been released!

* <>
* <>
* <removed_email_address@domain.invalid>

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

As an example:

   def conditional1(arg1)
     if arg1 == 0 then
       return 1
     return 0


       [:args, :arg1],
        [:call, [:lvar, :arg1], :==, [:array, [:lit, 0]]],
        [:return, [:lit, 1]],
       [:return, [:lit, 0]]]]]


### 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
   * PTTC: Made self.previous more overridable.
   * PTTC: Now all tests that have "mri_verbose_flag" activate $VERBOSE
   * PTTC: Officially added clone_same phase to generate_tests
   * 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 rewrite_op_asgn1 to ensure the arglist is an arglist.
   * UR: Flattened resbodies in rescue node.
   * UR: Flattened super and yield args yet, deal with array arg
   * 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
   * UR: Rewrote rewrite_resbody from scratch... MUUCH cleaner.
   * UR: zarray -> array
   * Used Hoe#add_include_dirs to clean up rakefile.
   * Moved PT dependent code from ruby2ruby to here (eg Proc#to_sexp &

* 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.

* <>
* <>
* <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.