Hi, On Mon, Jan 14, 2002 at 02:28:02AM -0500, Jeff Henrikson wrote: > First bad news: the code runs great in the toplevel, but that's > because camlp4 extends grammars interactively there. Apparently in > batch compilation, any EXTEND construct only takes effect at the end > of the file, not at the end of a statement. It works in batch mode, but syntax extensions must be given to camlp4 as cmo or cma files. Find attached your program and its two examples. First compile your extension by: ocamlc -pp camlp4o -I +camlp4 -c my_extension.ml And your two examples by: ocamlc -pp camlp4o -c my_file.ml ocamlc -pp camlp4o -c my_file2.ml You can also pretty print the corresponding pure OCaml code, to see what the syntax extension did, by: camlp4o pr_o.cmo my_file.ml camlp4o pr_o.cmo my_file2.ml -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/