Provided by: clc-intercal_1.0~4pre1.-94.-2-3_all bug

NAME

       sick - Compiler for CLC-INTERCAL

SYNOPSIS

       sick [options] files...

DESCRIPTION

       sick is the main development environment for CLC-INTERCAL. If files are specified, these
       will be compiled using the options in effect at the point where they appear on the command
       line, and they are compiled to objects (if they are not already object).  After all the
       options have been processed, the program enters interactive mode, unless otherwise
       specified.

       The program will be compiled using a compiler selected using command line options; if
       nothing is selected, the compiler depends on the file suffix:

       CLC-INTERCAL program source
           These files must have suffix .i or .clci. These will be prefixed, by default, with the
           compiler object sick.io.

       CLC-INTERCAL compiler source
           These files must have suffix .iacc. These will be prefixed, by default, with the
           compiler object iacc.io and produce a compiler object (which can be executed as a
           program, but will do nothing - it's only useful as a preload before compiling from
           source).

       C-INTERCAL program source
           These have suffix .ci and will be prefixed with the compiler object ick.io.

       CLC-INTERCAL assembler source
           These have suffix .iasm and will be prefixed with the compiler object asm.io.

       Traditional INTERCAL program source
           These will have suffix .1972 and will be prefixed with the compiler object 1972.io

       Compiler extensions
           Suffixes .i, .ci, .clci and .iasm can contain a list of letters and numbers between
           the spot (.) and the rest of the suffix; these select compiler extensions to be added.

           Base    Numbers between 2 and 7 change the default base by loading compiler objects
                   2.io to 7.io.

           Bitwise Divide
                   Letter d in the suffix adds the compiler object bitwise-divide.io, which
                   changes the normal unary divide operation to use bitwise, rather than
                   arithmetic, shifts. It can be used with sick or iasm but not with ick.

           COME FROM gerund
                   Letter g in the suffix adds the compiler object come-from-gerund.io, which
                   enables the COME FROM gerund statements; since ick does not parse such
                   statements, this letter can only be used with sick or iasm.

           Computed labels
                   Letter l in the suffix adds the compiler object computed-labels.io, which adds
                   grammar rules to parse computed statement labels; this can be used only with
                   sick.

           NEXT    Letter n in the suffix adds the compiler object next.io, which enables the
                   NEXT statement in sick; since ick enables this by default, this letter can
                   only be used with sick.

           INTERcal NETworking
                   Letter r in the suffix adds the compiler object internet.io, which adds syntax
                   for the STEAL, SMUGGLE and CASE statements; it can be used with ick or sick.

           System call
                   Letter s in the suffix adds the compiler object syscall.io, which hides a
                   "PLEASE NEXT FROM (666)" in a dark corner of your operating system.

           Threaded program
                   Letter t in the suffix selects threaded mode by loading compiler object
                   thick.io. This also changes the default compiler to ick if the suffix is .i:
                   to use sick one would use .tclci.

           Wimp mode
                   Letter w in the suffix adds the compiler object wimp.io, which causes the
                   program to start in wimp mode when it is executed. An equivalent result can be
                   obtained by passing the --wimp option to the executable program.

       The actual list of suffixes recognised can be changed by editing the file system,sickrc or
       .sickrc. See the option --rcfile for a discussion on how and where sick finds these files,
       and sickrc for a description of the file format.

       If a preload file is specified on the command line, the defaults derived from the suffix
       are not used. It is also possible to use default preloads from a different file suffix by
       explicitely saying -suffix=S - in this case, the compiler acts as if the file had name
       name.S

       In addition, compiler objects are always recognised, with whatever suffix.  These bypass
       the first compiler pass and jump directly to the runtime (just-too-late) compiler.
       However, if the optimiser has been selected when these objects were compiled, and there
       are no postprocessor statements, the just-too-late compiler will be automatically replaced
       by a more traditional "compile-time" compiler. If this is confusing, wait until you see
       the rest.

       If a file is specified without suffix, and there is a compiler object in the include path
       with the same name and suffix .io, the suffix is automatically added, whether you wanted
       it or now.

       As soon as each program is written into sick, a pre-compiler will produce an internal
       compiler object. If sick enters interactive mode, these objects will be available in
       memory for single-stepping, running, or just ignoring completely and getting on with the
       real work.

       If sick loads all the required programs and objects successfully, but does not enter
       interactive mode, any program source is read back out to disk in object format, using the
       same file name with the suffix replaced by .io if no output file is specified. If a
       backend is specified in the command line before a program is loaded, sick will produce an
       executable via that backend instead of an object.

       The compiler accepts several options, some of which are documented here.  Options and
       files can be mixed in any order, each file is loaded and compiled using whatever options
       precedes it on the command line. For example:

           sick --verbose --optimise prog1.i --quiet prog2.i --batch

       will tell you everything about compiling prog1.i but not about prog2.i.  Both programs
       will be optimised. On the other hand:

           sick --optimise prog1.i --nooptimise prog2.i --batch

       will optimise prog1.i but not prog2.i.

       All options can be "undone" (sometimes it's even clear how) except --include which applies
       to all objects loaded after it, and --rcfile which applies to all objects, even the ones
       loaded before it (just to be different).

   User Interface Options
       -X / --graphic
           Enters X-based graphical user interface. Requires Perl-GTK. This is the default if
           Perl-GTK is installed, the environment variable $DISPLAY is set and the opening of the
           X display succeeds.

       -c / --curses
           Enters full screen, curses-based interface. This is the default if the X based
           interface cannot be started, the environment variable $TERM is set and the terminal
           name is known.

       --line
           Enters the line-mode user interface. This is the default if the X based and the curses
           based interfaces do not work.

       --batch
           Avoids entering interactive mode. This is the default if the standard input and output
           are not connected to a terminal and the X based interface cannot be started.

       -itype / --interface=type
           Selects the user interface type. Currently, only X, Curses, Line and None are defined,
           but more can be installed as compiler plug-ins. If the interface selected is None,
           sick will work in batch mode. In addition, an empty string will reinstate the default
           behaviour.

   Source Character Set Options
       -a / --ascii
           Assumes that program source is in ASCII.

       -b / --baudot
           Assumes that program source is in Baudot.

       -e / --ebcdic
           Assumes that program source is in EBCDIC.

       -h / --hollerith
           Assumes that program source is in Hollerith.

       -g / --guess
           Does not make assumptions about the source character set. If the character set cannot
           be guessed, will produce an error. This is the default.

       --charset=name
           Assumes that program source is in the given character sets. Valid values are currently
           ASCII, Baudot, EBCDIC, Hollerith; an empty name is equivalent to specifying option
           --guess).

   Code Generation Options
       -O / --optimise
           Invokes the optimiser. This is a letter o, not a zero. This will cause the extra
           object optimise.io to be prefixed after the last compiler and before the real program.
           The program is then executed: when the optimiser takes control, it will force
           compilation of the rest of the program (thereby executing the compiler at compile-
           time, instead of runtime as it normally does), and the resulting object is
           checkpointed, so the next time it will automatically skip the initialisation and
           compilation stages. In addition, the "optimise" register is set, instructing the
           compiler to invoke the optimiser when it runs.

           If you specify -O and -poptimise (see below), you are asking for trouble, so don't do
           that.

       --nooptimise
           Disables automatic preloading and execution of optimise.io.

       -oname / --output=name
           Selects a name for the output file. Some character sequences are recognised inside
           name: %p will be replaced by the source program's basename; %s will be replaced by the
           appropriate suffix for the selected backend, %o will provide the original file name
           specified on the command line, without suffix (this can differ from %s because %s can
           be prefixed with a directory from the search path) and %% will produce a single %.

           The default is %p.%s, which produces the object name described at the beginning of
           this document. A suffix is not automatically added if the output name does not contain
           %s; this might be useful in ocnjunction with the Perl backend to produce a file
           without a suffix, for example:

               sick --output=%p --backend=Perl sourcefile.i

           will compile sourcefile.i and produce perl script sourcefile.

           If the output file is specified as an empty string, the code generation step will
           never be done.

       -nname / --name=name
           Sets the program's name, if the code generator requires it (currently, no backends use
           a name, but some of the planned ones will). The default is %o. The same %-escapes as
           defined for the output file name are defined.

       -lname / --backend=name
           Selects a different compiler back end. The default is Object, which produces a
           compiler object (suffix .io). The distribution also includes a Perl backend, which
           produces an executable Perl program (suffix .pl).  In addition, the pseudo backend Run
           will run the program instead of writing any object. In this case, the output file name
           is ignored. Note that the program will only run if the compiler is in batch mode.
           Other back ends can be provided as compiler plug ins. The distribution also contains a
           ListObject backend, which does not produce executables but object listings. A future
           version might allow to "compile" the output of the ListObject back end, but this is
           currently impossible because not all the internal state of the object is provided,
           only the part which is likely to be useful to a human reader.

       --bug=number
           Selects a different probability for the compiler bug. The compiler bug is implemented
           by initialising the compiler's state with the required probability: when a statement
           is compiled (usually at runtime), a "BUG" instruction is emitted with the required
           probability. The default is 1%.

       --ubug=number
           Selects a probability for the unexplainable compiler bug. This is the compiler bug
           which occurs when the probability of a (explainable) compiler bug is zero.  Only wimps
           would use this option. The default is 0.01%.

       -pname / --preload=name
           Selects a compiler object to prefix to the program. If this option is specified, the
           compiler won't automatically prefix objects as suggested by the suffix. The program
           'oo, ick' included in previous version of CLC-INTERCAL used option -p to select a
           parser. Since the main use of preloads is to select an alternative (runtime) compiler,
           it is felt that it is appropriate to keep the same letter for this option.

           The file name specified does not include the suffix .io, which is always added. The
           file must be a compiler object, not source code.

           The special object optimise should always loaded via -O. Using -poptimise will not
           necessarily put the object in the correct place, and will not instruct the precompiler
           to do whatever magic it needs to do to bootstrap the optimiser.

           To completely disable preloading (this is only done when compiling the optimiser,
           which is used to compile itself) use an empty string.

       --nopreload
           Resets the default behaviour of selecting preloads based on suffixes.

       --suffix=suffix
           Specifies a suffix to use when selecting preloads. If this option is not specified,
           the suffix is taken from the file name to be compiled.

       -Ipath / --include=path
           Adds a directory before the standard search path for compiler objects and source code.
           If a file is accessible from the current directory, it is never searched in any
           include path.

           If this option is repeated, the given paths will be searched in the order given,
           followed by the standard paths.

   Misc Options
       -rname / --rcfile=name
           Executes commands from file name before entering interactive mode.  This option can be
           repeated, to execute more than one file. If it is not specified, the standard library,
           the current directory, and the current user's home directory are searched for files
           with name system.sickrc or .sickrc, which are then executed. The order for this search
           is: specified library (--include), system library, home directory, current directory.
           This is different from the search order used when looking for objects or source code.
           If a directory contains both .sickrc and system.sickrc, the system.sickrc is executed
           first, followed by .sickrc. Also note that if the current directory or the home
           directory appear in the search path and contain one of these files, they will be
           executed twice.

           If filenames are explicitely specified, they must be fully qualified: the search path
           is not used to find them.

       --nouserrc
           Prevents loading a user rcfile (.sickrc); also limits loading of system.sickrc to the
           first one found. This option is normally only used during installation, to prevent
           interference from previous versions of CLC-INTERCAL.

       -v / --verbose
           Tells everything it's doing (on Standard Error).

       --stdverb=file
           Sends verbose output to file.

       --trace
           Enables tracing; if compiling from source, the compiler is also traced; to trace a
           program, compile it to an object and then run it with --trace.

       --stdtrace=file
           Enables tracing and selects an output file for the trace information.

       --notrace
           Disables tracing; preloading trace.io has priority over this option.

       -q / --quiet
           Stop talking to Standard Error.

       --times
           Prints a summary of the time take for each major action. This setting is independent
           of --verbose.

       --notimes
           Does not print execution times: this is the default.

       --rclist
           Prints the names of all rcfiles found. It prevents starting interactive mode.  For
           example, the following command (which should work with any Unix shell) opens all the
           system and user sickrc files in your favourite editor:

               sh -c '"${EDITOR:-vi}" "`sick --rclist`"'

           This can be useful to update the defaults.

BUGS

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

SEE ALSO

       The INTERCAL on-line documentation, by entering sick's interactive mode and finding the
       "help" menu (X), key (Curses) or command (Line).