.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "SICK 1p" .TH SICK 1p "2008-03-29" "perl v5.18.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" sick \- Compiler for CLC\-INTERCAL .SH "SYNOPSIS" .IX Header "SYNOPSIS" \&\fBsick\fR [options] \fBfiles\fR... .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\fBsick\fR 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. .PP The program will be compiled using a compiler selected using command line options; if nothing is selected, the compiler depends on the file suffix: .IP "CLC-INTERCAL program source" 4 .IX Item "CLC-INTERCAL program source" These files must have suffix \fB.i\fR or \fB.clci\fR. These will be prefixed, by default, with the compiler object \fIsick.io\fR. .IP "CLC-INTERCAL compiler source" 4 .IX Item "CLC-INTERCAL compiler source" These files must have suffix \fB.iacc\fR. These will be prefixed, by default, with the compiler object \fIiacc.io\fR 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). .IP "C\-INTERCAL program source" 4 .IX Item "C-INTERCAL program source" These have suffix \fB.ci\fR and will be prefixed with the compiler object \&\fIick.io\fR. .IP "CLC-INTERCAL assembler source" 4 .IX Item "CLC-INTERCAL assembler source" These have suffix \fB.iasm\fR and will be prefixed with the compiler object \&\fIasm.io\fR. .IP "Traditional \s-1INTERCAL\s0 program source" 4 .IX Item "Traditional INTERCAL program source" These will have suffix \fB.1972\fR and will be prefixed with the compiler object \fI1972.io\fR .IP "Compiler extensions" 4 .IX Item "Compiler extensions" Suffixes \fB.i\fR, \fB.ci\fR, \fB.clci\fR and \fB.iasm\fR can contain a list of letters and numbers between the spot (\fB.\fR) and the rest of the suffix; these select compiler extensions to be added. .RS 4 .IP "Base" 8 .IX Item "Base" Numbers between \fB2\fR and \fB7\fR change the default base by loading compiler objects \fB2.io\fR to \fB7.io\fR. .IP "Bitwise Divide" 8 .IX Item "Bitwise Divide" Letter \fBd\fR in the suffix adds the compiler object \fIbitwise\-divide.io\fR, which changes the normal unary divide operation to use bitwise, rather than arithmetic, shifts. It can be used with \fIsick\fR or \fIiasm\fR but not with \fIick\fR. .IP "\s-1COME FROM\s0 gerund" 8 .IX Item "COME FROM gerund" Letter \fBg\fR in the suffix adds the compiler object \fIcome\-from\-gerund.io\fR, which enables the \s-1COME FROM\s0 gerund statements; since \fIick\fR does not parse such statements, this letter can only be used with \fIsick\fR or \fIiasm\fR. .IP "Computed labels" 8 .IX Item "Computed labels" Letter \fBl\fR in the suffix adds the compiler object \fIcomputed\-labels.io\fR, which adds grammar rules to parse computed statement labels; this can be used only with \fIsick\fR. .IP "\s-1NEXT\s0" 8 .IX Item "NEXT" Letter \fBn\fR in the suffix adds the compiler object \fInext.io\fR, which enables the \s-1NEXT\s0 statement in \fIsick\fR; since \fIick\fR enables this by default, this letter can only be used with \fIsick\fR. .IP "INTERcal NETworking" 8 .IX Item "INTERcal NETworking" Letter \fBr\fR in the suffix adds the compiler object \fIinternet.io\fR, which adds syntax for the \fI\s-1STEAL\s0\fR, \fI\s-1SMUGGLE\s0\fR and \fI\s-1CASE\s0\fR statements; it can be used with \fIick\fR or \fIsick\fR. .IP "System call" 8 .IX Item "System call" Letter \fBs\fR in the suffix adds the compiler object \fIsyscall.io\fR, which hides a \*(L"\s-1PLEASE NEXT FROM \s0(666)\*(R" in a dark corner of your operating system. .IP "Threaded program" 8 .IX Item "Threaded program" Letter \fBt\fR in the suffix selects threaded mode by loading compiler object \&\fIthick.io\fR. This also changes the default compiler to \fIick\fR if the suffix is \fB.i\fR: to use \fIsick\fR one would use \fI.tclci\fR. .IP "Wimp mode" 8 .IX Item "Wimp mode" Letter \fBw\fR in the suffix adds the compiler object \fIwimp.io\fR, which causes the program to start in wimp mode when it is executed. An equivalent result can be obtained by passing the \fB\-\-wimp\fR option to the executable program. .RE .RS 4 .RE .PP The actual list of suffixes recognised can be changed by editing the file \&\fIsystem,sickrc\fR or \fI.sickrc\fR. See the option \fB\-\-rcfile\fR for a discussion on how and where \fBsick\fR finds these files, and sickrc for a description of the file format. .PP 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 \fB\-suffix\fR=\fIS\fR \- in this case, the compiler acts as if the file had name \fIname.S\fR .PP 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 \*(L"compile-time\*(R" compiler. If this is confusing, wait until you see the rest. .PP If a file is specified without suffix, and there is a compiler object in the include path with the same name and suffix \fB.io\fR, the suffix is automatically added, whether you wanted it or now. .PP As soon as each program is written into \fBsick\fR, a pre-compiler will produce an internal compiler object. If \fBsick\fR 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. .PP If \fBsick\fR 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 \fB.io\fR if no output file is specified. If a backend is specified in the command line before a program is loaded, \fBsick\fR will produce an executable via that backend instead of an object. .PP 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: .PP .Vb 1 \& sick \-\-verbose \-\-optimise prog1.i \-\-quiet prog2.i \-\-batch .Ve .PP will tell you everything about compiling \fIprog1.i\fR but not about \fIprog2.i\fR. Both programs will be optimised. On the other hand: .PP .Vb 1 \& sick \-\-optimise prog1.i \-\-nooptimise prog2.i \-\-batch .Ve .PP will optimise \fIprog1.i\fR but not \fIprog2.i\fR. .PP All options can be \*(L"undone\*(R" (sometimes it's even clear how) except \&\fB\-\-include\fR which applies to all objects loaded after it, and \&\fB\-\-rcfile\fR which applies to all objects, even the ones loaded before it (just to be different). .SS "User Interface Options" .IX Subsection "User Interface Options" .IP "\fB\-X\fR / \fB\-\-graphic\fR" 4 .IX Item "-X / --graphic" Enters X\-based graphical user interface. Requires Perl-GTK. This is the default if Perl-GTK is installed, the environment variable \fI\f(CI$DISPLAY\fI\fR is set and the opening of the X display succeeds. .IP "\fB\-c\fR / \fB\-\-curses\fR" 4 .IX Item "-c / --curses" Enters full screen, curses-based interface. This is the default if the X based interface cannot be started, the environment variable \fI\f(CI$TERM\fI\fR is set and the terminal name is known. .IP "\fB\-\-line\fR" 4 .IX Item "--line" Enters the line-mode user interface. This is the default if the X based and the curses based interfaces do not work. .IP "\fB\-\-batch\fR" 4 .IX Item "--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. .IP "\fB\-i\fR\fItype\fR / \fB\-\-interface\fR=\fItype\fR" 4 .IX Item "-itype / --interface=type" Selects the user interface \fItype\fR. Currently, only \fIX\fR, \fICurses\fR, \&\fILine\fR and \fINone\fR are defined, but more can be installed as compiler plug-ins. If the interface selected is \fINone\fR, \fBsick\fR will work in batch mode. In addition, an empty string will reinstate the default behaviour. .SS "Source Character Set Options" .IX Subsection "Source Character Set Options" .IP "\fB\-a\fR / \fB\-\-ascii\fR" 4 .IX Item "-a / --ascii" Assumes that program source is in \s-1ASCII.\s0 .IP "\fB\-b\fR / \fB\-\-baudot\fR" 4 .IX Item "-b / --baudot" Assumes that program source is in Baudot. .IP "\fB\-e\fR / \fB\-\-ebcdic\fR" 4 .IX Item "-e / --ebcdic" Assumes that program source is in \s-1EBCDIC.\s0 .IP "\fB\-h\fR / \fB\-\-hollerith\fR" 4 .IX Item "-h / --hollerith" Assumes that program source is in Hollerith. .IP "\fB\-g\fR / \fB\-\-guess\fR" 4 .IX Item "-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. .IP "\fB\-\-charset\fR=\fIname\fR" 4 .IX Item "--charset=name" Assumes that program source is in the given character sets. Valid values are currently \fI\s-1ASCII\s0\fR, \fIBaudot\fR, \fI\s-1EBCDIC\s0\fR, \fIHollerith\fR; an empty \fIname\fR is equivalent to specifying option \fB\-\-guess\fR). .SS "Code Generation Options" .IX Subsection "Code Generation Options" .IP "\fB\-O\fR / \fB\-\-optimise\fR" 4 .IX Item "-O / --optimise" Invokes the optimiser. This is a letter o, not a zero. This will cause the extra object \fIoptimise.io\fR 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 \*(L"optimise\*(R" register is set, instructing the compiler to invoke the optimiser when it runs. .Sp If you specify \fB\-O\fR and \fB\-poptimise\fR (see below), you are asking for trouble, so don't do that. .IP "\fB\-\-nooptimise\fR" 4 .IX Item "--nooptimise" Disables automatic preloading and execution of \fIoptimise.io\fR. .IP "\fB\-o\fR\fIname\fR / \fB\-\-output\fR=\fIname\fR" 4 .IX Item "-oname / --output=name" Selects a name for the output file. Some character sequences are recognised inside \fIname\fR: \fI\f(CI%p\fI\fR will be replaced by the source program's basename; \&\fI\f(CI%s\fI\fR will be replaced by the appropriate suffix for the selected backend, \&\fI\f(CI%o\fI\fR will provide the original file name specified on the command line, without suffix (this can differ from \fI\f(CI%s\fI\fR because \fI\f(CI%s\fI\fR can be prefixed with a directory from the search path) and \fI%%\fR will produce a single \fI%\fR. .Sp The default is \fI\f(CI%p\fI.%s\fR, 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 \fI\f(CI%s\fI\fR; this might be useful in ocnjunction with the \fIPerl\fR backend to produce a file without a suffix, for example: .Sp .Vb 1 \& sick \-\-output=%p \-\-backend=Perl sourcefile.i .Ve .Sp will compile \fIsourcefile.i\fR and produce perl script \fIsourcefile\fR. .Sp If the output file is specified as an empty string, the code generation step will never be done. .IP "\fB\-n\fR\fIname\fR / \fB\-\-name\fR=\fIname\fR" 4 .IX Item "-nname / --name=name" Sets the program's \fIname\fR, if the code generator requires it (currently, no backends use a name, but some of the planned ones will). The default is \&\fI\f(CI%o\fI\fR. The same %\-escapes as defined for the output file name are defined. .IP "\fB\-l\fR\fIname\fR / \fB\-\-backend\fR=\fIname\fR" 4 .IX Item "-lname / --backend=name" Selects a different compiler back end. The default is \fIObject\fR, which produces a compiler object (suffix \fI.io\fR). The distribution also includes a \fIPerl\fR backend, which produces an executable Perl program (suffix \fI.pl\fR). In addition, the pseudo backend \fIRun\fR 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 \fIListObject\fR backend, which does not produce executables but object listings. A future version might allow to \*(L"compile\*(R" the output of the \fIListObject\fR 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. .IP "\fB\-\-bug\fR=\fInumber\fR" 4 .IX Item "--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 \*(L"\s-1BUG\*(R"\s0 instruction is emitted with the required probability. The default is 1%. .IP "\fB\-\-ubug\fR=\fInumber\fR" 4 .IX Item "--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%. .IP "\fB\-p\fR\fIname\fR / \fB\-\-preload\fR=\fIname\fR" 4 .IX Item "-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 \fB'oo, ick'\fR included in previous version of CLC-INTERCAL used option \fB\-p\fR 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. .Sp The file name specified does not include the suffix \fI.io\fR, which is always added. The file must be a compiler object, not source code. .Sp The special object \fIoptimise\fR should always loaded via \fB\-O\fR. Using \&\fB\-poptimise\fR 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. .Sp To completely disable preloading (this is only done when compiling the optimiser, which is used to compile itself) use an empty string. .IP "\fB\-\-nopreload\fR" 4 .IX Item "--nopreload" Resets the default behaviour of selecting preloads based on suffixes. .IP "\fB\-\-suffix\fR=\fIsuffix\fR" 4 .IX Item "--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. .IP "\fB\-I\fR\fIpath\fR / \fB\-\-include\fR=\fIpath\fR" 4 .IX Item "-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. .Sp If this option is repeated, the given paths will be searched in the order given, followed by the standard paths. .SS "Misc Options" .IX Subsection "Misc Options" .IP "\fB\-r\fR\fIname\fR / \fB\-\-rcfile\fR=\fIname\fR" 4 .IX Item "-rname / --rcfile=name" Executes commands from file \fIname\fR 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 \&\fIsystem.sickrc\fR or \fI.sickrc\fR, which are then executed. The order for this search is: specified library (\fB\-\-include\fR), 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 \fI.sickrc\fR and \fIsystem.sickrc\fR, the \fIsystem.sickrc\fR is executed first, followed by \fI.sickrc\fR. 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. .Sp If filenames are explicitely specified, they must be fully qualified: the search path is not used to find them. .IP "\fB\-\-nouserrc\fR" 4 .IX Item "--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. .IP "\fB\-v\fR / \fB\-\-verbose\fR" 4 .IX Item "-v / --verbose" Tells everything it's doing (on Standard Error). .IP "\fB\-\-stdverb\fR=\fIfile\fR" 4 .IX Item "--stdverb=file" Sends verbose output to \fIfile\fR. .IP "\fB\-\-trace\fR" 4 .IX Item "--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 \fB\-\-trace\fR. .IP "\fB\-\-stdtrace\fR=\fIfile\fR" 4 .IX Item "--stdtrace=file" Enables tracing and selects an output file for the trace information. .IP "\fB\-\-notrace\fR" 4 .IX Item "--notrace" Disables tracing; preloading \fItrace.io\fR has priority over this option. .IP "\fB\-q\fR / \fB\-\-quiet\fR" 4 .IX Item "-q / --quiet" Stop talking to Standard Error. .IP "\fB\-\-times\fR" 4 .IX Item "--times" Prints a summary of the time take for each major action. This setting is independent of \fB\-\-verbose\fR. .IP "\fB\-\-notimes\fR" 4 .IX Item "--notimes" Does not print execution times: this is the default. .IP "\fB\-\-rclist\fR" 4 .IX Item "--rclist" Prints the names of all rcfiles found. It prevents starting interactive mode. For example, the following command (which should work with \fIany\fR Unix shell) opens all the system and user sickrc files in your favourite editor: .Sp .Vb 1 \& sh \-c \*(Aq"${EDITOR:\-vi}" "\`sick \-\-rclist\`"\*(Aq .Ve .Sp This can be useful to update the defaults. .SH "BUGS" .IX Header "BUGS" There are more options than \fIls\fR\|(1). This is construed to be a feature. .SH "SEE ALSO" .IX Header "SEE ALSO" The \s-1INTERCAL\s0 on-line documentation, by entering \fBsick\fR's interactive mode and finding the \*(L"help\*(R" menu (X), key (Curses) or command (Line).