构造一个中缀表达式到后缀表达式的翻译器 表达式文法及其翻译模式定义如下: expr expr + term {print(‘+’)} | expr - term {print(‘-’)} | term term term * factor {print(‘*’)} | term / factor {print(‘/’)} | factor factor ( expr ) | id {print(id.lexeme)} | num {print(num.value)}