然后是Oz关键字

我正在尝试编写一个tokenizer,但是我得到一个解析错误:
%*************************** 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行和第36列,%= ERROR =%
declare
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
知道我做错了什么吗?     
已邀请:
我找到了解决方案: 我的列表在每个元素之间应该有空格而不是逗号(
,
)。 在奥兹,你像我一样写
>= andthen =<
而不是
>= andthen <=
>
=
的错误一侧)。 我在
Tokenize
上做了一个
case
case
应该在输入
L
上。 干杯!     

要回复问题请先登录注册