cobol: Set default ADVANCING to AFTER 1 LINE for SEQUENTIAL files and support I/O plug
The COBOL compiler now defaults `ADVANCING` to 'AFTER 1 LINE' for `SEQUENTIAL` files and introduces support for an I/O plug.
This commit adjusts the default behavior of the COBOL compiler regarding SEQUENTIAL files, setting ADVANCING to ‘AFTER 1 LINE’ by default in parse.y. Additionally, it introduces a new public function __gg__file_io_funcs in libgcobol/gfileio.cc, which is part of the effort to support an I/O plug mechanism. This change enhances flexibility in handling file I/O operations.
In Details
The cobol/parse.y grammar has been updated to default the ADVANCING clause to 'AFTER 1 LINE' for SEQUENTIAL files, altering runtime behavior for I/O operations. Furthermore, libgcobol/gfileio.cc now exposes __gg__file_io_funcs as a public function. This is a step towards enabling a more flexible I/O plug system, allowing external modules to potentially override or augment standard file I/O operations provided by libgcobol.
- SEQUENTIAL file
- A type of file organization in COBOL where records are stored and accessed in a sequential order. Data is read or written one record after another.
- ADVANCING
- A clause in COBOL I/O statements that controls whether the file position moves to the next line after a WRITE operation. For sequential files, its behavior can be constrained.
- I/O plug
- A component or mechanism designed to extend or customize the input/output operations of a program or library. It allows for modular replacement or augmentation of standard I/O routines.