Compiler Control Records

Compiler control options are included in an ALGOL program by using special source records called compiler control records. A compiler control record can contain more than one option. All options on a compiler control record must follow the currency sign ($). At least one space must follow each option. No option can continue past column 72 of a compiler control record.

<compiler control record>

──┬─ $  ─┬─┬─────────────────────┬─┬───────────────────┬───────────────►
  └─ $$ ─┘ │ ┌◄────────────────┐ │ ├─<dumpinfo option>─┤
           ├─┴─<option phrase>─┴─┘ ├─<loadinfo option>─┤
           │                       └─<include option>──┤
           └─<binder command>──────────────────────────┘
►─<escape remark>──────────────────────────────────────────────────────┤

<option phrase>

              ┌◄───────────────────────┐
──┬─────────┬─┴─┬────────────────────┬─┴────────────────────┬──────────┤
  ├─ SET ───┤   ├─<Boolean option>───┤                      │
  ├─ POP ───┤   ├─<immediate option>─┤                      │
  ├─ RESET ─┘   └─<value option>─────┘                      │
  │       ┌◄──────────────────────────────────────────────┐ │
  └─ SET ─┴─<Boolean option>─┬──────────────────────────┬─┴─┘
                             └─ = ──<option expression>─┘

<Boolean option>

A <Boolean option> can be any of the following:

<ASCII option>

<listincl option>

<seqerr option>

<autobind option>

<listomitted option>

<single option>

<bindRPC option>

<listp option>

<stack option>

<check option>

<map option>

<time option>

<code option>

<MCP option>

<user option>

<CORISOL option>

<merge option>

<void option>

<delete option>

<new option>

<voidt option>

<dinteger option>

<newseqerr option>

<waitimport> option

<errlist option>

<nobindinfo option>

<warnsupr option>

<errorlist option>

<nostackarrays option>

<writeafter option>

<format option>

<noxreflist option>

<xdecs option>

<inclnew option>

<omit option>

<xref option>

<inclseq option>

<optimize option>

<xreffiles option>

<installation option>

<rangecheck option>

<xrefs option>

<intrinsics option>

<segs option>

<seqerr option>

<library option>

<seq option>

<single option>

<lineinfo option>

<sequence option>

<time option>

<list option>

<strings option>

<time6check option>

<listdeleted option>

<statistics option>

 

<listdollar option>

<TADS option>

<immediate option>

──┬─<beginsegment option>─┬────────────────────────────────────────────┤
  ├─<binder_match option>─┤
  ├─<endsegment option>───┤
  ├─<go to option>────────┤
  └─<page option>─────────┘

<value option>

──┬─<code_suffix option>────────┬──────────────────────────────────────┤
  ├─<dictionary option>─────────┤
  ├─<level option>──────────────┤
  ├─<limit option>──────────────┤
  ├─<li_suffix option>──────────┤
  ├─<segdescabove option>───────┤
  ├─<sequence base option>──────┤
  ├─<sequence increment option>─┤
  ├─<sharing option>────────────┤
  ├─<status option>─────────────┤
  ├─<target option>─────────────┤
  └─<version option>────────────┘

<option expression>

  ┌◄───┬── AND ─┬────┐
  │    ├◄─ OR ──┤    │
  │    ├◄─ IMP ─┤    │
  │    └◄─ EQV ─┘    │
──┴─<option primary>─┴─────────────────────────────────────────────────┤

<option primary>

──┬───────┬─┬─<user option>─────────────────┬──────────────────────────┤
  ├─ NOT ─┤ ├─ TRUE ────────────────────────┤
  └─ ^ ───┘ ├─ FALSE ───────────────────────┤
            ├─ * ───────────────────────────┤
            └─ ( ──<option expression>── ) ─┘

<binder command>

──┬─<bind option>───────┬──────────────────────────────────────────────┤
  ├─<binder option>─────┤
  ├─<external option>───┤
  ├─<host option>───────┤
  ├─<initialize option>─┤
  ├─<purge option>──────┤
  ├─<stop option>───────┤
  └─<use option>────────┘

Compiler control records are submitted to the ALGOL compiler as part of the source input and are distinguished from other constructs by the dollar sign ($) that must begin every compiler control record.

Compiler control records with the $ in column 1 but not in column 2 affect only the current compilation and are not saved in the NEWSOURCE file, if there is one. Compiler control records with the $$ in columns 1 and 2, or a blank in column 1 and a $ in column 2, are considered permanent compiler control records and are saved in the NEWSOURCE file, if there is one.

A compiler control record can contain the following:

  • Boolean options

  • Value options

  • Immediate options

  • Special options

  • Binder commands

A Boolean option is one that is either enabled (TRUE) or disabled (FALSE). When enabled, it causes the compiler to apply an associated function to all subsequent processing until the option is disabled.

A value option causes the compiler to store a value associated with a given function.

An immediate option causes the compiler to perform immediately a function that is not applied to subsequent processing.

The special options (the DUMPINFO option, the LOADINFO option, and the INCLUDE option), like the immediate options, cause the compiler to perform immediately a function that is not applied to subsequent processing. However, they are not grouped with the immediate options because of special syntactic requirements.

Binder commands are passed directly to the Binder program. For more information on Binder statements and control options, refer to the Binder Programming Reference Manual.

The keywords SET, RESET, and POP affect the value of Boolean options. Each Boolean option has an associated stack in which the current value and up to 46 previous values of the option are saved. The management of this stack of values is as follows:

  1. If the first keyword to the left of a Boolean option in a compiler control record is SET or RESET, the current value of the option is pushed onto the stack and the option is assigned a value of TRUE or FALSE, respectively. In other words, the option is assigned a new value, and the previous value is saved in the stack.

  2. If the first keyword to the left of a Boolean option in a compiler control record is POP, the current value of the option is discarded and the previous value is removed from the top of the stack and assigned to the option.

  3. If a Boolean option is not preceded in a compiler control record by any keyword, then the following actions occur:

    1. All resettable standard Boolean options are assigned a value of FALSE and all previous values in their stacks are discarded.

    2. The Boolean options appearing in the compiler control record with no preceding keyword are assigned a value of TRUE.

The following is a list of the resettable standard Boolean options that are affected when a Boolean option appears in a compiler control record without a preceding keyword:

ASCII

LISTDELETED

SEQUENCE

AUTOBIND

LISTDOLLAR

SEQERR

CHECK

LISTINCL

STACK

CODE

LISTP

STATISTICS

DELETE

STRINGS

ERRLIST (set to TRUE for CANDE-originated compiles)

MAP

TIME

ERRORLIST (set to TRUE for CANDE-originated compiles)

MERGE

VOID

FORMAT

NEW

VOIDT

INCLNEW

NEWSEQERR

WARNSUPR

INCLSEQ

NOXREFLIST

WRITEAFTER

INSTALLATION

OMIT

XDECS

INTRINSICS

OPTIMIZE

XREF

LIBRARY (set to TRUE for CANDE-originated compiles)

PARAMCHECK

XREFFILES

LINEINFO (if the first syntactic item has not been seen; set to TRUE for CANDE-originated compiles)

SEGS

XREFS

LIST

SEQ

XREFWAIT

A compiler control record that consists of only an initial $ (a $ followed by all blanks) has no effect unless it is in the CARD file, the MERGE option is TRUE, and a record is present in the secondary input file TAPE that has the same sequence number as this compiler control record. When these three conditions are met, then that TAPE record is ignored.

In an <option expression>, the Boolean operators have the same precedence as they do in Boolean expressions; that is, NOT and ^ are equivalent and have the highest precedence, followed by AND, OR, IMP, and EQV, in that order. The <option primary> “*” represents the current value of the Boolean option whose value is being assigned. For example, the following compiler control record causes records from both the CARD and TAPE files to be ignored if either the OMIT option is TRUE or the user option DEBUGCODE is TRUE.

$ SET OMIT = * OR DEBUGCODE

Examples

The following compiler control record assigns a value of TRUE to the LIST option, MERGE option, and NEW option, and assigns a value of FALSE to the SINGLE option. The previous value of each of these options is saved in the corresponding stack.

$ SET LIST MERGE NEW RESET SINGLE

The following compiler control record invokes the immediate option PAGE, causing the compiler to skip the printer listing to the top of the next page (if the LIST option is TRUE). Because the PAGE option is not a Boolean option, the action described above for Boolean options not preceded by a keyword does not occur.

$ PAGE

The following compiler control record assigns a value of TRUE to the LISTP option, assigns the value 135000 to the sequence base option, and returns the LIST option to its most recent previous value:

$ SET LISTP 135000 POP LIST

The following compiler control record assigns FALSE to all resettable standard Boolean options and discards all previous values in their stacks, assigns the value TRUE to the LISTP option, and returns the USER option MYOPTION to its most recent previous value. The stack for MYOPTION is unaffected by the purge of the stacks for the standard resettable Boolean options, because it is not a standard option.

$ LISTP POP MYOPTION