Pre-processor-pretty-printer for objective caml
camlp4 [load-options] [--] [other-options]
Camlp4 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers tools for syntax (Stream Parsers and Grammars) and the ability to modify the concrete syntax of the language (Quotations, Syntax Extensions).
The Objective Caml compiler has a special option "-pp", allowing to call any preprocessor. If Camlp4 is used, the parsing is done (only once) by Camlp4, and the Objective Caml compiler resumes the rest of the compilation (typing, code generation).
Camlp4 can parse normal OCaml concrete syntax or any other user-definable syntax. As an example, an alternative syntax is provided, named Revised, because it tries to fix some problems of the original syntax.
Camlp4 can pretty print the normal OCaml concrete syntax or the revised one (Pretty-Printer). It is therefore always possible to have a version of your sources compilable by the compiler Objective Caml without preprocessing.
Camlp4 can also serve as a Program Transformation tool, the user can supply transformations and apply them easily as a pre-processing task. This is done with Filters.
Parse this implementation file
Parse this interface file
Load this module inside the Camlp4 core
Add directory in search patch for object files.
Print camlp4 library directory and exit.
No automatic search for object files in library directory.
Parse <file> as an interface, whatever its extension.
Parse <file> as an implementation, whatever its extension.
Parse <string> as an implementation.
Generate unsafe accesses to array and strings.
Obsolete, do not use this option.
More verbose in parsing errors.
Name of the location variable (default: _loc).
Dump quotation expander result in case of syntax error.
Output on <file> instead of standard output.
Print Camlp4 version and exit.
Print Camlp4 version number and exit.
Don't parse quotations, allowing to use, e.g. "<:>" as token.
Print the list of loaded modules.
Load the parser Camlp4Parsers/<name>.cmo
Load the printer Camlp4Printers/<name>.cmo
Load the filter Camlp4Filters/<name>.cmo
ignore the next argument
Deprecated, does nothing
Options added by loaded object files:
Add a directory to INCLUDE search path.
Undefine for IFDEF instruction.
Define for IFDEF instruction.
Old name for the option -split_ext.
Split EXTEND by functions to turn around a PowerPC problem.
Print explanations about new sequences and exit.
CamlP4 is Copyright INRIA, it was mainly written by Nicolas Pouillard.
This manual page was written by Stefano Zacchiroli <[email protected]>, for the Debian project (but may be used by others).