cduce.docbook 5.24 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN">

<refentry id="cduce">

<refmeta>
<refentrytitle>cduce</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>

<refnamediv>
<refname>cduce</refname>
<refpurpose>The CDuce interpreter</refpurpose>
</refnamediv>

<refsynopsisdiv>
<cmdsynopsis>
<command>cduce</command>
18
19
<arg choice="opt" rep="repeat">
  <option>OPTIONS</option>
20
21
</arg>
<arg choice="opt" rep="repeat">
22
  <option><filename>file[.cd]</filename></option>
23
</arg>
24
<arg choice="opt" rep="repeat"><option>--arg <filename>argument</filename></option></arg>
25
26
27
28
29
30
31
32
33
</cmdsynopsis>
</refsynopsisdiv>

<refsect1>
<title>Description</title>
<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
34
uses the standard input. All the arguments that follow the --arg option are
35
36
37
38
39
40
41
passed to the source file(s). 
</para>
<para>
If no CDuce file is given on the command line
then the interpreter uses the standard input and behaves as an interactive
toplevel. Toplevel phrases are processed after each <command>;;</command>. Mutually recursive declarations of types or functions must be contained in a single adjacent sequence of phrases (without <command>;;</command> inbetween).

42
In order to allow persistence (option <option>--dump</option>, <option>--load</option>, and <option>--save</option>) to operate, you must quit the toplevel with <command>Ctrl-D</command> and not <command>Ctrl-C</command>.
43
44
45
46
47
48
49
</para>
</refsect1>


<refsect1>
<title>Options</title>
<para>
50
This program follows usual syntax,
51
52
53
54
55
56
57
58
59
60
61
62
with long options starting with two dashes (`--'). A
summary of the options supported by <command>cduce</command>
is included below.		</para>
		

<refsect2>
<title>Generic Options</title>
<variablelist>

<varlistentry>
<term><option>--dump <filename>file</filename></option></term>
<listitem>
63
64
65
66
<para>
This option is equivalent to restore the environment previously saved in
<filename>file</filename> by the <option>--load <filename>file</filename></option> <option>--save <filename>file</filename></option>.
</para>
67
68
69
70
</listitem>
</varlistentry>


71
72
73
74
75
76
77
<varlistentry>
<term><option>--expat</option></term>
<listitem>
<para>Use the Expat parser for loading XML documents (this option is available only if CDuce was built with  Expat support; in that case it is the default option). Cannot be use in conjuction with the <option>--pxp</option> option.</para>
</listitem>
</varlistentry>

78
<varlistentry>
79
<term><option>-h</option>, <option>--help</option></term>
80
81
82
83
84
85
86
87
88
<listitem>
<para>Display a short help message and exit.</para>
</listitem>
</varlistentry>


<varlistentry>
<term><option>--license</option></term>
<listitem>
89
<para>Show license information and exit.</para>
90
91
92
</listitem>
</varlistentry>

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<varlistentry>
<term><option>--load <filename>file</filename></option></term>
<listitem>
<para>
Restore the environment previously saved in
<filename>file</filename> by the <option>--save</option> option.
</para>
</listitem>
</varlistentry>


<varlistentry>
<term><option>--pxp</option></term>
<listitem>
<para>Use the PXP parser for loading XML documents. Cannot be use in conjuction with the <option>--expat</option> option.
</para>
</listitem>
</varlistentry>
111
112
113
114
115
116
117
118
119
120

<varlistentry>
<term><option>--quiet</option></term>
<listitem>
<para>Suppress normal output (typing, results). It is normally
      used when the CDuce interpreter is used in the context of batch
      processing.</para>
</listitem>
</varlistentry>

121
122
123
124
125
126
127
128
129
130
131
<varlistentry>
<term><option>--save <filename>file</filename></option></term>
<listitem>
<para> This options allows persistence between several invocations of the
interpreter: the current environment (i.e., the set defined types and values) is saved in
<filename>file</filename> when the interpreter terminates so that it
can be succesively restored by using <option>--load</option> option
</para>
</listitem>
</varlistentry>

132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

<varlistentry>
<term><option>-v</option>, <option>--version</option></term>
<listitem>
<para>Show version information and exit.</para>
</listitem>
</varlistentry>
</variablelist>

</refsect2>

<refsect2>
<title>PROGRAM OPTIONS</title>
<para>
<variablelist>

<varlistentry>
149
<term><option>--arg <filename>arguments</filename></option></term>
150
151
152

<listitem>
<para>
153
All the arguments following <option>--arg</option> are passed to the CDuce
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
program, in the variable <command>argv</command> (of type <command>[ String*
]</command>, which means sequence of character strings).
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect2>

</refsect1>
	
<refsect1>
<title>Reporting bugs</title>
<para>
Report bugs to <email>bugs@cduce.org</email>.
</para>

</refsect1>



	
<refsect1>
<title>SEE ALSO</title>
<para>
A complete documentation, reference manual, tutorial, technical articles on
implementation and theoretical issues, benchmarks, source code, mailing lists
and forums can be found on the <emphasis>CDuce</emphasis> website:
<filename>http://www.cduce.org</filename>.
</para>

</refsect1>

<refsect1>
<title>AUTHOR</title>
<para>
Alain Frisch <email>Alain.Frisch@ens.fr</email> with small contributions of
191
Giuseppe Castagna <email>Giuseppe.Castagna@ens.fr</email>, and Stefano Zacchiroli <email>zack@di.ens.fr</email>.
192
193
194
195
196
197
198
199
</para>

</refsect1>




</refentry>