1
2 grammar t058rewriteAST34;
3 options {language=JavaScript;output=AST;}
4 tokens {BLOCK;}
5 a : b b^ ; // 2nd b matches only an INT; can make it root
6 b : ID INT -> INT ID
7 | INT
8 ;
9 ID : 'a'..'z'+ ;
10 INT : '0'..'9'+;
11 WS : (' '|'\n') {$channel=HIDDEN;} ;