A rule can have zero or one rule scopes, and zero or more global scopes.
You need to place the rule scope before any global scopes:
rule
scope { /*rule scope*/ }
scope GlobalScope1;
scope ClobalScope2;
: ...
;
Sam
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of The Researcher
Sent: Monday, February 28, 2011 6:16 PM
To: [email protected]
Subject: [antlr-interest] Can a ANTLR 3 rule have both a rule and global
scope?
When trying to use both a rule and global scope for a rule, ANTLR generated
errors. To get past the error all of the attributes were pused into the
global scope.
Just want to confirm that ANTLR 3 only allows a rule to have either a rule
or global scope but not both.
Thanks, Eric
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
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.