[grammarians] Visualization of Ruby's grammar

Nick Sieger nicksieger at gmail.com
Sat Oct 28 00:23:11 EDT 2006


On 10/27/06, Charles Oliver Nutter <charles.nutter at sun.com> wrote:
>
>
> So how far off from a usable grammar is what you fed to ANTLRWorks? Is
> this mostly a neat way to visualize the YACC grammar, or is this
> something usable? Anything that can reliably take the YACC grammar,
> massage it a bit, and produce a new ANLTR grammar out of that could be
> pretty useful.


Are you asking for a quick or automated way to (re-) generate the ANTLR 3
grammar from parse.y?  It could be done, if necessary, but it would be a
little painful.

As to whether this YACC-based grammar is usable, I'm not sure yet.  Extended
string handling (heredocs, expanded strings, quoting operators) aren't
present at all.  I still would like to compare it with Rubyfront's grammar
to see how much is missing, how they line up.  Maybe I'll see if I can get
this to actually parse Ruby code and I'll let you know how much of the Ruby
libraries it can handle.

/Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rubygrammar-grammarians/attachments/20061027/4466ffb1/attachment.html 


More information about the Rubygrammar-grammarians mailing list