2011年4月13日
摘要: 文法,用BNF表示 <Expr> -> <Term> { (+|-) <Term> } <Term> -> <Factor> { (*|/) <Factor> } <Factor> -> (<Expr>) | num | indent | indent = <Expr> num 表示十进制实数 indent 表示标识符。标识符是由字母和数字构成的序列,第一个字符必须是字母 另外要求,Expr以';'结尾。 根据语法分析树的特点,位于低层的先被求值,也就是 阅读全文
posted @ 2011-04-13 13:07 yongmou- 阅读(1413) 评论(0) 推荐(0) 编辑