Skip to content

STEP production tests

These pages are a rendered, exhaustive corpus for the StepFileLexer (pygments_step.step21), the lexer for ISO 10303-21 (Part 21) exchange files. Like the EXPRESS tests, every page here is a production test: the snippets are highlighted and must lex cleanly, enforced by the same two gates described on that page — the strict mkdocs build in the docs GitHub Actions workflow, and tests/test_docs_pages.py, which parses every step21 fence for zero Error tokens and checks that each page really covers the token family it claims.

StepFileLexer is schema-agnostic: entity names are lexed structurally, so these examples work for IFC, AP203, AP214 or any other Part 21 schema.

Pages

Page What it exercises
Keywords Exchange-structure keywords
Entities Instance definitions vs. references, user-defined keywords
Enumerations Indexed enumeration values, unset and derived values
Literals Binary literals and strings (including '' escapes)
Directives String and print control directives
Comments /* ... */ block comments

Clause numbers on these pages follow ISO 10303-21:2002, the second edition. The third edition renumbers some of them: the token clauses become 6.2 to 6.4.6 where the second edition has 6.1 to 6.3.6, and the print control directives move from clause 11 to 13. Pages that need to be exact give both numbers.