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