2
我想寫一個標記,但我發現了一個解析錯誤:andthen奧茲關鍵字
%*************************** parse error ************************
%**
%** syntax error, unexpected T_DEFAULT, expecting T_then
%**
%** in file "/Users/xxx/Programmering/Oz/Oving1/Oz_oving1_task8.oz", line 15, column 36
%** ------------------ rejected (1 error)
下面的代碼,我已經打上%=錯誤=%
15行和列36declare
fun {Tokenize L}
Keys Ops Token
in
Keys = ["local", "in", "if", "then", "else", "end"]
Ops = ["+", "-", "*", "/"]
case Tokenize of Head|Tail then
if {Member Head Keys} then
Token = key(Head)
elseif {Member Head Ops} then
Token = op(Head)
else
case Head of Forste|_ then
if Forste >= &a andthen Forste <= &z then % THIS IS LINE 15, COLUMN 36 = ..andthen [here]Forste..
Token = atom(Forste)
elseif
Forste >= &A andthen Forste <= &Z then
Token = id(Forste)
end
end
Token | {Tokenize Tail}
end
else
nil
end
end
任何想法我做錯了什麼?