[antlr-interest] Passing values in tree walker

Terence Parr parrt at cs.usfca.edu
Wed Sep 3 22:34:09 PDT 2003


On Wednesday, September 3, 2003, at 10:32  PM, Mike Jones wrote:

> Terence,
>
> I feel stupid!
>
> Ok, so to reference it:
>
> Expr2
> {
> 	int i2;
> }
> : expr[i2]
> ;
>
> I tried that and the resulting code fails because it only calls with 
> the
> AST parameter.
>
> Any suggestion?

Hmm...must be a rule name issue...that is the way I pass arguments all 
the time. :)  I'll bet you can check the java.g grammar from the site 
and you'll see me building trees by passing info down into other rules. 
  Could be a weird syntax gotcha too.

Terence
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com link sharing, pure-n-simple




 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list