Previous Next Contents

Chapter 1:   Camlp4

Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml, parsing a source file and printing some result.

To run, Camlp4 needs to load files holding operations defining or modifying parsing (how to read the input file) and printing (how to print the result). Such files are Objective Caml object files (ending with ``.cmo'' or ``.cma'').

The command ``camlp4'' runs the Camlp4 program. The first options are objects (``.cmo'') or library (``.cma'') files which are loaded, selecting different parsing and printing operations. Among these first options, it is also possible to use the option ``-I'' to select directories where objects and library files are searched. But, important remark: by default, the system does not searches in the current directory: to select some object file, e.g. ``foo.cmo'' in the current directory, write ``./foo.cmo'' or add the option ``-I .''.




Previous Next Contents