Lh047 — Lower-case section keywords (`data;` instead of `DATA;`)

§12.1b header/numbering (sub-class: keyword case)

spec-violation syntax

Sources

Sender

deduced — writers built from a generic EXPRESS-instance serialiser that lower-cases all identifiers, or hand-rolled writers that confuse the EXPRESS reserved-word case-insensitivity rule with Part-21 keyword case

Description

ISO 10303-21 spells the framing keywords `ISO-10303-21`, `HEADER`, `DATA`, `ENDSEC`, and `END-ISO-10303-21` exclusively in upper case. A producer that emits any of these in lower or mixed case (`header;`, `data;`, `endsec;`) violates the framing grammar. Strict parsers reject at the first mis-cased keyword; lenient parsers fold case and proceed. The lenient reading hides the producer defect and allows nonconforming files to circulate. Bug-reporter language: "STEP keywords lower-case", "data; not DATA;", "lower-case ISO-10303-21".

Reproducer recipe

a Part-21 file with `header;`, `data;`, `endsec;` instead of `HEADER;`, `DATA;`, `ENDSEC;`.

Expected kernel behavior

reject; framing keywords are case-sensitive in the spec text. A tolerant case-fold may be offered as an opt-in compatibility mode.

Notes

Distinct from Le027 (8-bit / case-insensitive lexer); Le027 is lexer-side tolerance for entity-type keywords; Lh047 is the framing keywords specifically. Synonyms: "lowercase data; instead of DATA;", "lowercase STEP framing keywords", "header; in STEP file", "endsec; lowercase", "STEP framing keyword case wrong".

Expected validation

occt=empty/empty gmsh=empty ifc=reject

Byte assertions

Tier-3 assertions

Cross-references

Le027

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Lh047: lower-case framing keywords — header; data; endsec; instead of upper-case */
3/* ISO 10303-21 §6.2: framing keywords ISO-10303-21, HEADER, DATA, ENDSEC are upper-case */
4/* DEFECT: all three section-delimiters below appear in lower case */
5/* strict parsers reject at first mis-cased keyword; lenient parsers fold case and proceed */
6header;
7FILE_DESCRIPTION(('Lh047: lower-case framing keywords'),'2;1');
8FILE_NAME('Lh047.stp','2026-06-21T00:00:00',(''),(''),'cad-research-suite','','');
9FILE_SCHEMA(('AUTOMOTIVE_DESIGN'));
10endsec;
11/* DEFECT: data; and endsec; are lower-case — violate the Part-21 framing grammar */
12data;
13#1=CARTESIAN_POINT('origin',(0.,0.,0.));
14#2=CARTESIAN_POINT('corner',(1.,1.,0.));
15#3=DIRECTION('xdir',(1.,0.,0.));
16#4=DIRECTION('zdir',(0.,0.,1.));
17#5=GEOMETRIC_CURVE_SET('lowercase-keyword-shape',(#1,#2));
18endsec;
19END-ISO-10303-21;