Repository navigation
det: NOT split from its operator by a line break, whole input class (Fixes #4682) - #4872
Merged
Merged
Conversation
…y, before every operator form (Fixes #4682) The issue's exact shape (IF D0 NOT / < 3) already translated on main after #4674; the rest of the class did not: NOT before a word operator on the next line (NOT / LESS THAN, AND NOT / EQUAL TO), NOT <=, NOT >=, NOT LESS|GREATER [THAN] OR EQUAL [TO], NOT IS LESS, and an omitted-subject relation after an AND / OR at a line end (AND / > 5, AND GREATER OR EQUAL) all refused the whole PROCEDURE DIVISION. cobc -std=ibm compiles them all. _join_not_breaks now takes NOT and its whole operator as one phrase, spells the forms the grammar refuses as the relation they are, and moves the break after it (same line count). det_port.py check: 104/104 ports unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX
Contributor
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 11, 2026 03:04
squid-protocol
enabled auto-merge (squash)
October 11, 2026 03:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4682
The issue's exact shape (
IF D0 NOT/< 3) already translates on main (#4674's_join_not_breaks); it is pinned now. The rest of the input class did not, and each refused the whole PROCEDURE DIVISION ("does not parse at line N") althoughcobc -std=ibmcompiles them:NOT/LESS THAN,AND NOT/EQUAL TO,AND NOT/GREATER/THANNOT <=,NOT >=,NOT LESS|GREATER [THAN] OR EQUAL [TO](also one-line),NOT IS LESS THANAND/> 5,OR/EQUAL TO 5,AND GREATER OR EQUAL)Fix (
det/stmt.py):_join_not_breakstakes NOT and its whole operator as one phrase (literals skipped), spells the forms the grammar refuses as the relation they are (NOT <=is>,NOT GREATER OR EQUALisLESS THAN, ...), and moves the line break after it; the line count is unchanged, so every statement keeps its line.Tests:
test_det_translate.py(matrix of every operator form x a break at every word boundary, class/sign conditions, abbreviated combined conditions, EVALUATE WHEN, PERFORM UNTIL, literal untouched; asserts the relation's shape and statement lines);test_det_conditions.pyruns a break-laden program against GnuCOBOL (bytes and typed modes, E2E-gated; passed locally).Not covered (separate): a fixed-format inline
*>comment inside a condition (IF D0 < 3 *> hi) is a hole on main with or without NOT.Gates:
pr_gates --fast5/5,--ratchets7/7 (0 skipped).det_port.py check: 104/104 ports unchanged, so no moved ports.🤖 Generated with Claude Code
https://claude.ai/code/session_01AUWeQX7v4QBdErFbghEEEX