996
|
1 <HTML>
|
|
2 <HEAD>
|
|
3 <TITLE>CLC-INTERCAL Reference</TITLE>
|
|
4 </HEAD>
|
|
5 <BODY>
|
|
6 <H1>CLC-INTERCAL Reference</H1>
|
|
7 <H2>... The command-line compiler tool</H2>
|
|
8
|
|
9 <P>
|
|
10 Table of contents:
|
|
11 <UL>
|
|
12 <LI><A HREF="index.html">Parent directory</A>
|
|
13 <LI><A HREF="#sick">The command-line compiler tool</A>
|
|
14 <LI><A HREF="#command">Command-line options</A>
|
|
15 </UL>
|
|
16 </P>
|
|
17
|
|
18 <H2><A NAME="sick">The command-line compiler tool</A></H2>
|
|
19 <P>
|
|
20 Starting from CLC-INTERCAL 1.-94, the preferred method to compile
|
|
21 programs is to use the Integrated Programming Environment,
|
|
22 <I>sick</I> (which stands for <B>S</B>uperior <B>I</B>NTERCAL
|
|
23 <B>C</B>ompiler <B>K</B>luge or something like that). A program
|
|
24 compatible with the old "oo, ick" is planned and will be
|
|
25 made available if and when.
|
|
26 </P>
|
|
27
|
|
28 <P>
|
|
29 <I>sick</I> requires CLC-INTERCAL 1.-94 and newer. It won't work with older versions.
|
|
30 </P>
|
|
31
|
|
32 <P>
|
|
33 Although there are plans to provide some sort of interesting user
|
|
34 interface to <I>sick,</I> at present it only works in batch mode,
|
|
35 compiling programs using options specified on the command line,
|
|
36 and either producing objects or running the program as soon as
|
|
37 the compiler finishes.
|
|
38 </P>
|
|
39
|
|
40 <P>
|
|
41 The arguments on the command line are either options (in the
|
|
42 form <I>--name=value</I> or <I>-xvalue</I>), or filenames. If
|
|
43 a filename is encountered, it is immediately compiled with the
|
|
44 options which precede it in the command line, and then optionally
|
|
45 executed. After processing the command line, <I>sick</I> terminates.
|
|
46 </P>
|
|
47
|
|
48 <H2><A NAME="command">Command-line options</A></H2>
|
|
49 <P>
|
|
50 There is a large number of command-line options, which are grouped
|
|
51 by type for easy reference.
|
|
52 </P>
|
|
53
|
|
54 <H3>Source character set options</H3>
|
|
55
|
|
56 <P>
|
|
57 Before compiling a <I>program,</I> sick needs to know what
|
|
58 character set has been used to encode the source. These days it's
|
|
59 mostly ASCII but you never can tell. The default is <I>--guess</I>.
|
|
60 </P>
|
|
61
|
|
62 <TABLE>
|
|
63 <TR><TH>Long option</TH><TH>Short</TH><TH>Meaning</TH></TR>
|
|
64 <TR><TD>--ascii</TD><TD>-a</TD><TD>ASCII</TD></TR>
|
|
65 <TR><TD>--baudot</TD><TD>-b</TD><TD>Extended Baudot</TD></TR>
|
|
66 <TR><TD>--ebcdic</TD><TD>-e</TD><TD>Nonstandard EBCDIC</TD></TR>
|
|
67 <TR><TD>--hollerith</TD><TD>-h</TD><TD>Hollerith, straight from punched cards</TD></TR>
|
|
68 <TR><TD>--charset=<I>NAME</I></TD><TD></TD><TD>Select a character set</TD></TR>
|
|
69 <TR><TD>--guess</TD><TD>-g</TD><TD>Try to guess looking at the program source</TD></TR>
|
|
70 </TABLE>
|
|
71
|
|
72 <P>
|
|
73 See the <A HREF="charset.html">chapter about character sets</A>
|
|
74 for more information on supported character sets.
|
|
75 </P>
|
|
76
|
|
77 <H3>Compiler options</H3>
|
|
78
|
|
79 <P>
|
|
80 Once <I>sick</I> has loaded the source, and converted it
|
|
81 to ASCII if necessary, it needs to compile it. This requires
|
|
82 loading a compiler object and any necessary compiler options and
|
|
83 extensions. This is done by specifying <I>preloads</I>, which,
|
|
84 as the name suggests, are loaded before the program source. If
|
|
85 no preloads are specified, <I>sick</I> attempts to guess the
|
|
86 correct list of preloads by looking at the program suffix (or an
|
|
87 alternative suffix specified on the command line).
|
|
88 </P>
|
|
89
|
|
90 <TABLE>
|
|
91 <TR><TH>Long option</TH><TH>Short</TH><TH>Meaning</TH></TR>
|
|
92 <TR><TD>--include=<I>DIR</I></TD><TD>-I<I>DIR</I></TD><TD>Add directory to search path for compiler objects</TD></TR>
|
|
93 <TR><TD>--nopreload</TD><TD></TD><TD>Clears the list of preloads, reverting to the suffix-based guess</TD></TR>
|
|
94 <TR><TD>--preload=<I>NAME</I></TD><TD>-p<I>NAME</I></TD><TD>Add <I>NAME</I> to the list of preloads</TD></TR>
|
|
95 <TR><TD>--suffix=<I>SUFFIX</I></TD><TD></TD><TD>If using suffix-based guess, use <I>SUFFIX</I> instead of the source file's suffix</TD></TR>
|
|
96 </TABLE>
|
|
97
|
|
98 <P>
|
|
99 The suffix-based guessing of preloads relies on the file
|
|
100 <I>system.sickrc</I> or <I>.sickrc</I> which should be somewhere
|
|
101 in the search path for compiler objects. The one provided with the
|
|
102 distributions will use the following table (if a suffix belongs
|
|
103 to more than one row, it will use the first matching one):
|
|
104 </P>
|
|
105
|
|
106 <TABLE>
|
|
107 <TR><TH>Suffix</TH><TH>Preloads</TH><TH>Meaning</TH></TR>
|
|
108 <TR><TD>.iacc</TD><TD>iacc</TD><TD>Compiler source</TD></TR>
|
|
109 <TR><TD>.ti</TD><TD>ick, thick</TD><TD>Threaded INTERCAL source</TD></TR>
|
|
110 <TR><TD>.ci</TD><TD>ick</TD><TD>C-INTERCAL source</TD></TR>
|
|
111 <TR><TD>.iasm</TD><TD>asm</TD><TD>CLC-INTERCAL assembler</TD></TR>
|
|
112 <TR><TD>.i</TD><TD>sick</TD><TD>CLC-INTERCAL source</TD></TR>
|
|
113 <TR><TD>.clci</TD><TD>sick</TD><TD>CLC-INTERCAL source</TD></TR>
|
|
114 <TR><TD>.1972</TD><TD>1972</TD><TD>Traditional INTERCAL source</TD></TR>
|
|
115 </TABLE>
|
|
116
|
|
117 <P>
|
|
118 In addition to the above, extra letters can be present between the
|
|
119 spot and the rest of the suffix, indicating extra preloads. Such
|
|
120 extra letters can only be used with the <I>ick</I> or <I>sick</I>
|
|
121 compilers, because <I>1972</I>, <I>iacc</I> and <I>iasm</I> do not
|
|
122 accept options or extensions.
|
|
123 </P>
|
|
124
|
|
125 <TABLE>
|
|
126 <TR><TH>Letter</TH><TH>Preload</TH><TH>Meaning</TH></TR>
|
|
127 <TR><TD>2</TD><TD>2</TD><TD>Change base to 2</TD></TR>
|
|
128 <TR><TD>3</TD><TD>3</TD><TD>Change base to 3</TD></TR>
|
|
129 <TR><TD>4</TD><TD>4</TD><TD>Change base to 4</TD></TR>
|
|
130 <TR><TD>5</TD><TD>5</TD><TD>Change base to 5</TD></TR>
|
|
131 <TR><TD>6</TD><TD>6</TD><TD>Change base to 6</TD></TR>
|
|
132 <TR><TD>7</TD><TD>7</TD><TD>Change base to 7</TD></TR>
|
|
133 <TR><TD>d</TD><TD>bitwise-divide</TD><TD>Select bitwise behaviour for unary divide</TD></TR>
|
|
134 <TR><TD>g</TD><TD>come-from-gerund</TD><TD>Enable COME FROM gerund and NEXT FROM gerund</TD></TR>
|
|
135 <TR><TD>l</TD><TD>computed-labels</TD><TD>Allow computed statement labels</TD></TR>
|
|
136 <TR><TD>n</TD><TD>next</TD><TD>Allow NEXT statements</TD></TR>
|
|
137 <TR><TD>r</TD><TD>internet</TD><TD>Enable INTERcal NETworking</TD></TR>
|
|
138 <TR><TD>s</TD><TD>syscall</TD><TD>Enable system call interface on label (666)</TD></TR>
|
|
139 <TR><TD>t</TD><TD>thick</TD><TD>Enable threads with COME FROM</TD></TR>
|
|
140 <TR><TD>w</TD><TD>wimp</TD><TD>Set wimp mode as default for compiled program</TD></TR>
|
|
141 </TABLE>
|
|
142
|
|
143 <P>
|
|
144 CLC-INTERCAL 1.-94.-2 no longer includes the INTERNET extensions by
|
|
145 default. The "r" suffix will only work if the optional package
|
|
146 CLC-INTERCAL-INET has been installed.
|
|
147 </P>
|
|
148
|
|
149 <P>
|
|
150 Not all these extra options are compatible with <I>ick</I>. See
|
|
151 the <A HREF="extensions.html">chapter about compiler extensions</A>
|
|
152 for more details.
|
|
153
|
|
154 <H3>Code generation options</H3>
|
|
155
|
|
156 <P>
|
|
157 Once the program source has been compiled, <I>sick</I> needs to use
|
|
158 a module to generate the actual code. The default is <I>Object</I>,
|
|
159 which produces an INTERCAL object, which can be executed directly
|
|
160 or loaded back into <I>sick</I> as a preload.
|
|
161 </P>
|
|
162
|
|
163 <TABLE>
|
|
164 <TR><TH>Long option</TH><TH>Short</TH><TH>Meaning</TH></TR>
|
|
165 <TR><TD>--nooptimise</TD><TD></TD><TD>Disable optimiser (default)</TD></TR>
|
|
166 <TR><TD>--optimise</TD><TD>-O</TD><TD>Enable optimiser</TD></TR>
|
|
167 <TR><TD>--backend=<I>NAME</I></TD><TD>-l<I>NAME</I></TD><TD>Selects the module used to generate code</TD></TR>
|
|
168 <TR><TD>--output=<I>NAME</I></TD><TD>-o<I>NAME</I></TD><TD>The output file, defaults to the source file name with a new suffix</TD></TR>
|
|
169 <TR><TD>--name=<I>NAME</I></TD><TD>-n<I>NAME</I></TD><TD>A name passed to the backend. Most backends don't use one</TD></TR>
|
|
170 <TR><TD>--bug=<I>NUMBER</I></TD><TD></TD><TD>Change the probability of the compiler bug</TD></TR>
|
|
171 <TR><TD>--ubug=<I>NUMBER</I></TD><TD></TD><TD>Change the probability of the unexplainable compiler bug</TD></TR>
|
|
172 </TABLE>
|
|
173
|
|
174 <P>
|
|
175 The following backends are currently provided:
|
|
176 </P>
|
|
177
|
|
178 <TABLE>
|
|
179 <TR><TH>Backend</TH><TH>Suffix</TH><TH>Meaning</TH></TR>
|
|
180 <TR><TD>ListObject</TD><TD>.iasm</TD><TD>Assembler listing of the object</TD></TR>
|
|
181 <TR><TD>Object</TD><TD>.io</TD><TD>Executable object</TD></TR>
|
|
182 <TR><TD>Perl</TD><TD>.pl</TD><TD>Perl program</TD></TR>
|
|
183 <TR><TD>Run</TD><TD></TD><TD>Run program immediately - does not save object</TD></TR>
|
|
184 </TABLE>
|
|
185
|
|
186 <P>
|
|
187 If an output file name is not specified with <I>--output</I>,
|
|
188 the backend will generate a file name by appending its own suffix
|
|
189 (shown in the table) to the base name of the source program.
|
|
190 </P>
|
|
191
|
|
192 <P>
|
|
193 Objects produced by the <I>Object</I> and <I>Perl</I> backends
|
|
194 will accept the following command-line arguments when executed:
|
|
195 </P>
|
|
196
|
|
197 <TABLE>
|
|
198 <TR><TH>Option</TH><TH>Meaning</TH></TR>
|
|
199 <TR><TD>--nouserrc</TD><TD>Ignore <I>.sickrc</I> files, use only first <I>system.sickrc</I> found</TD></TR>
|
|
200 <TR><TD>--rcfile=<I>NAME</I></TD><TD>Uses specified file instead of searching for <I>.sickrc</I> and <I>system.sickrc</I></TD></TR>
|
|
201 <TR><TD>--trace</TD><TD>Enable tracing for the object</TD></TR>
|
|
202 <TR><TD>--stdtrace=<I>FILE</I></TD><TD>Enable tracing and redirect tracing data to <I>FILE</I></TD></TR>
|
|
203 <TR><TD>--notrace</TD><TD>Disable tracing (default)</TD></TR>
|
|
204 <TR><TD>--wimp</TD><TD>Select wimp mode (default if the <I>wimp</I> object was preloaded)</TD></TR>
|
|
205 <TR><TD>--nowimp</TD><TD>Select normal mode (default if the <I>wimp</I> object was not preloaded)</TD></TR>
|
|
206 </TABLE>
|
|
207
|
|
208 <H3>Misc options</H3>
|
|
209
|
|
210 <P>
|
|
211 The following options control the way <I>sick</I> operates:
|
|
212 </P>
|
|
213
|
|
214 <TABLE>
|
|
215 <TR><TH>Long option</TH><TH>Short</TH><TH>Meaning</TH></TR>
|
|
216 <TR><TD>--nouserrc</TD><TD></TD><TD>Ignore <I>.sickrc</I> files, use only first <I>system.sickrc</I> found</TD></TR>
|
|
217 <TR><TD>--rcfile=<I>NAME</I></TD><TD>-r<I>NAME</I></TD><TD>Uses specified file instead of searching for <I>.sickrc</I> and <I>system.sickrc</I></TD></TR>
|
|
218 <TR><TD>--rclist</TD><TD></TD><TD>Lists all <I>.sickrc</I> and <I>system.sickrc</I> files found</TD></TR>
|
|
219 <TR><TD>--stdverb=<I>FILE</I></TD><TD>-s<I>FILE</I></TD><TD>Send verbose output to <I>FILE</I></TD></TR>
|
|
220 <TR><TD>--verbose</TD><TD>-v</TD><TD>Send verbose outout to standard error</TD></TR>
|
|
221 <TR><TD>--quiet</TD><TD>-q</TD><TD>Do not produce verbose output (default)</TD></TR>
|
|
222 <TR><TD>--times</TD><TD></TD><TD>Print compiler timing information on standard error</TD></TR>
|
|
223 <TR><TD>--notimes</TD><TD></TD><TD>Do not print timing information (default)</TD></TR>
|
|
224 <TR><TD>--trace</TD><TD></TD><TD>Enable tracing - this will trace the compiler, not the object</TD></TR>
|
|
225 <TR><TD>--stdtrace=<I>FILE</I></TD><TD></TD><TD>Enable tracing and redirect tracing data to <I>FILE</I></TD></TR>
|
|
226 <TR><TD>--notrace</TD><TD></TD><TD>Disable tracing (default)</TD></TR>
|
|
227 </TABLE>
|
|
228
|
|
229 <H3>User interface options</H3>
|
|
230
|
|
231 <P>
|
|
232 At the time of writing, <I>sick</I> does not use any interface: it
|
|
233 just gets its orders from the command line, does what it needs to
|
|
234 do, and terminates. A future version may do more. In the meantime,
|
|
235 a number of command-line options allow to select a user interface,
|
|
236 although this selection is currently ignored.
|
|
237 </P>
|
|
238
|
|
239 <TABLE>
|
|
240 <TR><TH>Long option</TH><TH>Short</TH><TH>Meaning</TH></TR>
|
|
241 <TR><TD>--graphic</TD><TD>-X</TD><TD>GTK2-based graphical interface</TD></TR>
|
|
242 <TR><TD>--curses</TD><TD>-c</TD><TD>Curses-based text interface</TD></TR>
|
|
243 <TR><TD>--line</TD><TD></TD><TD>ReadLine-based text interface</TD></TR>
|
|
244 <TR><TD>--batch</TD><TD></TD><TD>Batch mode, no user interface (default)</TD></TR>
|
|
245 <TR><TD>--interface=<I>NAME</I></TD><TD>-i<I>NAME</I></TD><TD>Load the specified interface</TD></TR>
|
|
246 </TABLE>
|
|
247
|
|
248 <P>
|
|
249 CLC-INTERCAL 1.-94.-2 no longer includes the user interfaces in
|
|
250 the distribution: these are available as separate packages.
|
|
251 </P>
|
|
252
|
|
253 </BODY>
|
|
254 </HTML>
|
|
255
|