[antlr-interest] ANTLR IDE 2.0.0 railroad diagrams

Edgar Espina espina.edgar at gmail.com
Tue Feb 23 14:38:56 PST 2010


Hi Graham,

>> Now the challenge is to get the railroad diagrams to wrap :-).

I've already working on that. The problem is were to wrap?

>>Wouldn't the single-quoted dot just match literal dots only?  Or is dot
special inside single-quote strings (ie:
>> STRING_LITERAL)? But if that was the case, then shouldn't that special
aspect of dot show up in the
>> STRING_LITERAL grammar?

Yes, dot(.), predicates({}?,()=>) and not(~) need more work. Any more
thoughts on those constructions are really welcome. (May be we could just
use a different "color" for those.)

>>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.
They seems ok to me, but I understand why you don't like them. I will try to
add a layout option for that.

>>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.
I agree with you, if you unselect the optimize button you get the "other"
visualization option.


Thank you for all your suggestions.

edgar

On Tue, Feb 23, 2010 at 5:30 PM, Graham Wideman <gwlist at grahamwideman.com>wrote:

> 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
>
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>



-- 
edgar


More information about the antlr-interest mailing list