[antlr-interest] Tree walking Q

Mark Bednarczyk voytechs at yahoo.com
Fri Jun 10 08:43:37 PDT 2005


I'm no expert, but the following article from a real expert
addresses your question:

http://www.antlr.org/article/1100569809276/use.tree.grammars.tml

Cheers,
mark...

>-----Original Message-----
>From: antlr-interest-bounces at antlr.org
>[mailto:antlr-interest-bounces at antlr.org]On Behalf Of
>Andy Tripp
>Sent: Friday, June 10, 2005 11:08 AM
>To: antlr-interest at antlr.org
>Subject: [antlr-interest] Tree walking Q
>
>
>Sorry for trolling, but...
>Why not just walk the tree "by hand"? Just have a
>method that takes an
>AST parameter,
>and checks its type. If it's a type you want to
>handle, do your thing.
>If not, make recursive calls
>for each of the children. That seems like the cleanest
>and easiest
>solution to me.
>
>Andy
>
>
>




More information about the antlr-interest mailing list