Cobol compiler adds filename-as-device feature and normalizes special registers.
Cobol compiler gains filename-as-device parsing and stabilizes special register handling.
The GCC Cobol compiler introduces a new feature allowing filenames to be specified using device syntax, with the code generator implementation pending. It also normalizes the initialization and handling of ‘special registers’ by using global constants instead of temporary variables, improving consistency between compile-time and run-time representations. Additionally, scanning rules are updated for comparison operators and formatting improvements are made across several files.
In Details
This commit introduces a new parsing feature in the GCC Cobol front-end, filename-as-device, which is designed to enable specifying input files using device syntax, though its code generator implementation is deferred. It refactors the handling of constants _literally_zero and _literally_one from constructed temporaries to global constants within libgcobol. Furthermore, it normalizes the initialization and management of 'special registers' by coordinating cbl_field_t (compile-time) and cblc_field_t (run-time) structures. Minor changes include updated scanning rules for operators a…
- Cobol
- A compiled business-oriented programming language designed for use in business, finance, and administrative systems.
- device syntax
- A method of specifying input/output units or files that mimics how hardware devices are referred to, often used in older operating systems or specific programming contexts.
- special registers
- In the context of Cobol, these are predefined variables that hold specific information about the program's execution, such as file status or program control data.
- compile-time
- The phase of software development where source code is translated into machine code by a compiler.
- run-time
- The phase when a program is actually executing on a computer.