Using both global and local (rule) attribute scopes

Skip to end of metadata
Go to start of metadata

It is possible to use both global and local (rule-level) scopes together in ANTLR v3 but you have to get the order right: global scopes come after local scope but before @init.

To use more than one global scope, specify them in a comma-delimited list:

(Adapted from mailing list post by Jim Idle)

Labels: