[antlr-interest] Global scope syntax and the C# target

Gavin Lambert antlr at mirality.co.nz
Tue Sep 18 18:17:05 PDT 2007


At 09:56 19/09/2007, Johannes Luber wrote:
 >I'm trying to access the stack size of a global scope, but it 
seems
 >that my syntax is wrong. "$RuleScope.size()" isn't translated, 
neither
 >"$RuleScope.Size()" nor "$RuleScope.Size". What should I use?

http://www.antlr.org/wiki/display/ANTLR3/Special+symbols+in+actions

To access things in the scope you need double-colons.  I'm not 
sure if you can get the stack size, though.  That may depend on 
your target language.



More information about the antlr-interest mailing list