Lh027 — Malformed entity ID inside an ANCHOR entry (non-numeric `#`)

§12.1b header/numbering

P1 — silent data loss

syntax

Sources

Description

ANCHOR entries reference `#NNN` form; entries using non-numeric tokens after `#` (e.g. `<#42@x>='product';`) violate the grammar.

Reproducer recipe

`ANCHOR; <part_anchor>=#42@x; ENDSEC;`

Expected kernel behavior

reject the entry with a precise diagnostic; do not abort the whole file.

Notes

**See also**: Lh026, Lh028. Synonyms: "non-numeric # in ANCHOR entry", "ANCHOR with bad instance ID syntax", "malformed entity reference in ANCHOR", "ANCHOR section grammar violation", "anchor target ID not a number".

Expected validation

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

Byte assertions

Tier-3 assertions

Cross-references

Lh026, Lh028

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1ISO-10303-21;
2/* Lh027: malformed entity ID in ANCHOR entry — #42@x is not a valid #NNN reference */
3/* ISO 10303-21 Ed.3: ANCHOR entries must use pure #NNN integer form */
4/* DEFECT: <part_anchor>=#42@x has non-numeric suffix @x after digits */
5/* OCC silently accepts (empty result); catalog requires reject with diagnostic */
6HEADER;
7FILE_DESCRIPTION(('Lh027: malformed entity ID in ANCHOR entry'),'2;1');
8FILE_NAME('Lh027.stp','2026-06-20T00:00:00',(''),(''),'cad-research-suite','','');
9FILE_SCHEMA(('AUTOMOTIVE_DESIGN'));
10ENDSEC;
11/* DEFECT: ANCHOR section with malformed reference #42@x */
12ANCHOR;
13/* DEFECT: #42@x is not a valid entity-instance reference; @x suffix violates grammar */
14<part_anchor>=#42@x;
15<valid_anchor>=#1;
16ENDSEC;
17DATA;
18#1=CARTESIAN_POINT('origin',(0.,0.,0.));
19#2=CARTESIAN_POINT('corner',(1.,1.,0.));
20#3=DIRECTION('xdir',(1.,0.,0.));
21#4=DIRECTION('zdir',(0.,0.,1.));
22#5=GEOMETRIC_CURVE_SET('malformed-anchor-id-shape',(#1,#2));
23ENDSEC;
24END-ISO-10303-21;