Ls030 — Apostrophe inside `/* .. */` comment misread as string delimiter

§12.1c comments

P1 — silent data loss

syntax

Sources

Description

A `/* .. */` comment containing an apostrophe is rejected because the comment-skip routine and a separate string-literal recognizer share a regex/scanner that mis-pairs the in-comment apostrophe with the next apostrophe in the file.

Reproducer recipe

`/* plane angle is 'degree' as non-SI unit */` placed between header and DATA.

Expected kernel behavior

Heal and accept: comments scanned to next `*/` independent of any string state; apostrophe inside comment is opaque.

Notes

Synonyms: "apostrophe inside STEP comment misread", "comment containing single quote breaks parser", "comment apostrophe paired with later quote", "STEP comment quote desyncs scanner", "in-comment apostrophe confuses lexer".

Expected validation

occt=reject/reject gmsh=reject ifc=reject

Byte assertions

Tier-3 assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1/* Ls030 - Apostrophe inside comment misread as string delimiter
2   ----------------------------------------------------------------------
3   Catalog section : §12.1c comments
4   Sources         : T002
5   Fixture kind    : conformance-probe
6   ----------------------------------------------------------------------
7   Defect
8     A comment containing an apostrophe is rejected because the comment-skip
9     routine and a separate string-literal recognizer share a regex/scanner
10     that mis-pairs the in-comment apostrophe with the next apostrophe in
11     the file.
12   Expected behavior
13     Heal and accept: comments scanned to next */ independent of any string
14     state; apostrophe inside comment is opaque.
15   ----------------------------------------------------------------------
16*/
17ISO-10303-21;
18HEADER;
19FILE_DESCRIPTION(('Ls030 - apostrophe in comment misread as string delimiter'),'2;1');
20FILE_NAME('Ls030.stp','2026-06-20T00:00:00',('auto-generated'),(''),
21  'auto-generated','','');
22FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
23ENDSEC;
24/* Defect: apostrophe inside this comment -- scanner must NOT treat it as a string open */
25/* plane angle is 'degree' as non-SI unit; the apostrophes here are inside the comment */
26DATA;
27#1=CARTESIAN_POINT('origin',(0.,0.,0.));
28#2=DIRECTION('x',(1.,0.,0.));
29/* another comment with apostrophe: it's fine inside here */
30ENDSEC;
31END-ISO-10303-21;