1 2 grammar t058rewriteAST54; 3 options {language=JavaScript;output=AST;} 4 tokens {VAR;} 5 a : first=ID others+=ID* -> $first VAR $others+ ; 6 op : '+'|'-' ; 7 ID : 'a'..'z'+ ; 8 INT : '0'..'9'+; 9 WS : (' '|'\n') {$channel=HIDDEN;} ;