Skip to content

cobol func_start counts a bare token + period in Area B as a paragraph (CEE3DMP.) #2538

Description

@squid-protocol

Summary

Found by the #1096 control corpus: cobol func_start counts a bare token + period in
Area B
as a paragraph header. data/cobol/b.cpy plants the LE-service tokens CEE3DMP.
and CEEMOUT. as statements (indented to column 12, Area B); observed func_start = 5
for a file with 3 real paragraphs — finditer confirms CEE3DMP / CEEMOUT are the extras.

Question

By the COBOL reference format, a paragraph-name must begin in Area A (columns 8–11); a
single token + period in Area B is a statement or a syntax error, not a paragraph. But the
current regex's post-sequence-area [ \t]* deliberately tolerates relaxed/free-format
source, which genuinely exists in the wild — so a strict Area-A anchor would trade FPs on
fixed-format files for misses on free-format ones.

Is the relaxed tolerance a deliberate #2489-era decision? If yes, a doc note is enough and
the corpus keeps the deviation baked in. If no, options: anchor to Area A when the file
shows consistent fixed-format shape (the sequence-area heuristic already exists), or
require paragraph names to not collide with known statement-ish single tokens.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engineModifications to the central physics and parsing engine

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions