Table of contents:
Starting from CLC-INTERCAL 1.-94, the preferred method to compile programs is to use the Integrated Programming Environment, sick (which stands for Superior INTERCAL Compiler Kluge or something like that). A program compatible with the old "oo, ick" is planned and will be made available if and when.
sick requires CLC-INTERCAL 1.-94 and newer. It won't work with older versions.
Although there are plans to provide some sort of interesting user interface to sick, at present it only works in batch mode, compiling programs using options specified on the command line, and either producing objects or running the program as soon as the compiler finishes.
The arguments on the command line are either options (in the form --name=value or -xvalue), or filenames. If a filename is encountered, it is immediately compiled with the options which precede it in the command line, and then optionally executed. After processing the command line, sick terminates.
There is a large number of command-line options, which are grouped by type for easy reference.
Before compiling a program, sick needs to know what character set has been used to encode the source. These days it's mostly ASCII but you never can tell. The default is --guess.
Long option | Short | Meaning |
---|---|---|
--ascii | -a | ASCII |
--baudot | -b | Extended Baudot |
--ebcdic | -e | Nonstandard EBCDIC |
--hollerith | -h | Hollerith, straight from punched cards |
--charset=NAME | Select a character set | |
--guess | -g | Try to guess looking at the program source |
See the chapter about character sets for more information on supported character sets.
Once sick has loaded the source, and converted it to ASCII if necessary, it needs to compile it. This requires loading a compiler object and any necessary compiler options and extensions. This is done by specifying preloads, which, as the name suggests, are loaded before the program source. If no preloads are specified, sick attempts to guess the correct list of preloads by looking at the program suffix (or an alternative suffix specified on the command line).
Long option | Short | Meaning |
---|---|---|
--include=DIR | -IDIR | Add directory to search path for compiler objects |
--nopreload | Clears the list of preloads, reverting to the suffix-based guess | |
--preload=NAME | -pNAME | Add NAME to the list of preloads |
--suffix=SUFFIX | If using suffix-based guess, use SUFFIX instead of the source file's suffix |
The suffix-based guessing of preloads relies on the file system.sickrc or .sickrc which should be somewhere in the search path for compiler objects. The one provided with the distributions will use the following table (if a suffix belongs to more than one row, it will use the first matching one):
Suffix | Preloads | Meaning |
---|---|---|
.iacc | iacc | Compiler source |
.ti | ick, thick | Threaded INTERCAL source |
.ci | ick | C-INTERCAL source |
.iasm | asm | CLC-INTERCAL assembler |
.i | sick | CLC-INTERCAL source |
.clci | sick | CLC-INTERCAL source |
.1972 | 1972 | Traditional INTERCAL source |
In addition to the above, extra letters can be present between the spot and the rest of the suffix, indicating extra preloads. Such extra letters can only be used with the ick or sick compilers, because 1972, iacc and iasm do not accept options or extensions.
Letter | Preload | Meaning |
---|---|---|
2 | 2 | Change base to 2 |
3 | 3 | Change base to 3 |
4 | 4 | Change base to 4 |
5 | 5 | Change base to 5 |
6 | 6 | Change base to 6 |
7 | 7 | Change base to 7 |
d | bitwise-divide | Select bitwise behaviour for unary divide |
g | come-from-gerund | Enable COME FROM gerund and NEXT FROM gerund |
l | computed-labels | Allow computed statement labels |
n | next | Allow NEXT statements |
r | internet | Enable INTERcal NETworking |
s | syscall | Enable system call interface on label (666) |
t | thick | Enable threads with COME FROM |
w | wimp | Set wimp mode as default for compiled program |
CLC-INTERCAL 1.-94.-2 no longer includes the INTERNET extensions by default. The "r" suffix will only work if the optional package CLC-INTERCAL-INET has been installed.
Not all these extra options are compatible with ick. See the chapter about compiler extensions for more details.
Once the program source has been compiled, sick needs to use a module to generate the actual code. The default is Object, which produces an INTERCAL object, which can be executed directly or loaded back into sick as a preload.
Long option | Short | Meaning |
---|---|---|
--nooptimise | Disable optimiser (default) | |
--optimise | -O | Enable optimiser |
--backend=NAME | -lNAME | Selects the module used to generate code |
--output=NAME | -oNAME | The output file, defaults to the source file name with a new suffix |
--name=NAME | -nNAME | A name passed to the backend. Most backends don't use one |
--bug=NUMBER | Change the probability of the compiler bug | |
--ubug=NUMBER | Change the probability of the unexplainable compiler bug |
The following backends are currently provided:
Backend | Suffix | Meaning |
---|---|---|
ListObject | .iasm | Assembler listing of the object |
Object | .io | Executable object |
Perl | .pl | Perl program |
Run | Run program immediately - does not save object |
If an output file name is not specified with --output, the backend will generate a file name by appending its own suffix (shown in the table) to the base name of the source program.
Objects produced by the Object and Perl backends will accept the following command-line arguments when executed:
Option | Meaning |
---|---|
--nouserrc | Ignore .sickrc files, use only first system.sickrc found |
--rcfile=NAME | Uses specified file instead of searching for .sickrc and system.sickrc |
--trace | Enable tracing for the object |
--stdtrace=FILE | Enable tracing and redirect tracing data to FILE |
--notrace | Disable tracing (default) |
--wimp | Select wimp mode (default if the wimp object was preloaded) |
--nowimp | Select normal mode (default if the wimp object was not preloaded) |
The following options control the way sick operates:
Long option | Short | Meaning |
---|---|---|
--nouserrc | Ignore .sickrc files, use only first system.sickrc found | |
--rcfile=NAME | -rNAME | Uses specified file instead of searching for .sickrc and system.sickrc |
--rclist | Lists all .sickrc and system.sickrc files found | |
--stdverb=FILE | -sFILE | Send verbose output to FILE |
--verbose | -v | Send verbose outout to standard error |
--quiet | -q | Do not produce verbose output (default) |
--times | Print compiler timing information on standard error | |
--notimes | Do not print timing information (default) | |
--trace | Enable tracing - this will trace the compiler, not the object | |
--stdtrace=FILE | Enable tracing and redirect tracing data to FILE | |
--notrace | Disable tracing (default) |
At the time of writing, sick does not use any interface: it just gets its orders from the command line, does what it needs to do, and terminates. A future version may do more. In the meantime, a number of command-line options allow to select a user interface, although this selection is currently ignored.
Long option | Short | Meaning |
---|---|---|
--graphic | -X | GTK2-based graphical interface |
--curses | -c | Curses-based text interface |
--line | ReadLine-based text interface | |
--batch | Batch mode, no user interface (default) | |
--interface=NAME | -iNAME | Load the specified interface |
CLC-INTERCAL 1.-94.-2 no longer includes the user interfaces in the distribution: these are available as separate packages.