| Refresh | Home EGTry.com

omit some tokens by rewrite


rewrite grammar

prog: DIGIT '+' DIGIT ';' -> DIGIT DIGIT;


DIGIT: '0' .. '9';
WS: (' '|'\r'|'\n') {$channel=HIDDEN;};


input

9+9;


output tree

root ->9
     ->9