安装Haeleth RLdev时出错:
$ ./configure && omake
........
File "pa_matches.ml", line 24, characters 2-6:
Parse error: Deprecated syntax, the grammar module is expected
Error while running external preprocessor
Command line: camlp4 pa_o.cmo pa_op.cmo pa_extend.cmo q_MLast.cmo pr_dump.cmo 'pa_matches.ml' > /home/.../tmp/ocamlpp4e8738
*** omake error:
File rlc/OMakefile: lines 26:4-27:88
command terminated with code 2: ocamlc -c -pp 'camlp4 pa_o.cmo pa_op.cmo pa_extend.cmo q_MLast.cmo pr_dump.cmo' -I /usr/lib/ocaml/camlp4 gramlib.cma pa_matches.ml -o pa_matches.cmo
文件pa_matches.ml
仅包含以下代码:
Line 22: open Pcaml
Line 23: EXTEND
Line 24: expr: LEVEL "expr1"
Line 25: [[ v = expr; "matches"; p = patt -> <:expr< match $v$ with [ $p$ -> True | _ -> False ] >> ]];
Line 26: END
在INSTALL文件中指定了OCaml版本3.09但安装了4.01。
答案 0 :(得分:0)
OCaml 3.09与OCaml 4.01不兼容。这尤其适用于camlp4。使用OCaml 3.10,引入了一个新的,向后不兼容的camlp4版本。
这可能就是为什么pa_matches.ml无法编译的原因。它使用旧的camlp4。