Ls044 — String concatenation across consecutive literals (not allowed)

§12.1c string-quoting (impacts grammar shape)

P1 — silent data loss

syntax

Sources

Description

Unlike C, Part 21 does not concatenate adjacent string literals. `'foo' 'bar'` is two strings, not one. Generators that line-wrap long strings by writing two consecutive literals corrupt the data when the position expects exactly one STRING.

Reproducer recipe

`FILE_DESCRIPTION(('first part' ' second part'),'2;1');`

Expected kernel behavior

When grammar expects a single STRING, reject. When position is `LIST OF STRING`, accept as two list elements (warn — likely unintended).

Notes

Synonyms: "adjacent STEP string literals", "two strings line-wrap into one slot", "C-style string concatenation in STEP", "STEP string concatenation not allowed", "consecutive literals corrupt data".

Expected validation

occt=empty/empty gmsh=empty ifc=schema_n/a

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/* Ls044 - String concatenation across consecutive literals (not allowed)
2   ----------------------------------------------------------------------
3   Catalog section : §12.1c string-quoting (impacts grammar shape)
4   Sources         : N055
5   ----------------------------------------------------------------------
6   Defect
7     Unlike C, Part 21 does not concatenate adjacent string literals.
8     'foo' 'bar' is two strings, not one. Generators that line-wrap long
9     strings by writing two consecutive literals corrupt the data when the
10     position expects exactly one STRING.
11   Expected behavior
12     Reject adjacent literals in a single-STRING slot.
13     When position is LIST OF STRING, accept as two elements but warn.
14   ----------------------------------------------------------------------
15*/
16ISO-10303-21;
17HEADER;
18/* Defect 1: FILE_DESCRIPTION list has two adjacent literals in one slot */
19FILE_DESCRIPTION(('first part' ' second part'),'2;1');
20FILE_NAME('Ls044.stp','2026-06-20T00:00:00',('auto-generated'),(''),
21  'auto-generated','','');
22FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }'));
23ENDSEC;
24DATA;
25#1=CARTESIAN_POINT('origin',(0.,0.,0.));
26#2=DIRECTION('x',(1.,0.,0.));
27#3=VECTOR('v',#2,1.);
28/* Defect 2: PRODUCT description split across two adjacent string literals */
29#4=PRODUCT('part-001','a very long product ' 'description that was line-wrapped','',());
30ENDSEC;
31END-ISO-10303-21;