1grammar t030specialStates;
2options {
3  language = Python3;
4}
5
6@init {
7self.cond = True
8}
9
10@members {
11def recover(self, input, re):
12    # no error recovery yet, just crash!
13    raise re
14}
15
16r
17    : ( {self.cond}? NAME
18        | {not self.cond}? NAME WS+ NAME
19        )
20        ( WS+ NAME )?
21        EOF
22    ;
23
24NAME: ('a'..'z') ('a'..'z' | '0'..'9')+;
25NUMBER: ('0'..'9')+;
26WS: ' '+;
27