[antlr-interest] Re: SableCC tree stuff (Was: Antlr 3.0 spaces between tokens)

Alexey Demakov demakov at ispras.ru
Fri Nov 12 05:41:36 PST 2004


From: "lgcraymer" <lgc at mail1.jpl.nasa.gov>
> --- In antlr-interest at yahoogroups.com, Monty Zukowski <monty at c...> wrote:
> > On Nov 11, 2004, at 9:30 AM, Alexey Demakov wrote:
> > > I'm playing with SableCC tree, visitors and walkers and can't agree
> > > that generation of tree from grammar is good idea. Even if it is 
> > > heterogenous
> > > strictly-typed SableCC tree.
> > > I don't like tree node repetition because of grammar conflict 
> > > resolving.
> > > See java grammar example:
> > >
> > > AForStatement
> > > AForStatementNoShortIF
> > >
> > 
> > ANTLR doesn't make trees from the grammar, it lets you create Abstract 
> > Syntax Trees.  From this example it seems SableCC is creating parse 
> > trees, with a node for every rule, unlike ANTLR.
> 
> That's what Alexey was saying.  SableCC takes an LALR/parse tree
> approach to language translation, and he finds the ANTLR approach
> preferable.

It was criticizm of SableCC only, irrelative of ANTLR.
ANTLR doesn't provide much for heterogenous tree construction.
So I write these actions manually.

Regards,
Alexey

-----
Alexey Demakov
TreeDL: Tree Description Language: http://treedl.sourceforge.net
RedVerst Group: http://www.unitesk.com




 
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