1grammar t034tokenLabelPropertyRef; 2options { 3 language = Python3; 4} 5 6a: t=A 7 { 8 print($t.text) 9 print($t.type) 10 print($t.line) 11 print($t.pos) 12 print($t.channel) 13 print($t.index) 14 #print($t.tree) 15 } 16 ; 17 18A: 'a'..'z'; 19 20WS : 21 ( ' ' 22 | '\t' 23 | ( '\n' 24 | '\r\n' 25 | '\r' 26 ) 27 )+ 28 { $channel = HIDDEN } 29 ; 30 31