[grammarians] Comparison to RubyFront grammar
Charles Oliver Nutter
charles.nutter at sun.com
Tue Oct 24 17:27:22 EDT 2006
MenTaLguY wrote:
> On Mon, 2006-10-23 at 23:49 -0500, Charles Oliver Nutter wrote:
>> - What's the state of the RubyGrammar project? How much code can it
>> parse today? (especially in light of the recent contributions)
>
> It's really sort of a meta-project, with our ultimate deliverable being
> a formal specification of the grammar, producing a useful ANTLR 3
> reference grammar as part of that process. We've got some incomplete
> parsers in SVN, but none of those are "the" RubyGrammar grammar at this
> point.
This sounds like what I've been pushing with the RubyTests project...a
place for disparate projects to start putting their efforts together.
RubyTests is now starting to take off, so it seems a good time for
RubyGrammar to reawaken.
>
>> - How does it compare to the RubyFront grammar? I'm no grammarian, but
>> at a glance that one appeared to be more complete, and was able to parse
>> the entire stdlib (though I have no idea about accuracy).
>
> The RubyFront grammar is by far the most complete of any of the ANTLR
> grammars I've seen.
>
>> - Is this project still being actively worked? If I have grammarians
>> interested in helping, should I point them at rubygrammar or rubyfront?
>> (I know of a few such folks inside and outside of Sun standing by)
>
> Well, RubyFront would certainly be a good basis, but as far as I know
> (Xue Yong Zhi, please correct me if I'm wrong), RubyFront is just a
> component of the XRuby project.
>
> If JRuby also plans to use it, then you should think about either
> merging JRuby and XRuby, or factoring RubyFront out into a separate
> project so that other Ruby implementation projects could use it easily
> (ZeroOneInfinity and all that).
>
A merge would be a much more complicated affair. JRuby does not have a
compiler, but has implemented almost all the core classes and there's a
prototype compiler already present. In addition I'll be working on a new
stack machine for uncompiled execution and continuing the Java compiler
after that. Factoring out RubyFront would almost certainly be the best
way to handle things, and would also free up the grammar for other projects.
> If you guys do feel it's best to factor out RubyFront, I'd be happy to
> provide the The Ruby Grammar Project, its SVN repository, and its
> mailing list as a home for the effort, and provide what material
> assistance I can, including making people project admins.
>
> I'm just here to facilitate this Ruby Grammar thing. As long as it gets
> done I'm not too particular about the details.
>
That would be great, if Xue agrees. I'd say this is the perfect place to
put such work, and we all can benefit from it.
--
Charles Oliver Nutter, JRuby Core Developer
headius at headius.com -- charles.nutter at sun.com
Blogging at headius.blogspot.com
More information about the Rubygrammar-grammarians
mailing list