step-examples/12-1c-syntax/Ls006.stp
Sources
- T045
Description
Modern languages tolerate `1_000_000`. Some in-house exporters borrow this and emit `IFCREAL(1_000.0)`. ISO 10303-21 disallows underscores in numerics.
Reproducer recipe
`#1=IFCREAL(1_000.0);`
Expected kernel behavior
Strict reject with clear "underscore not permitted in numeric literal".
Notes
**See also**: Ls001. Synonyms: "underscore in numeric literal", "1_000_000 in STEP REAL", "digit grouping in STEP number", "Python-style underscore in STEP", "thousands separator inside number".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
matches(rb'\d_\d')count(b'_') >= 2 or matches(rb'\d_\d{3}')
Tier-3 assertions
load == "ok"
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1ISO-10303-21; 2/* Ls006: Numeric literal with embedded underscore digit-grouping in STEP REAL; modern languages (Python, Rust, Swift) tolerate 1_000_000 for readability; some in-house exporters borrow this and emit underscored numerics in STEP; ISO 10303-21 disallows underscores in numeric literals; defect: DIRECTION('',(1_000.0,2_500.0,0.)) â underscore digit-grouping in the first two coordinate values; also VECTOR magnitude uses 1_000.0 (a second underscore-numeric); strict readers must reject with 'underscore not permitted in numeric literal'; OCC silently accepts with diagnostic but loads empty result â receivers enforcing the spec must reject this fixture; synonyms: underscore in numeric literal, 1_000_000 in STEP REAL, digit grouping in STEP number, Python-style underscore in STEP, thousands separator inside number; GEOMETRIC_CURVE_SET IS NOT used â DIRECTION entity is the defect carrier */ 3HEADER; 4FILE_DESCRIPTION(('Ls006'),'2;1'); 5FILE_NAME('Ls006.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9/* Defect: underscore digit-grouping in numeric literals. */ 10/* ISO 10303-21 does not permit underscores in REAL or INTEGER tokens. */ 11/* Python/Rust-style 1_000_000 borrowed by some in-house exporters. */ 12#1=DIRECTION('',(1_000.0,2_500.0,0.)); 13#2=CARTESIAN_POINT('origin',(0.,0.,0.)); 14#3=VECTOR('v',#1,1_000.0); 15#4=LINE('l',#2,#3); 16ENDSEC; 17END-ISO-10303-21;