ParseTree 3.0.3 Released

ParseTree version 3.0.3 has been released!

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

On Tue, Jan 20, 2009 at 9:38 PM, Ryan D. [email protected]
wrote:

integers.
becomes:
[:return, [:lit, 0]]]]]

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

704 tests, 3411 assertions, 0 failures, 0 errors

Regards,

On Jan 20, 2009, at 16:00 , Luis L. wrote:

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

704 tests, 3411 assertions, 0 failures, 0 errors

awesome! thank you!

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

How is CygWin doing?

On Jan 21, 3:54 pm, Phlip [email protected] wrote:

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

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 :slight_smile:

On Jan 21, 2009, at 11:08 , Luis L. wrote:

On Jan 21, 3:54 pm, Phlip [email protected] wrote:

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

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 :slight_smile:

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?

On Jan 21, 2009, at 11:43 , Phlip wrote:

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

There is no ruby 1.9 ParseTree.

On Jan 21, 5:13 pm, Ryan D. [email protected] wrote:

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

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.

On Jan 21, 5:42 pm, Phlip [email protected] wrote:

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.

Luis L. wrote:

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 :slight_smile:

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?)