That's handy to know !

Just added it to the FAQ...
http://www.antlr.org/wiki/display/ANTLR3/Using+both+global+and+local+%28rule%29+attribute+scopes

Michael

On 23 February 2011 06:15, Jim Idle <[email protected]> wrote:
> grammar t;
>
> scope GlobalOne {
>  int c;
> }
>
>
> rulename
>
> scope
> {
>        bool localFlag;
> }
> scope GlobalOne;
> @init
> {
>        fred = 1;
> }
>
>        : C ;
>
>
> C : 'C';
>
> Globals come after locals but before @init.
>
> Jim
>

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to