| Refresh | Home EGTry.com

reorde tokens by rewrite


antlr token rewrite

prog: 'var' ID ':' type ';' -> type ID
  ;

type: 'int' | 'string';

ID: ('a' .. 'z' | 'A' .. 'Z')+;
WS: (' '|'\r'|'\n') {$channel=HIDDEN;};


input

var number:int;


Output

int number