标签:bnf范式 优先级
the science of programming 的三点1. <expr>:=<expr_imp> 2. |<exper>-<expr_imp> 3. <expr_imp>:=<factor> 4. |<expr_imp>*<factor> 5. <facotr>:=(<expr>) 6. |<identifer>
matchExpr(){ while(testNext()=EOF){ matchExper_imp() if ! matchMinus() return } mathcExper_imp() } matchExpr_imp(){ while(testNext()=EOF){ matchFactor() if ! matchMulti() return } mathcFactor() } matchFactor(){ if test()=="(" matchLeftPar() matchExpr() mathcRightPar() else if test() == number matchIdenti() else error }
the science of programming BNF范式的优先级
标签:bnf范式 优先级
原文地址:http://blog.csdn.net/dexter_morgan/article/details/41513723