Skip to main content

Crate ironwork_compile

Crate ironwork_compile 

Source
Expand description

ironwork for COBOL, the compiler: a parsed program checked against IBM’s rules, with its WORKING-STORAGE laid out as IBM lays it out, ready for the interpreter or for lowering.

Modules§

collating
Collating sequences: the order an ALPHABET clause gives the single-byte characters. PROGRAM COLLATING SEQUENCE makes one the program’s, for its alphanumeric comparisons, HIGH-VALUE, LOW-VALUE, CHAR and ORD; the COLLATING SEQUENCE phrase makes one a SORT’s or MERGE’s.
declaratives
USE AFTER EXCEPTION/ERROR and USE FOR DEBUGGING procedures at compile time: the files, open mode or procedures each serves, and the rules the Language Reference (SC27-8713-03) sets for them. They run in machine::declaratives.
function
User-defined functions (FUNCTION-ID): the rules a definition or prototype keeps, the prototypes an invocation is checked against (Language Reference, the USING phrase’s conformance of parameters for user-defined functions), and the formal parameters and result the interpreter invokes one with.
layout
WORKING-STORAGE as IBM lays it out: sizes by USAGE and PICTURE, REDEFINES sharing storage, OCCURS repeating it, SYNCHRONIZED slack bytes before an item and after each occurrence, and level-66 RENAMES over what is laid out. See numeric::assumptions::WORKING_STORAGE_LAYOUT for where each 01 level starts.
linage
LINAGE: a print file’s logical page (numeric::assumptions::LINAGE_COUNTER). OPEN OUTPUT or EXTEND takes the page body, first footing line and margins from the FD’s integers and data items, and each new page takes the data items’ values again. LINAGE-COUNTER is the line of the page body the printer is at; WRITE moves the paper past the footing area and the margins in lines (numeric::assumptions::LINAGE_PAGE_MOVEMENT).
markup
The special registers of JSON GENERATE and the XML statements (Language Reference SC27-8713-03, pp. 21-37): JSON-CODE, JSON-STATUS, XML-CODE, XML-EVENT and XML-INFORMATION are declared for a program that has the statement; XML-TEXT and the others whose length varies are located while it runs.
numcheck
NUMCHECK’s facts known when compiled: what ZON(LAX) tolerates in each zoned item because of the item its record redefines (assumption numeric::assumptions::NUMCHECK_LAX_REDEFINES), and the tests the compiler finds always fail, which it reports with an error-level message and removes (assumption numeric::assumptions::NUMCHECK_ALWAYS_FAILS; Programming Guide SC27-8714-03, pp. 388-391).
oo
Object-oriented COBOL, compiled and checked. A class written in COBOL becomes code the interpreter runs within the run unit: each method is compiled as a program whose LINKAGE SECTION ends with the records of the OBJECT or FACTORY WORKING-STORAGE it works on, and each INVOKE finds its method by name and Java signature, as the JNI does. Running is in rt::oo; a Java class is checked here and never run.
picture
printer
The printer control character (numeric::assumptions::PRINT_CONTROL_CHARACTER). A sequential file that a WRITE … ADVANCING of the program names, whose FD has LINAGE, or that holds a report is a print file: every record written to it carries a control character, an ASA character when every WRITE … ADVANCING of the file says AFTER, a machine code when one says BEFORE. Under ADV the character is a byte before the record; under NOADV it is the record’s first byte.
report
The report writer at compile time. Enterprise COBOL runs Report Writer only as the Report Writer Precompiler’s generated COBOL (numeric::assumptions::REPORT_WRITER_PRECOMPILER), and this follows it: each report’s lines and fields are placed; its report control area (PAGE-COUNTER, LINE-COUNTER, the writer’s own state and saved controls), its printed fields and its SUM totals become WORKING-STORAGE (numeric::assumptions::REPORT_CONTROL_AREA); and every name is resolved. rt::report runs the result.
sort
SORT and MERGE at compile time: what is checked, and the special registers a program with an SD gets. They run in rt::sort.
sql
The host type of a declared item, which EXEC SQL binds by: what rt::sql needs from the layout.

Structs§

Compiled
EntryPoint
An alternate entry point: a CALL of name begins at statement statement of paragraph paragraph, the one after the ENTRY statement, with using addressing LINKAGE.
Unnamed
Why a procedure-name names no one procedure: the catalogue’s message and its text.

Constants§

INTO_WITHOUT_COLON
NUMERIC_FUNCTION_MOVED

Functions§

compile
Checks and lays out a parsed program. flags are this compiler’s own, such as -silent. A program is refused, with every message, when one stops its object code: under IBM’s default NOCOMPILE(S) one that is S or U, from W under -warnings-block, or as a CBL or PROCESS card’s COMPILE or NOCOMPILE says; otherwise its messages are Compiled::diagnostics.
compile_at
Compiles as compile does, WHEN-COMPILED giving at.
compile_time
When a compile happens: SOURCE_DATE_EPOCH’s seconds when the build sets it, the reproducible-builds convention, and the clock otherwise.
entry_points
The ENTRY statements of a program, each a sentence of its own paragraph’s.
is_alphabetic
A PICTURE of the symbol A alone, repeated or with a count.
procedure
The first and last paragraph a procedure name covers: one paragraph, or a whole section.
procedure_from
procedure for a name written in paragraph from that no statement holds as a procedure-name, such as a WHENEVER or HANDLE label or a USE FOR DEBUGGING operand, qualified with from’s section as qualify_in_own_section qualifies a statement’s.
read_lengths
The shortest and longest variable-length record a READ of file k takes without a record length conflict: under VLR(STANDARD) its level-01 records’, under VLR(COMPAT) its RECORD IS VARYING clause’s, where a bound the clause leaves out is the level-01 records’ (Programming Guide SC27-8714-03, pp. 422-424; Language Reference SC27-8713-03, pp. 187, 300, 431). See numeric::assumptions::VLR_WITHOUT_VARYING and numeric::assumptions::VLR_RECORDS_CHECKED.
refused
Whether messages keep a program from running: the COMPILE option in force stops its object code, or, as IGYWCLG bypasses its GO step, the return code is above 8. See numeric::assumptions::REFUSED_FROM_S and numeric::assumptions::NOCOMPILE.
section_end
The last paragraph of the section that paragraph i is in, or i when there are no sections. END DECLARATIVES ends a section as a section header does.
variable_records
Whether file k’s records vary in length: RECORDING MODE V, RECORD IS VARYING, a RECORD clause with two bounds, or, with neither RECORDING MODE nor RECORD, level-01 records of different lengths or with an OCCURS DEPENDING ON table, an SD’s as well (Language Reference SC27-8713-03, p. 191; Programming Guide SC27-8714-03, pp. 227-228).
varying_lengths
The shortest and longest record RECORD IS VARYING allows file k, a bound it leaves out being the level-01 records’ (Language Reference SC27-8713-03, p. 187).