[antlr-interest] Re: Translators Should Use Tree Grammars

Alexey Demakov demakov at ispras.ru
Tue Nov 23 07:34:11 PST 2004


> > > I don't want to "walk the tree", I want to "search the tree for
> patterns
> > > and make replacements".
> > 
> > That's exactly what a tree walker gives you.
> 
> But only matching at a particular point in the walking of the
> tree, right? In other words, I can't just say "match this pattern
> anywhere in the AST", I have to put the pattern at a particular
> place in the grammar (or put that action at each and every
> node in the grammar). Or Am I missing something?

But if this pattern contains some node reference, it can be placed
only in particular place in grammar - where that node is referenced :)
And I think that most of reasonable patterns are linked to some node...

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