[Jruby-extras-devel] JParseTree initial release

Charles Oliver Nutter charles.nutter at sun.com
Mon Jan 15 19:15:42 EST 2007

Werner Schuster (murphee) wrote:
> Charles Oliver Nutter wrote:
>> Nick Sieger wrote:
>>> Cool!  Now if we could only get JParseTree to be picked up instead of 
>>> ParseTree in gem dependencies -- things like ruby2ruby and heckle would 
>>> just work :)
>> Unfortunately that's not the case now, nor will it be in the future :( 
>> We already have incompatibilities in our AST (RootNode, for example) and 
>> we will have more in the future (we're changing the order of IterNode 
>> and all its usual children to better match the actual evaluation order). 
>> So anything that depends on a specific structure for the AST is going to 
>> break as a result.
> Charles,
> JParseTree generates the same data structures as ParseTree does for the
> same Ruby source. JParseTree already uses some hacks to make turn the
> JRuby AST into ParseTree compliant code.
> Think of the ParseTree output as a common AST format for Ruby code.
> This is the big benefit of using (J)ParseTree s-exprs for analysis tools
> - they're indpendent of the JRuby version and can be used with all Ruby
> VMs or parsers that have a xParseTree implementation.

Ahh, I wasn't aware of that. Well if we can keep JParseTree up-to-date 
such that it can translate JRuby's evolving AST into a form other 
ParseTree consumers can support, then there should be no issues.

And on the dependency angle, I think what's needed is a way to get the 
ParseTree maintainers (Ryan Davis, yes?) to include as the "java" 
platform version JParseTree under the covers. Then when gems are 
installing users will be able to select "java" if they're using JRuby.

More information about the Jruby-extras-devel mailing list