Running Swig example for ocaml gives me this error message.
rm -rf swig.mli swig.ml swigp4.ml && ../../../preinst-swig -ocaml -co swig.mli 2>/dev/null && ../../../preinst-swig -ocaml -co swig.ml 2>/dev/null && ../../../preinst-swig -ocaml -co swigp4.ml 2>/dev/null && ocamlc -c swig.mli && ocamlc -c swig.ml && ocamlc -I ` camlp4 -where` -pp "camlp4o pa_extend.cmo q_MLast.cmo" -c swigp4.ml File "swig.ml", line 159, characters 54-57: Warning 20: this argument will not be used by the function. File "swigp4.ml", line 26, characters 2-6: Parse error: Deprecated syntax, the grammar module is expected File "swigp4.ml", line 1, characters 0-1: Error: Preprocessor error
The File "swigp4.ml", line 26, characters 2-6 has the following content.
EXTEND
Line 25: expr:
Line 26: [ [ e1 = expr ; "'" ; "[" ; e2 = expr ; "]" ->
Line 27: >
...
Line 114: | f = expr ; "'" ; "(" ; args = LIST0 (expr LEVEL "simple") SEP "," ; ")" ->
Line 115: >
Line 116: ] ] ;
Line 117: END ;;
What might be wrong? How to install grammar module with ocaml?
ADDED
I use Mac OS X 10.6.4, and I installed Ocaml from this site.
And I got the following result with 'camlp4 -where'.
simple> camlp4 -where /usr/local/lib/ocaml/camlp4
The swigp4.ml is downloadable here.