Expand description
ironwork for COBOL: from fixed-format source text to a syntax tree. Nothing here knows about storage or execution.
Modules§
- ast
- bms
- BMS map source (the DFHMSD, DFHMDI and DFHMDF assembler macros) as a mapset model, and the COBOL symbolic map a program COPYs for it.
- copy
- COPY and COPY REPLACING, applied to the logical text before it is lexed. Matching is by
text-words, as the standard defines them, and replacement edits the text itself, so a
pseudo-text such as
==:TAG:==can replace part of a word like:TAG:-RECORD. - csd
- The CICS system definition as DFHCSDUP reads it: DEFINE commands naming resources, with KEYWORD(value) attributes running on to the next command.
- feedback
- Language Environment feedback codes: the condition tokens of facility CEE, their symbolic names, and CEEIGZCT, ironwork’s own declaration of them for a COPY CEEIGZCT that no library answers. The conditions are those the z/OS Language Environment Runtime Messages (SA38-0686-60, chapter 1) give a symbolic feedback code; the token is the case 1 layout of the Programming Reference (SA38-0683-60, CEENCOD and Table 20). Assumptions L16 and L17 record the sources and the choices where the manuals disagree.
- jni
- The Java Native Interface as COBOL reaches it: the JNI environment structure, a pointer to the function table whose slots the JNI specification numbers, the first four reserved. The JNI member is ironwork’s own declaration of that table in COBOL, for a COPY JNI no library answers.
- lexer
- parser
- report
- The REPORT SECTION as written: report descriptions with their report groups, the INITIATE, GENERATE, TERMINATE and SUPPRESS statements, and USE BEFORE REPORTING procedures.
- source
- Fixed-format reference format: columns 1-6 sequence, 7 indicator, 8-72 program text, 73 on ignored. The result is one logical text with continuation lines joined, and the options of any CBL or PROCESS cards ahead of the program.
- sql
- EXEC SQL statements, typed: what each one sends, what it receives into, and the WHENEVER actions
in force where it stands in the listing. The text a backend runs is the statement with each
input host variable replaced by
?and any INTO list removed, in one canonical spelling. - system
- The copy members IBM’s translators and products supply, as ironwork’s own declarations of the
layouts and names IBM documents: Db2 13 for z/OS SQL Reference (“The included SQLCA”, “The
included SQLDA”), CICS TS Data Areas (“EIB - EXEC interface block”) and CICS TS Application
Programming Reference, “BMS-related constants” (DFHAID, DFHBMSCA); and CEEIGZCT, Language
Environment’s symbolic feedback codes (
crate::feedback). A library member of the same name is found first, as it would be ahead of the system library on z/OS.
Structs§
- Error
- A compiler message;
Error::atmakes a severe one. - Pos
- Where a diagnostic points: 1-based source line and column.
Enums§
- Severity
- The severity of a compiler message, IBM’s five levels in order (Programming Guide SC27-8714-03, Table 38, p. 282).
Functions§
- most_
severe - The message a refusal names: the first of the most severe.
- parse
- The first program in the source.
- parse_
all_ with - Every program in the source, in order, nested programs after the one that contains them.
- parse_
with - The first program in the source, with COPY members resolved from
libraries. - return_
code - The return code of a compilation that gave these messages: the highest of theirs, 0 for none.