Repository navigation
det translator: model DECIMAL-POINT IS COMMA; document the refusals #4462 keeps (#4462) - #4666
Merged
Merged
Conversation
…4462 keeps SPECIAL-NAMES DECIMAL-POINT IS COMMA (estate-crucible DEUT ZINSBER) was refused whole. Now: - source.comma_literals hands the grammar each numeric literal's decimal comma as a point, column for column (VALUE 1000,00, MOVE 0,5 TO T (2), -12,5); PICTUREs, literal text and names keep theirs. A `1.5` literal under the clause is refused by name. - layout.Item.decimal_comma reads an edited PICTURE's `,` as its decimal point. - gen emits Field...decimalComma(); the runtime's editing, de-editing and alphanumeric-to-numeric moves follow it (libcob's module decimal point); NUMVAL / NUMVAL-C read their argument with `.` and `,` swapped. Proven against GnuCOBOL: test_det_programs DPCOMMA (bytes, typed, groups). ZINSBER now stops at its next gap, a national letter in GEBUEHR's name (#4664, refused by name). Ledger: ZINSBER's entry moves to that gap; ORDPRICE / SHPRATE are refusals by design (H-0053): cause made definitional. det_port_design.md lists the refusals kept deliberately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
This was referenced Oct 8, 2026
squid-protocol
marked this pull request as ready for review
October 8, 2026 14:39
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 #4462
What
Slice 5, the close-out of #4462: SPECIAL-NAMES DECIMAL-POINT IS COMMA is modelled. Every other remaining
translator-refuses-*cause is kept on purpose, refused by name, and listed with its reason indocs/language_status/det_port_design.md.det/source.py:comma_literalspasses each numeric literal's decimal comma to the grammar as a point, keeping every column in place (VALUE 1000,00,MOVE 0,5 TO T-WERT (2),-12,5). A comma between digits is the decimal point, as cobc reads it. A separator comma is followed by a space. PICTUREs, literal text and names are left alone. Under the clause, a literal written with a decimal point (1.5) is refused by name.det/layout.py:Item.decimal_comma. An edited PICTURE's,is its decimal point (scale) and its.is an insertion character.det/gen.py: field factories get.decimalComma(). NUMVAL / NUMVAL-C / TEST-NUMVAL(-C) read their argument with.and,swapped.cobolrt/Field.java,Editing.java,Cobol.java):Field.decimalCommais used by editing (Editing.formatalready had the parameter;shapenow has it too). It is also used when an alphanumeric sender is MOVEd into a numeric or edited receiver (alnumToDisplay,parseAlnum:,is the point and.is skipped, as libcob reads it). Touches Cobol.java inmove()'s NUMERIC / edited branches,source(),alnumToDisplay,parseAlnum,edit()andnum(). It does not touchalignor arithmetic (det runtime: truncate arithmetic intermediates as cobc's ARITHMETIC-OSVS does (#4287) #4654) or the binary paths (equivalence: model the oracle's MOVE of a non-digit zoned item to a binary item (#4652) #4663), but equivalence: model the oracle's MOVE of a non-digit zoned item to a binary item (#4652) #4663's spot next tomove()is nearby, so a rebase may touch the same lines. Touches gen.py infactory()and_func(), not the arithmetic code det runtime: truncate arithmetic intermediates as cobc's ARITHMETIC-OSVS does (#4287) #4654 changes.Decisions per cause
GEBÜHR/BETRÄGE. It is refused by name, and #4664 is filed for ittest_det_source_4462pins it)CMQ*, LECEEIGZCT)translatortodefinitionalLedger (
fact_crosscheck.py update --corpus estate-crucible, thenassign)translator-refuses-*: idms 1, national-text 4, source-defect 1, vendor-copybook 4 (unchanged counts), plustranslator-copy-program-member3.translator-refuses-national-text, whose summary was refreshed (it now references det translator: a data name with a single-byte national letter (cp273 BETRÄGE / GEBÜHR) is refused: estate-crucible ZINSBER #4664).Evidence
test_det_programs.py::DPCOMMAmatches GnuCOBOL (cobc -std=ibm -fsign=EBCDIC) byte for byte in bytes, typed and groups modes. It runs ZINSBER's statements with ASCII names, plus zero suppression, a fixed and a floating sign, check protection, BLANK WHEN ZERO, de-editing, alphanumeric→zoned / packed / edited moves, NUMVAL and NUMVAL-C.test_det_source_4462.py: unit tests for the literal rewrite and for layout and statements, plus the1.5refusal.EQUIVALENCE_E2E=1:test_det_programs+test_det_layout+test_det_translategave 387 passed and 0 skipped.test_det_funcsgave 2 passed.test_det_sweep_fast,test_det_survey,test_det_port_check,test_det_parity,test_det_unmaskandtest_data_moves_decimal_comma_4355all passed.pr_gates.py --fast: 5/5 pass.pr_gates.py --ratchets: 7/7 pass, none skipped (cics-spec, ports, port-surface, estate, fact-crosscheck, completeness, ground-truth). Engine scans are untouched, so no golden master moves.Found on the way
🤖 Generated with Claude Code