1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
.TH CAMLP4 "1" "June 2007" "CamlP4 3.10.0" "User Commands"
.SH NAME
CamlP4 \- Pre-Processor-Pretty-Printer for Objective Caml
.SH SYNOPSIS
.B camlp4
[\fIload\-options\fR] [\fI\-\-\fR] [\fIother\-options\fR]
.SH DESCRIPTION
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.
.SH OPTIONS
.TP
\fB<file>.ml\fR
Parse this implementation file
.TP
\fB<file>.mli\fR
Parse this interface file
.TP
\fB<file>.(cmo|cma)\fR
Load this module inside the Camlp4 core
.TP
\fB\-I\fR <directory>
Add directory in search patch for object files.
.TP
\fB\-where\fR
Print camlp4 library directory and exit.
.TP
\fB\-nolib\fR
No automatic search for object files in library directory.
.TP
\fB\-intf\fR <file>
Parse <file> as an interface, whatever its extension.
.TP
\fB\-impl\fR <file>
Parse <file> as an implementation, whatever its extension.
.TP
\fB\-str\fR <string>
Parse <string> as an implementation.
.TP
\fB\-unsafe\fR
Generate unsafe accesses to array and strings.
.TP
\fB\-noassert\fR
Obsolete, do not use this option.
.TP
\fB\-verbose\fR
More verbose in parsing errors.
.TP
\fB\-loc\fR <name>
Name of the location variable (default: _loc).
.TP
\fB\-QD\fR <file>
Dump quotation expander result in case of syntax error.
.TP
\fB\-o\fR <file>
Output on <file> instead of standard output.
.TP
\fB\-v\fR
Print Camlp4 version and exit.
.TP
\fB\-version\fR
Print Camlp4 version number and exit.
.TP
\fB\-no_quot\fR
Don't parse quotations, allowing to use, e.g. "<:>" as token.
.TP
\fB\-loaded\-modules\fR
Print the list of loaded modules.
.TP
\fB\-parser\fR <name>
Load the parser Camlp4Parsers/<name>.cmo
.TP
\fB\-printer\fR <name>
Load the printer Camlp4Printers/<name>.cmo
.TP
\fB\-filter\fR <name>
Load the filter Camlp4Filters/<name>.cmo
.TP
\fB\-ignore\fR
ignore the next argument
.TP
\fB\-\-\fR
Deprecated, does nothing
.PP
Options added by loaded object files:
.TP
\fB\-I\fR <string>
Add a directory to INCLUDE search path.
.TP
\fB\-U\fR <string>
Undefine for IFDEF instruction.
.TP
\fB\-D\fR <string>
Define for IFDEF instruction.
.TP
\fB\-meta_action\fR
Undocumented
.TP
\fB\-split_gext\fR
Old name for the option \fB\-split_ext\fR.
.TP
\fB\-split_ext\fR
Split EXTEND by functions to turn around a PowerPC problem.
.TP
\fB\-help_seq\fR
Print explanations about new sequences and exit.
.SH "SEE ALSO"
.BR ocamlc(1),
.BR ocaml(1).
.br
The full documentation for
.B CamlP4
is being developed on a Wiki available on the web at
.br
.B <http://brion.inria.fr/gallium/index.php/Camlp4>.
.SH AUTHOR
CamlP4 is Copyright INRIA, it was mainly written by Nicolas Pouillard.
.PP
This manual page was written by Stefano Zacchiroli <zack@debian.org>,
for the Debian project (but may be used by others).
|