GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
cobol

Cobol PICTURE evaluation improved with automaton

Cobol PICTURE clause evaluation is improved by introducing an automaton that enforces ISO Table 10 rules.

An automaton has been introduced to parse COBOL PICTURE strings, enforcing ISO Table 10 rules for PICTURE sequences. This change enhances the accuracy of PICTURE clause evaluation, correctly identifying data item types or invalid characters, and has revealed errors in the test suite.

In Details

A new automaton is introduced in gcc/cobol/picture.cc for parsing COBOL PICTURE strings, enforcing ISO Table 10 rules. This automaton determines the data item type or points to invalid characters, replacing the previous validate_picture function in scan.l. This integration has uncovered test suite errors.

For Context
PICTURE clause
A COBOL clause used to define the data type and format of a data item, specifying its length, type (alphanumeric, numeric, edited numeric), and display characteristics.
automaton
A computational model used in compiler design to recognize patterns in strings, often employed for parsing syntax or validating formats.
ISO Table 10
A table within the COBOL ISO standard that defines the valid syntax and semantics for PICTURE clauses.
Filed Under: cobolparsercompiler