step-examples/12-1c-syntax/Ls009.stp
Sources
- N017
Description
Spec permits leading zeros and a leading sign on INTEGER but no `0x` hex or interpretation of leading zero as octal. Some tools emit `0x10` or interpret `010` as octal-8.
Reproducer recipe
`#1=POSITIVE_INTEGER_VALUE(0x10);`
Expected kernel behavior
Reject hex/octal; accept leading `+` and zeros per spec.
Notes
**See also**: Ls001. Synonyms: "hex literal in STEP integer", "0x10 in STEP", "octal interpretation of 010", "STEP integer with 0x prefix", "non-decimal integer literal".
Expected validation
occt=empty/empty gmsh=empty ifc=schema_n/a
Byte assertions
contains(b'0x10') or contains(b'0X10') or matches(rb'POSITIVE_INTEGER_VALUE\(010\)')contains(b'0X') or contains(b'0x10')
Tier-3 assertions
load == "ok"
Cross-references
Live oracle output
No live oracle data — run _run_corpus to populate.
Fixture content
Show fixture bytes
1ISO-10303-21; 2/* Ls009: Integer literal with hex or octal prefix in STEP file; ISO 10303-21 spec permits leading zeros and a leading sign on INTEGER but does not permit 0x hex prefix or octal interpretation of leading zero; some tools emit 0x10 for hexadecimal 16 or rely on octal 010 meaning 8; defect: POSITIVE_INTEGER_VALUE with 0x10 â C-style hex literal that a conforming reader must reject; also a second entity uses 0X10 (uppercase X variant) to cover both common hex-prefix forms; OCC silently accepts with diagnostic but loads empty result â receivers enforcing the spec must reject this fixture; synonyms: hex literal in STEP integer, 0x10 in STEP, octal interpretation of 010, STEP integer with 0x prefix, non-decimal integer literal; GEOMETRIC_CURVE_SET IS NOT used â raw entity is the defect carrier */ 3HEADER; 4FILE_DESCRIPTION(('Ls009'),'2;1'); 5FILE_NAME('Ls009.stp','2026-06-17T00:00:00',(''),(''),'cad-research-suite','',''); 6FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 3 1 1 }')); 7ENDSEC; 8DATA; 9/* Defect: C-style hex literal 0x10 in integer parameter slot. */ 10/* ISO 10303-21 permits only decimal digits (plus optional leading sign). */ 11/* 0x prefix (C/C++ hex) is not valid Part-21 INTEGER syntax. */ 12#1=POSITIVE_INTEGER_VALUE(0x10); 13#2=POSITIVE_INTEGER_VALUE(0X10); 14ENDSEC; 15END-ISO-10303-21;