Nick Sieger and I (well, mostly Nick) were looking at the XRuby grammar at
RubyConf. We generated a Java parser and compared it with our current YACC
(Jay) based version. It wasn't much faster, unfortunately, but it would be
much easier to work with and use for other projects. In addition, it avoids
our hand-written (ported from C) lexer, which is a nasty bit of code. We
did not do anything to confirm it was parsing correctly, however, so that
would probably be the next step.
Antlr is not famous for its speed:) In fact, quite a few folks from yacc
backgound are disappointed by its speed. Antlr v3 seems to be faster.
Nick made a few minor changes to the XRuby grammar and got it to work with
AntlrWorks, which is Antlr v3-based. I do not believe he tried to generate
a parser with v3.
I would like to do a v3 parser, but won't start myself unless v3 is out of
beta and has documentation ready. Terence(ANTLR's dictator) is very quiet
since school started, so it does not look like he is going to finish
something soon. If everyone else want to do it I would be very happy to
help.
Others do not believe there is value in JRuby pursuing a change of grammar
or parser at this time. I believe they are wrong, so I'm very interested.
Even if the resulting parser was inappropriate or too much work to use for
JRuby at runtime, it would still be useful for IDE work, compiler work,
etc.
I agree, and will be very glad to see rubyfront is useful for other people.
I always want to document more about the tricks of parsing ruby, but do not
have time:( So if anyone has any questions just shoot me an email.
_________________________________________________________________
Find a local pizza place, music store, museum and moreĀ
then map the best
route! http://local.live.com?FORM=MGA001
_______________________________________________
Rubygrammar-grammarians mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rubygrammar-grammarians