所以我有这个功能:
fun propagate (Num a) = Num a
| propagate (Var x) = Var x
| propagate (BinOp(f, Num a, Num b)) =
case f of PLUS => Num (a+b)
| MINUS => Num (a-b)
| MULT => Num (a*b)
| DIV => if b<>0 then Num (a div b)
else raise CompileError
| propagate (BinOp(_,x,y)) = (BinOp(_,propagate(x), propagate(y));
我得到了这些语法错误:
stdIn:76.29-76.32 Error: syntax error: deleting EQUALOP LPAREN
stdIn:76.67 Error: syntax error found at SEMICOLON
任何人都可以帮我弄清楚出了什么问题吗?