[antlr-interest] Tree walking Q
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:
>From: antlr-interest-bounces at antlr.org
>[mailto:antlr-interest-bounces at antlr.org]On Behalf Of
>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
>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
>solution to me.
More information about the antlr-interest