5
我是新來OCaml的,我不知道爲什麼,這是給我一個語法錯誤:OCaml的語法錯誤
type ('nonterminal, 'terminal) pe =
| Empty
| T of t
| N of n
| Seq of list
| Choose of list
| Star of e
| Not of e;;
type ('nonterminal, 'terminal) pe_tree =
| Is_empty
| Leaf of t
| Node of (n,tree)
| Sequence of list
| Repeat of list
| Is_not of e;;
所有它的說法是,有一個語法錯誤就行14個字符0 -1(這是| Sequence of list
是),我不明白爲什麼!
謝謝!我很困惑,因爲我之前有另一個類型聲明(我剛剛添加到我的原始問題),它的編譯很好:/ – robocop 2011-01-23 00:40:43