Commit 4c112fc2 authored by Pietro Abate's avatar Pietro Abate

[r2003-10-07 19:05:16 by cvscast] Beppe: updated doc and install for version 0.2.0

Original author: cvscast
Date: 2003-10-07 19:05:16+00:00
parent 349a7983
......@@ -13,32 +13,41 @@ Prerequisites
Before compiling CDuce, you need to install recent releases of the
following packages:
ocaml
ocaml => 3.07
http://caml.inria.fr/ocaml/distrib.html
findlib
http://www.ocaml-programming.de/packages
wlex
http://www.eleves.ens.fr/home/frisch/soft.html#wlex
ulex
http://www.cduce.org/download/ulex-0.2.tar.gz
pcre-ocaml
http://www.ai.univie.ac.at/~markus/home/ocaml_sources.html
ocamlnet
http://sourceforge.net/projects/ocamlnet
pxp
pxp => 1.9.93
http://www.ocaml-programming.de/packages/documentation/pxp/index_dev.html
Important notes:
- the packages above must be installed in the order we used above. In
particular wlex _must_ be installed before pcre-ocaml and pxp.
- Ocaml: cduce uses recursive modules so versions of ocaml before 3.07
will not work. Also the standard distributions has two bugs that make
cduce compilation fail. Patch ocaml source by
http://caml.inria.fr/bin/caml-bugs/fixed?id=1863;page=77;user=guest
http://www.cduce.org/download/patch-ocaml-3.07
- wlex: you only need to build and install the runtime support library
(not the wlex tool itself):
or (better) install ocaml cvs version
cvs -d":pserver:anoncvs@camlcvs.inria.fr:/caml" login
hit enter key when asked for password
cvs -d":pserver:anoncvs@camlcvs.inria.fr:/caml" co ocaml
make runtime.all && make install_runtime
- the packages above must be installed in the order we used above. In
particular ulex _must_ be installed before pcre-ocaml and pxp.
- pcre-ocaml: you may also need to install the PCRE library
from http://www.pcre.org/
from http://www.pcre.org/ [red-hat users, 4.3 package does
not work with the latest pcre-ocaml version, use tarballs]
>= 5.03 recommended but previous versions may work
- PXP:
CDuce requires a development version >= 1.1.93.
......@@ -121,8 +130,8 @@ the OCaml wrapper:
make install (* may require root privileges *)
cd ..
Then set EXPAT=true in Makefile.conf, and rebuild CDuce (make clean;
make all).
Then set EXPAT=true in Makefile.conf, and rebuild CDuce
(make clean && make all).
The interpreter is now using expat for loading XML files.
You can still use PXP by providing the --pxp switch on the command
......
......@@ -13,9 +13,9 @@ the following packages
<pre>
ocaml >= 3.06
findlib >= 0.8
pcre-ocaml
pcre-ocaml>= 4.22
ocamlnet >= 0.96
pxp >= 1.1.9
pxp >= 1.1.93
expat >= 1.95.6 (just for the expat package)
<pre>
</p>
......
.TH "CDUCE" "1" "09 June 2003" "" ""
.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng <steve@ggi-project.org>.
.TH "CDUCE" "1" "07 ottobre 2003" "" ""
.SH NAME
cduce \- The CDuce interpreter
......@@ -6,13 +11,19 @@ cduce \- The CDuce interpreter
\fBcduce\fR [ \fB OPTIONS\fR\fI ...\fR ] [ \fB \fIfile[.cd]\fB\fR\fI ...\fR ] [ \fB--arg \fIargument\fB\fR\fI ...\fR ]
\fBcduce --compile\fR [ \fB OPTIONS\fR\fI ...\fR ] [ \fB \fIfile[.cd]\fB\fR\fI ...\fR ]
\fBcduce --run\fR [ \fB OPTIONS\fR\fI ...\fR ] [ \fB \fIfile[.cdo]\fB\fR\fI ...\fR ] [ \fB--arg \fIargument\fB\fR\fI ...\fR ]
.SH "DESCRIPTION"
.PP
The \fBcduce\fR command considers all the .cd files on the command
line that follow the options as CDuce sources, and executes them
successively. If no CDuce file is given on the command line, the interpreter
uses the standard input. All the arguments that follow the --arg option are
passed to the source file(s).
successively. With the --compile option it produce a file with intermediate code
that can be run by cduce --run (without options the two steps are piped) All the
arguments that follow the --arg option are passed to the source file(s).
.PP
If no CDuce file is given on the command line
then the interpreter uses the standard input and behaves as an interactive
......@@ -26,6 +37,9 @@ summary of the options supported by \fBcduce\fR
is included below.
.SS "GENERIC OPTIONS"
.TP
\fB--compile \fIfile\fB\fR
Produces a file in an intermediate code that can be run by cduce --run
.TP
\fB--dump \fIfile\fB\fR
This option is equivalent to restore the environment previously saved in
\fIfile\fR by the \fB--load \fIfile\fB\fR \fB--save \fIfile\fB\fR.
......@@ -51,6 +65,9 @@ Suppress normal output (typing, results). It is normally
used when the CDuce interpreter is used in the context of batch
processing.
.TP
\fB--run\fR
Executes .cdo files produced by cduce --compile.
.TP
\fB--save \fIfile\fB\fR
This options allows persistence between several invocations of the
interpreter: the current environment (i.e., the set defined types and values) is saved in
......
......@@ -23,6 +23,25 @@
</arg>
<arg choice="opt" rep="repeat"><option>--arg <filename>argument</filename></option></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>cduce --compile</command>
<arg choice="opt" rep="repeat">
<option>OPTIONS</option>
</arg>
<arg choice="opt" rep="repeat">
<option><filename>file[.cd]</filename></option>
</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>cduce --run</command>
<arg choice="opt" rep="repeat">
<option>OPTIONS</option>
</arg>
<arg choice="opt" rep="repeat">
<option><filename>file[.cdo]</filename></option>
</arg>
<arg choice="opt" rep="repeat"><option>--arg <filename>argument</filename></option></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
......@@ -30,9 +49,9 @@
<para>
The <command>cduce</command> command considers all the .cd files on the command
line that follow the options as CDuce sources, and executes them
successively. If no CDuce file is given on the command line, the interpreter
uses the standard input. All the arguments that follow the --arg option are
passed to the source file(s).
successively. With the --compile option it produce a file with intermediate code
that can be run by cduce --run (without options the two steps are piped) All the
arguments that follow the --arg option are passed to the source file(s).
</para>
<para>
If no CDuce file is given on the command line
......@@ -57,6 +76,15 @@ is included below. </para>
<title>Generic Options</title>
<variablelist>
<varlistentry>
<term><option>--compile <filename>file</filename></option></term>
<listitem>
<para>
Produces a file in an intermediate code that can be run by cduce --run
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--dump <filename>file</filename></option></term>
<listitem>
......@@ -118,6 +146,15 @@ Restore the environment previously saved in
</listitem>
</varlistentry>
<varlistentry>
<term><option>--run</option></term>
<listitem>
<para>Executes .cdo files produced by cduce --compile.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--save <filename>file</filename></option></term>
<listitem>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment