[antlr-interest] can I use Dynamic Attribute Scope and global scope together?

YINGAnnie yimm8369 at hotmail.com
Tue Mar 31 10:37:38 PDT 2009


 

 

Hi all,

 

I have a global scope 

 

scope Symbols {
  List names;
}

 

In the rule statement, I used the global scope:

 

statement
scope Symbols;
@init{ level++;
    $Symbols::names = new ArrayList();
}

 

But I also want to use Dynamic Attribute Scope in the statment, so I do the following:

 

scope {Symbols;
List out;
}

 

 

But the error said :

java.lang.Error: Unresolved compilation problem: 
Syntax error on token "Symbols", VariableDeclarator expected after this token

 

So how to use them together?

 

 

Thanks,

Annie

 

 

_________________________________________________________________
梦幻K图,百变造型,让你的照片与众不同,快来MClub试试吧!
http://club.msn.cn/?form=3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090401/e8e0a383/attachment.html 


More information about the antlr-interest mailing list