step-examples/12-1c-syntax/Ls002.stp
Sources
- N016
Description
Grammar requires at least one digit before the dot. `.5` is not legal; `0.5` is. C/Python `%g` formatters frequently emit bare `.5`.
Reproducer recipe
`#1=DIRECTION('',(.0,.0,1.0));`
Expected kernel behavior
Strict reject; lenient readers commonly accept implicit zero.
Notes
**See also**: Ls001. Synonyms: "REAL with no digit before decimal", ".5 instead of 0.5 in STEP", "leading-dot REAL literal", "%g formatter emits .5", "missing zero before decimal".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
matches(rb"\(\s*\.\d")contains(b'.5') and matches(rb'\(\.\d')
Tier-3 assertions
shape_null == True
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/* Ls002: REAL literal with no digit before the decimal point; ISO 10303-21 grammar requires at least one digit before the dot: .5 is not legal; 0.5 is; C and Python percent-g formatters frequently emit bare .5 for values < 1; defect: DIRECTION('',(.0,.0,.5)) â leading-dot REAL literals in all three coordinate slots: .0, .0, .5; no digit before any decimal point; strict readers must reject with digit-required-before-decimal diagnostic; lenient readers commonly accept implicit zero; bug-reporter synonyms: REAL with no digit before decimal, .5 instead of 0.5 in STEP, leading-dot REAL literal, percent-g formatter emits .5, missing zero before decimal; GEOMETRIC_CURVE_SET IS NOT used â DIRECTION entity is the defect carrier */ 3HEADER; 4FILE_DESCRIPTION(('Ls002'),'2;1'); 5FILE_NAME('Ls002.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9/* Defect: leading-dot REAL literals â no digit before the decimal point. */ 10/* ISO 10303-21: grammar requires at least one digit before the dot. */ 11/* C/Python %g formatter emits .5 instead of 0.5 for values < 1. */ 12#1=DIRECTION('',(.0,.0,.5)); 13#2=CARTESIAN_POINT('origin',(0.,0.,0.)); 14#3=VECTOR('v',#1,1.); 15#4=LINE('l',#2,#3); 16ENDSEC; 17END-ISO-10303-21;