[antlr-interest] ANTLR IDE 2.0.0 railroad diagrams

Graham Wideman gwlist at grahamwideman.com
Tue Feb 23 12:30:08 PST 2010


Edgar --

I'm really admiring the nice combination of Index, rules with railroad diagrams, and hyperlinks from diagram elements to their definitions elsewhere on the page.

http://antlrv3ide.sourceforge.net/resources/ANTLRv3/ANTLRv3.html

That said, as an appreciator of diagrams :-) I wonder what your thoughts are on the way your diagrams reverse the flow for elements that happen to be in a chain that's optional.  I know that's a style sometimes used, but personally I find this rather reduces the ease of reading.

For example, compare LITERAL_CHAR with DOUBLE_QUOTE_LITERAL_CHAR. The latter is very similar to the former, but with double quotes around it, and optional.  Yet the visual appearance is reversed, making it hard to quickly compare similarity and difference. Of course in this simple case it's not fatal, but in more complicated cases it gets more difficult.

That said, I do like seeing list separators in the optional "reverse" path -- that makes more sense to me than the method used in other conventions which essentially mimics the grammar in repeating the list item just to show the separator on second and subsequent optional occurrences.

Anyhow, just minor suggestions, should you be open to such input.

-- Graham



More information about the antlr-interest mailing list