1 2 grammar t058rewriteAST39; 3 options {language=JavaScript;output=AST;} 4 a : atom -> {this.adaptor.create(INT,"9")} atom ; 5 atom : INT ; 6 ID : 'a'..'z'+ ; 7 INT : '0'..'9'+; 8 WS : (' '|'\n') {$channel=HIDDEN;} ;