From: Ryan Davis Date: 2011-05-17T09:50:35+09:00 Subject: Re: canonical/syntax-diagrams representation. On May 16, 2011, at 16:20 , Clifford Heath wrote: > You can get railroad diagrams from ANTLRworks for any ANTLR > grammar. However they (and syntax-directed editors in general) > are much less effective for languages that require significant > look-ahead.If you manage to make an ANTLR grammar for Ruby, > I'll be a little amazed (though it's definitely possible) > and you'll be a hero in here. But it's a massive task. > The LALR-based grammar for Ruby has many context-sensitive > areas which rely on large look-ahead. Well, given that Terr gave up on the antlr ruby grammar, I'm not sure how possible it is (versus how much of a time sink it is). To the OP's benefit, Ruby's grammar is a fucking mess. There are some constructs in ruby that make LL parsing problematic. Getting bison2antlr to work on ruby's parse.y is a chore, and even then you need to do a LOT of work to get the left recursion worked out of it. Until you do, the railroad diagrams are pretty much useless. While I assume that the OP is trolling with that first paragraph, I can't be sure... I think that a lot of the responses in this thread shouldn't have been made. It's one thing when you're Ilias, but in this case we really can't be sure. Robert and Stu's responses were fine examples of how we shouldn't behave.