2.3 节的练习
摘要:
2.3 节的练习2.3.1构建一个语法制导翻译方案,该方案把算数表达式从中缀表达式翻译成前缀表达式。解答产生式:expr -> expr + term | expr - term | termterm -> term * factor | term / factor | factorfactor -> digit | (expr)翻译方案:expr -> {print("+")} expr + term | {print("-")} expr - term | termterm -> {print("*" 阅读全文
posted @ 2014-03-06 16:29 compilerTech 阅读(1344) 评论(0) 推荐(0) 编辑