[ANN] ParseTree 3.0.3 Released

R

Ryan Davis

ParseTree version 3.0.3 has been released!

* <http://rubyforge.org/projects/parsetree/>
* <http://www.zenspider.com/ZSS/Products/ParseTree/>
* <[email protected]>

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.3 / 2009-01-20

* 4 bug fixes:

* Added gauntlet_parsetree.rb. Bug finding/fixing much faster &
easier now.
* Fixed alias tests for r2r. Added masgn and heredoc tests.
* Fixed conflicting flags (-u vs -r).
* Unwrap RHS from array IF it is only a splat node.

* <http://rubyforge.org/projects/parsetree/>
* <http://www.zenspider.com/ZSS/Products/ParseTree/>
* <[email protected]>
 
L

Luis Lavena

ParseTree version 3.0.3 has been released!

* <http://rubyforge.org/projects/parsetree/>
* <http://www.zenspider.com/ZSS/Products/ParseTree/>
* <[email protected]>

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 =3D=3D 0 then
return 1
end
return 0
end

becomes:

[:defn,
:conditional1,
[:scope,
[:block,
[:args, :arg1],
[:if,
[:call, [:lvar, :arg1], :=3D=3D, [:array, [:lit, 0]]],
[:return, [:lit, 1]],
nil],
[:return, [:lit, 0]]]]]

Changes:

### 3.0.3 / 2009-01-20

* 4 bug fixes:

* Added gauntlet_parsetree.rb. Bug finding/fixing much faster &
easier now.
* Fixed alias tests for r2r. Added masgn and heredoc tests.
* Fixed conflicting flags (-u vs -r).
* Unwrap RHS from array IF it is only a splat node.

* <http://rubyforge.org/projects/parsetree/>
* <http://www.zenspider.com/ZSS/Products/ParseTree/>
* <[email protected]>

Just added Windows binaries compatible with One-Click Installer to RubyForg=
e:

704 tests, 3411 assertions, 0 failures, 0 errors

Regards,
--=20
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exup=E9ry
 
P

Phlip

Just added Windows binaries compatible with One-Click Installer to RubyForge:

How is CygWin doing?
 
L

Luis Lavena

How is CygWin doing?

If you have installed the build tools (gcc and such) then using
RubyInline and ParseTree shouldn't be much problem for you.

Slow, yes, but maybe not lot of problems :)
 
R

Ryan Davis

If you have installed the build tools (gcc and such) then using
RubyInline and ParseTree shouldn't be much problem for you.

Slow, yes, but maybe not lot of problems :)

why is it slow? I did it once on a whim and didn't notice a
compilation time iirc... does it not cache the dll?
 
P

Phlip

Luis said:
If you have installed the build tools (gcc and such) then using
RubyInline and ParseTree shouldn't be much problem for you.

Slow, yes, but maybe not lot of problems :)

When I tried (please don't ask me to reproduce the bug because I have moved on,
and it should be easy), RubyInline kept getting stuck trying to rewrite its
library at ~/.ruby_inline/blah_RubyInline_blah.so.

The blah is not important because the root problem was something left zombie
ruby.exe processes in memory - they apparently locked their previous .so files.

(And will Ruby1.9's ParseTree use RubyInline or Ripper?)
 
L

Luis Lavena

why is it slow? I did it once on a whim and didn't notice a  
compilation time iirc... does it not cache the dll?

Ruby cygwin is sensible slower than native (mingw based) Ruby.
 
L

Luis Lavena

When I tried (please don't ask me to reproduce the bug because I have moved on,
and it should be easy), RubyInline kept getting stuck trying to rewrite its
library at ~/.ruby_inline/blah_RubyInline_blah.so.

Well, cannot say about cygwin, I don't have it installed nor plan to
do it.
The blah is not important because the root problem was something left zombie
ruby.exe processes in memory - they apparently locked their previous .so files.

Ah, that Windows IO. file descriptors open (zombies) locks the files,
and you cannot remove or anything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top