Ben Gruver | 324c464 | 2011-11-15 16:02:09 -0800 | [diff] [blame] | 1 | grammar t023scopes; |
2 | |||||
3 | options { | ||||
4 | language=Python; | ||||
5 | } | ||||
6 | |||||
7 | prog | ||||
8 | scope { | ||||
9 | name | ||||
10 | } | ||||
11 | : ID {$prog::name=$ID.text;} | ||||
12 | ; | ||||
13 | |||||
14 | ID : ('a'..'z')+ | ||||
15 | ; | ||||
16 | |||||
17 | WS : (' '|'\n'|'\r')+ {$channel=HIDDEN} | ||||
18 | ; |