1SICK(1)               User Contributed Perl Documentation              SICK(1)
2
3
4

NAME

6       sick - Compiler for CLC-INTERCAL
7

SYNOPSIS

9       sick [options] files...
10

DESCRIPTION

12       sick is the main development environment for CLC-INTERCAL. If files are
13       specified, these will be compiled using the options in effect at the
14       point where they appear on the command line, and they are compiled to
15       objects (if they are not already object).  After all the options have
16       been processed, the program enters interactive mode, unless otherwise
17       specified.
18
19       The program will be compiled using a compiler selected using command
20       line options; if nothing is selected, the compiler depends on the file
21       suffix:
22
23       CLC-INTERCAL program source
24           These files must have suffix .i or .clci. These will be prefixed,
25           by default, with the compiler object sick.io.
26
27       CLC-INTERCAL compiler source
28           These files must have suffix .iacc. These will be prefixed, by
29           default, with the compiler object iacc.io and produce a compiler
30           object (which can be executed as a program, but will do nothing -
31           it's only useful as a preload before compiling from source).
32
33       C-INTERCAL program source
34           These have suffix .ci and will be prefixed with the compiler object
35           ick.io.
36
37       CLC-INTERCAL assembler source
38           These have suffix .iasm and will be prefixed with the compiler
39           object asm.io.
40
41       Traditional INTERCAL program source
42           These will have suffix .1972 and will be prefixed with the compiler
43           object 1972.io
44
45       Compiler extensions
46           Suffixes .i, .ci, .clci and .iasm can contain a list of letters and
47           numbers between the spot (.) and the rest of the suffix; these
48           select compiler extensions to be added.
49
50           Base    Numbers between 2 and 7 change the default base by loading
51                   compiler objects 2.io to 7.io.
52
53           Bitwise Divide
54                   Letter d in the suffix adds the compiler object
55                   bitwise-divide.io, which changes the normal unary divide
56                   operation to use bitwise, rather than arithmetic, shifts.
57                   It can be used with sick or iasm but not with ick.
58
59           COME FROM gerund
60                   Letter g in the suffix adds the compiler object
61                   come-from-gerund.io, which enables the COME FROM gerund
62                   statements; since ick does not parse such statements, this
63                   letter can only be used with sick or iasm.
64
65           Computed labels
66                   Letter l in the suffix adds the compiler object
67                   computed-labels.io, which adds grammar rules to parse
68                   computed statement labels; this can be used only with sick.
69
70           NEXT    Letter n in the suffix adds the compiler object next.io,
71                   which enables the NEXT statement in sick; since ick enables
72                   this by default, this letter can only be used with sick.
73
74           INTERcal NETworking
75                   Letter r in the suffix adds the compiler object
76                   internet.io, which adds syntax for the STEAL, SMUGGLE and
77                   CASE statements; it can be used with ick or sick.
78
79           System call
80                   Letter s in the suffix adds the compiler object syscall.io,
81                   which hides a "PLEASE NEXT FROM (666)" in a dark corner of
82                   your operating system.
83
84           Threaded program
85                   Letter t in the suffix selects threaded mode by loading
86                   compiler object thick.io. This also changes the default
87                   compiler to ick if the suffix is .i: to use sick one would
88                   use .tclci.
89
90           Wimp mode
91                   Letter w in the suffix adds the compiler object wimp.io,
92                   which causes the program to start in wimp mode when it is
93                   executed. An equivalent result can be obtained by passing
94                   the --wimp option to the executable program.
95
96       The actual list of suffixes recognised can be changed by editing the
97       file system,sickrc or .sickrc. See the option --rcfile for a discussion
98       on how and where sick finds these files, and sickrc for a description
99       of the file format.
100
101       If a preload file is specified on the command line, the defaults
102       derived from the suffix are not used. It is also possible to use
103       default preloads from a different file suffix by explicitely saying
104       -suffix=S - in this case, the compiler acts as if the file had name
105       name.S
106
107       In addition, compiler objects are always recognised, with whatever
108       suffix.  These bypass the first compiler pass and jump directly to the
109       runtime (just-too-late) compiler. However, if the optimiser has been
110       selected when these objects were compiled, and there are no
111       postprocessor statements, the just-too-late compiler will be
112       automatically replaced by a more traditional "compile-time" compiler.
113       If this is confusing, wait until you see the rest.
114
115       If a file is specified without suffix, and there is a compiler object
116       in the include path with the same name and suffix .io, the suffix is
117       automatically added, whether you wanted it or now.
118
119       As soon as each program is written into sick, a pre-compiler will
120       produce an internal compiler object. If sick enters interactive mode,
121       these objects will be available in memory for single-stepping, running,
122       or just ignoring completely and getting on with the real work.
123
124       If sick loads all the required programs and objects successfully, but
125       does not enter interactive mode, any program source is read back out to
126       disk in object format, using the same file name with the suffix
127       replaced by .io if no output file is specified. If a backend is
128       specified in the command line before a program is loaded, sick will
129       produce an executable via that backend instead of an object.
130
131       The compiler accepts several options, some of which are documented
132       here.  Options and files can be mixed in any order, each file is loaded
133       and compiled using whatever options precedes it on the command line.
134       For example:
135
136           sick --verbose --optimise prog1.i --quiet prog2.i --batch
137
138       will tell you everything about compiling prog1.i but not about prog2.i.
139       Both programs will be optimised. On the other hand:
140
141           sick --optimise prog1.i --nooptimise prog2.i --batch
142
143       will optimise prog1.i but not prog2.i.
144
145       All options can be "undone" (sometimes it's even clear how) except
146       --include which applies to all objects loaded after it, and --rcfile
147       which applies to all objects, even the ones loaded before it (just to
148       be different).
149
150   User Interface Options
151       -X / --graphic
152           Enters X-based graphical user interface. Requires Perl-GTK. This is
153           the default if Perl-GTK is installed, the environment variable
154           $DISPLAY is set and the opening of the X display succeeds.
155
156       -c / --curses
157           Enters full screen, curses-based interface. This is the default if
158           the X based interface cannot be started, the environment variable
159           $TERM is set and the terminal name is known.
160
161       --line
162           Enters the line-mode user interface. This is the default if the X
163           based and the curses based interfaces do not work.
164
165       --batch
166           Avoids entering interactive mode. This is the default if the
167           standard input and output are not connected to a terminal and the X
168           based interface cannot be started.
169
170       -itype / --interface=type
171           Selects the user interface type. Currently, only X, Curses, Line
172           and None are defined, but more can be installed as compiler plug-
173           ins. If the interface selected is None, sick will work in batch
174           mode. In addition, an empty string will reinstate the default
175           behaviour.
176
177   Source Character Set Options
178       -a / --ascii
179           Assumes that program source is in ASCII.
180
181       -b / --baudot
182           Assumes that program source is in Baudot.
183
184       -e / --ebcdic
185           Assumes that program source is in EBCDIC.
186
187       -h / --hollerith
188           Assumes that program source is in Hollerith.
189
190       -g / --guess
191           Does not make assumptions about the source character set. If the
192           character set cannot be guessed, will produce an error. This is the
193           default.
194
195       --charset=name
196           Assumes that program source is in the given character sets. Valid
197           values are currently ASCII, Baudot, EBCDIC, Hollerith; an empty
198           name is equivalent to specifying option --guess).
199
200   Code Generation Options
201       -O / --optimise
202           Invokes the optimiser. This is a letter o, not a zero. This will
203           cause the extra object optimise.io to be prefixed after the last
204           compiler and before the real program. The program is then executed:
205           when the optimiser takes control, it will force compilation of the
206           rest of the program (thereby executing the compiler at compile-
207           time, instead of runtime as it normally does), and the resulting
208           object is checkpointed, so the next time it will automatically skip
209           the initialisation and compilation stages. In addition, the
210           "optimise" register is set, instructing the compiler to invoke the
211           optimiser when it runs.
212
213           If you specify -O and -poptimise (see below), you are asking for
214           trouble, so don't do that.
215
216       --nooptimise
217           Disables automatic preloading and execution of optimise.io.
218
219       -oname / --output=name
220           Selects a name for the output file. Some character sequences are
221           recognised inside name: %p will be replaced by the source program's
222           basename; %s will be replaced by the appropriate suffix for the
223           selected backend, %o will provide the original file name specified
224           on the command line, without suffix (this can differ from %s
225           because %s can be prefixed with a directory from the search path)
226           and %% will produce a single %.
227
228           The default is %p.%s, which produces the object name described at
229           the beginning of this document. A suffix is not automatically added
230           if the output name does not contain %s; this might be useful in
231           ocnjunction with the Perl backend to produce a file without a
232           suffix, for example:
233
234               sick --output=%p --backend=Perl sourcefile.i
235
236           will compile sourcefile.i and produce perl script sourcefile.
237
238           If the output file is specified as an empty string, the code
239           generation step will never be done.
240
241       -nname / --name=name
242           Sets the program's name, if the code generator requires it
243           (currently, no backends use a name, but some of the planned ones
244           will). The default is %o. The same %-escapes as defined for the
245           output file name are defined.
246
247       -lname / --backend=name
248           Selects a different compiler back end. The default is Object, which
249           produces a compiler object (suffix .io). The distribution also
250           includes a Perl backend, which produces an executable Perl program
251           (suffix .pl).  In addition, the pseudo backend Run will run the
252           program instead of writing any object. In this case, the output
253           file name is ignored. Note that the program will only run if the
254           compiler is in batch mode.  Other back ends can be provided as
255           compiler plug ins. The distribution also contains a ListObject
256           backend, which does not produce executables but object listings. A
257           future version might allow to "compile" the output of the
258           ListObject back end, but this is currently impossible because not
259           all the internal state of the object is provided, only the part
260           which is likely to be useful to a human reader.
261
262       --bug=number
263           Selects a different probability for the compiler bug. The compiler
264           bug is implemented by initialising the compiler's state with the
265           required probability: when a statement is compiled (usually at
266           runtime), a "BUG" instruction is emitted with the required
267           probability. The default is 1%.
268
269       --ubug=number
270           Selects a probability for the unexplainable compiler bug. This is
271           the compiler bug which occurs when the probability of a
272           (explainable) compiler bug is zero.  Only wimps would use this
273           option. The default is 0.01%.
274
275       -pname / --preload=name
276           Selects a compiler object to prefix to the program. If this option
277           is specified, the compiler won't automatically prefix objects as
278           suggested by the suffix. The program 'oo, ick' included in previous
279           version of CLC-INTERCAL used option -p to select a parser. Since
280           the main use of preloads is to select an alternative (runtime)
281           compiler, it is felt that it is appropriate to keep the same letter
282           for this option.
283
284           The file name specified does not include the suffix .io, which is
285           always added. The file must be a compiler object, not source code.
286
287           The special object optimise should always loaded via -O. Using
288           -poptimise will not necessarily put the object in the correct
289           place, and will not instruct the precompiler to do whatever magic
290           it needs to do to bootstrap the optimiser.
291
292           To completely disable preloading (this is only done when compiling
293           the optimiser, which is used to compile itself) use an empty
294           string.
295
296       --nopreload
297           Resets the default behaviour of selecting preloads based on
298           suffixes.
299
300       --suffix=suffix
301           Specifies a suffix to use when selecting preloads. If this option
302           is not specified, the suffix is taken from the file name to be
303           compiled.
304
305       -Ipath / --include=path
306           Adds a directory before the standard search path for compiler
307           objects and source code. If a file is accessible from the current
308           directory, it is never searched in any include path.
309
310           If this option is repeated, the given paths will be searched in the
311           order given, followed by the standard paths.
312
313   Misc Options
314       -rname / --rcfile=name
315           Executes commands from file name before entering interactive mode.
316           This option can be repeated, to execute more than one file. If it
317           is not specified, the standard library, the current directory, and
318           the current user's home directory are searched for files with name
319           system.sickrc or .sickrc, which are then executed. The order for
320           this search is: specified library (--include), system library, home
321           directory, current directory. This is different from the search
322           order used when looking for objects or source code. If a directory
323           contains both .sickrc and system.sickrc, the system.sickrc is
324           executed first, followed by .sickrc. Also note that if the current
325           directory or the home directory appear in the search path and
326           contain one of these files, they will be executed twice.
327
328           If filenames are explicitely specified, they must be fully
329           qualified: the search path is not used to find them.
330
331       --nouserrc
332           Prevents loading a user rcfile (.sickrc); also limits loading of
333           system.sickrc to the first one found. This option is normally only
334           used during installation, to prevent interference from previous
335           versions of CLC-INTERCAL.
336
337       -v / --verbose
338           Tells everything it's doing (on Standard Error).
339
340       --stdverb=file
341           Sends verbose output to file.
342
343       --trace
344           Enables tracing; if compiling from source, the compiler is also
345           traced; to trace a program, compile it to an object and then run it
346           with --trace.
347
348       --stdtrace=file
349           Enables tracing and selects an output file for the trace
350           information.
351
352       --notrace
353           Disables tracing; preloading trace.io has priority over this
354           option.
355
356       -q / --quiet
357           Stop talking to Standard Error.
358
359       --times
360           Prints a summary of the time take for each major action. This
361           setting is independent of --verbose.
362
363       --notimes
364           Does not print execution times: this is the default.
365
366       --rclist
367           Prints the names of all rcfiles found. It prevents starting
368           interactive mode.  For example, the following command (which should
369           work with any Unix shell) opens all the system and user sickrc
370           files in your favourite editor:
371
372               sh -c '"${EDITOR:-vi}" "`sick --rclist`"'
373
374           This can be useful to update the defaults.
375

BUGS

377       There are more options than ls(1). This is construed to be a feature.
378

SEE ALSO

380       The INTERCAL on-line documentation, by entering sick's interactive mode
381       and finding the "help" menu (X), key (Curses) or command (Line).
382
383
384
385perl v5.12.0                      2008-03-29                           SICK(1)
Impressum