[antlr-interest] Re: ANTLR syntax diagram generator

atripp54321 atripp at comcast.net
Thu Mar 18 19:34:04 PST 2004


That's a neat tool.

What I've always thought would be a great tool for ANTLR newbies
would be a nice graphical syntax diagram editor, from which
the .g file is generated.

IMO, the biggest hurdle in learning ANTLR and related tools is
in trying to learn the syntax. Just take a typical
snippet:

constructorBody
    :   lc:LCURLY^ {#lc.setType(SLIST);}
            ( options { greedy=true; } : explicitC
onstructorInvocation)?
            (statement)*
        RCURLY!
    ;

To write these few lines, you need to understand many symbols:
":", "^", "{" and "}", "(" and ")", "?", "*", "!", ";"
and you have to know how to put them all together. Basically,
you need to hold the ANTLR syntax and grammar in your head while
you want to be focusing on your target syntax and grammar.

Wouldn't it be possible to build
a graphical syntax diagram editing tool that that hides
virtually all of the ANTLR syntax? Have a syntax diagram where
each node can be tagged with various symbols to indicate
"this LCURLY box gets an AST node" (the meaning of "^")
"this RCURLY box does not" ("!")
"the following code is associated with this LCURLY" ("{...}")
Using colors, shapes and icons on a visual graph 
rather than terse symbols inside a text file would be
much easier to visualize, I would think.

Just a thought.
Andy



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
     antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 



More information about the antlr-interest mailing list