[antlr-interest] tree walker executes method call twice?

Rob Dougan rob_dougan at sympatico.ca
Tue Aug 18 14:32:52 PDT 2009


doh! reset dupes the tree
 


From: rob_dougan at sympatico.ca
To: jimi at temporal-wave.com
Date: Tue, 18 Aug 2009 21:18:56 +0000
CC: antlr-interest at antlr.org
Subject: Re: [antlr-interest] tree walker executes method call twice?



 
pass 1 - lex/parse produces heteroAst (nil root)
pass 2 - heteroAst  into symbol table walker 
nodes reset
pass 3 - heteroAst into type checking walker  (adds type info to ast)  ---> walks twice
 
its just a typical expression tree (C-like), the function call (abs(1.0)) is the smallest statement I could get to fail
but
the tree walker always walks the input twice ... almost like the tree was duplicated
hmmm
will continue investigating ... 
 
R


Date: Tue, 18 Aug 2009 12:58:43 -0700
From: jimi at temporal-wave.com
CC: antlr-interest at antlr.org
Subject: Re: [antlr-interest] tree walker executes method call twice?

Rob Dougan wrote: 


 
during testing i noticed that my tree walker seems to be walking the tree twice ...
  
anyone spot a grammar problem?
  
What does the input tree look like?

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090818/e4a3967f/attachment.html 


More information about the antlr-interest mailing list