step-examples/12-1c-syntax/Ls019.stp
Sources
- T043, N050
Description
A truncated coordinate list like `((1.,2.,3.),(4.,5.,6.)` (one `)` short) causes scanners to walk past the `;` of the next instance. Common when nested aggregates contain empty inner lists (`(())` vs `()`).
Reproducer recipe
`#1=IFCPOLYLINE((#2,#3,#4); #5=..`
Expected kernel behavior
Track paren depth per instance; on `;` at depth>0, reject with "unbalanced parentheses" naming the unmatched open paren.
Notes
Cross-oracle: pure-Python Part-21 validator rejects (reject(E_PAREN_UNBALANCED)); OCCT silently accepts (load is `empty`). OCC auto-heals a spec-level violation. Synonyms: "missing closing paren in STEP aggregate", "paren imbalance in STEP", "unbalanced parens in coordinate list", "truncated nested aggregate", "STEP aggregate closes wrong number of parens".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
matches(rb'IFCPOLYLINE\(\(#\d+,#\d+,#\d+\);')matches(rb'\(#\d+,#\d+,#\d+\);')
Tier-3 assertions
load == "ok"
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes (with defect highlighting)
1/* Ls019 - Missing closing ) of an aggregate (paren imbalance) 2 ---------------------------------------------------------------------- 3 Catalog section : §12.1c punctuation 4 Sources : T043, N050 5 ---------------------------------------------------------------------- 6 Defect 7 A truncated coordinate list like ((1.,2.,3.),(4.,5.,6.) (one ) short) 8 causes scanners to walk past the ; of the next instance. Common when 9 nested aggregates contain empty inner lists (()) vs (). 10 Expected behavior 11 Track paren depth per instance; on ; at depth>0, reject with 12 'unbalanced parentheses' naming the unmatched open paren. 13 ---------------------------------------------------------------------- 14*/ 15ISO-10303-21; 16HEADER; 17FILE_DESCRIPTION(('Ls019 - missing closing paren in aggregate'),'2;1'); 18FILE_NAME('Ls019.stp','2026-06-20T00:00:00',('auto-generated'),(''), 19 'auto-generated','',''); 20FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 21ENDSEC; 22DATA; 23#1=CARTESIAN_POINT('p1',(0.,0.,0.)); 24#2=CARTESIAN_POINT('p2',(1.,0.,0.)); 25#3=CARTESIAN_POINT('p3',(1.,1.,0.)); 26/* Defect: outer aggregate opened but never closed before semicolon (depth=1 at ;) */ 27#4=IFCPOLYLINE((#1,#2,#3); 28#5=DIRECTION('x',(1.,0.,0.)); 29ENDSEC; 30END-ISO-10303-21;