step-examples/12-1c-syntax/Ls031.stp
Sources
- T003, N029
Description
ISO 10303-21 comments do not nest. A naive scanner that re-fires on inner `/*` (or fails to require both `*` and `/` consecutively for close) desynchronizes when comments contain Windows paths or URLs.
Reproducer recipe
`/* path C:/foo/bar */` and `/* outer /* inner */ should still be comment */`
Expected kernel behavior
Heal and accept: only `*/` ends a comment; `/*` within a comment is literal text. After the first `*/` everything else is code.
Notes
Synonyms: "nested comment in STEP", "Windows path inside STEP comment breaks scanner", "URL in STEP comment opens nested comment", "/*/ inside STEP comment", "comment nesting confusion".
Expected validation
occt=reject/reject gmsh=reject ifc=reject
Byte assertions
contains(b'/* outer /*')count(b'/*') >= 2
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/* Ls031 - Forward-slash inside comment treated as nested-comment open 2 ---------------------------------------------------------------------- 3 Catalog section : §12.1c comments 4 Sources : T003, N029 5 ---------------------------------------------------------------------- 6 Defect 7 ISO 10303-21 comments do not nest. A naive scanner that re-fires on 8 inner /* desynchronizes when comments contain Windows paths or URLs. 9 Expected behavior 10 Heal and accept: only */ ends a comment; /* within a comment is literal 11 text. After the first */ everything else is code. 12 ---------------------------------------------------------------------- 13*/ 14ISO-10303-21; 15HEADER; 16FILE_DESCRIPTION(('Ls031 - nested comment open from slash in comment'),'2;1'); 17FILE_NAME('Ls031.stp','2026-06-20T00:00:00',('auto-generated'),(''), 18 'auto-generated','',''); 19FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 20ENDSEC; 21/* Defect 1: Windows path inside comment -- the C: is NOT a nested comment open */ 22/* source file: C:/models/step/export.stp revision 3 */ 23DATA; 24#1=CARTESIAN_POINT('origin',(0.,0.,0.)); 25/* Defect 2: nested /* marker inside comment -- outer /* inner */ still comment */ 26#2=DIRECTION('x',(1.,0.,0.)); 27/* outer /* inner comment here */ this text must still be inside outer */ 28#3=CARTESIAN_POINT('p',(1.,1.,0.)); 29ENDSEC; 30END-ISO-10303-21;