1grammar t023scopes;
2
3options {
4    language=JavaScript;
5}
6
7prog
8scope {
9name
10}
11    :   ID {$prog::name=$ID.text;}
12    ;
13
14ID  :   ('a'..'z')+
15    ;
16
17WS  :   (' '|'\n'|'\r')+ {$channel=org.antlr.runtime.BaseRecognizer.HIDDEN;}
18    ;
19