DÅ?a Sobota 18 Február 2006 07:28 Phil T. napÃsal:
This seems applicable to JRuby (since it’s in ANTLR which is in Java).
Not necessarily, it should be useful for all sorts of toolchains - it’s
just
not possible to invoke it from a Ruby app. It might also be interesting
to
port this to pure Ruby once the ANTLR Ruby backend matures. (Correct me
if
already did since I last checked.) Having a proper Ruby parser in Ruby
might
make writing tools like RDoc much easier.
On Sat, 2006-02-18 at 23:46 +0900, David V. wrote:
Not necessarily, it should be useful for all sorts of toolchains -
it’s just not possible to invoke it from a Ruby app. It might also be
interesting to port this to pure Ruby once the ANTLR Ruby backend
matures. (Correct me if already did since I last checked.)
I think it’s pretty mature now actually, though I haven’t played with
it. The Ruby backend is part of ANTLR v3, though. yawl’s grammar is
for v2.
Martin (the author of the v3 Ruby backend) has a partial v3 Ruby grammar
in TRGP SVN now; I don’t know whether we’ll ultimately polish that up,
or port yawl’s grammar to v3. At the moment, Ter’s leaning towards the
latter, as it’s more complete. But we’ll see how it goes.
Having a proper Ruby parser in Ruby might make writing tools like RDoc
much easier.
That’s the plan. Not to mention Ruby implementations like JRuby.
I’ve actually got some evil ideas for a Ruby-in-Javascript
implementation (Ruby in the browser, yay!), but I’m not touching that
one until we have a decent parser waiting in the wings.
DÅ?a Sobota 18 Február 2006 20:38 Phil T. napÃsal:
Quite true. It’s been our ‘holy grail’ for several years now. I was not
aware taht ANTLR could generate a pure Ruby parser.
…of course there is Ripper (not sure what the current status is) and
other similar projects like ParseTree, nodeTree, etc.
Not to diss all those projects, but ANTLR has that “major” ting to it.
Even if
we had other flawless pure ruby parsers, having an ANTLR grammar around
for
all manners of “Ruby in not-Ruby” weirdness seems to definately to have
perks
by itself.
I wonder if mental is petting a white persia cat plotting his evil
plan…
David V.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.