You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
det translator: conditions with ZERO inside arithmetic, and a relation split after NOT, do not parse #4656
bugUnintended behavior or logic failure in the enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: lowUI tweaks, documentation, and minor optimizationsscope:sweepCompletes a class the burned estates already touch (siblings); blocks no program
The randomized differential run of #4287 (random COMPUTE / IF / EVALUATE programs, cobc vs det port) hit three statements the det translator cannot parse, each a hole where GnuCOBOL compiles the statement:
IF (ZERO + 3) / 12 NOT > D0 ... and IF (ZERO / 12) * P0 > S3 ...: "IF condition: not a condition near ')'". Parser._paren_is_condition takes the group for a condition because ZERO is in CLASS_WORDS (det/expr.py).
EVALUATE TRUE WHEN D0 + ZERO > Q3: the WHEN object stays UNPARSED ("EVALUATE WHEN ...").
A relation split after NOT (... NOT at a line end, < X on the next line): "the PROCEDURE DIVISION does not parse at line N" (the whole program).
Each is a refusal, not a wrong result. None is known in a corpus program; (3) is the likeliest to appear in real code.
Proposal
(1)/(2): treat ZERO as a class word only after an operand (X IS ZERO), not inside an arithmetic group; (3): find where the split relation is lost (tree-sitter or stmt.py) and add a case to test_det_translate.py.
bugUnintended behavior or logic failure in the enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: lowUI tweaks, documentation, and minor optimizationsscope:sweepCompletes a class the burned estates already touch (siblings); blocks no program
Activity