Skip to main content

openbim_step/
lib.rs

1//! Generic ISO 10303 STEP Part 21 and EXPRESS syntax infrastructure.
2//!
3//! The crate has no domain-schema dependency. It tokenizes bytes with spans,
4//! decodes physical-file strings, parses records into generic parameters,
5//! writes them back, partitions complete records, and offers a structural,
6//! explicitly partial EXPRESS declaration extractor.
7
8#![forbid(unsafe_code)]
9
10mod diagnostic;
11/// STEP string escape codec.
12pub mod escape;
13/// Structural, explicitly partial EXPRESS declaration extraction.
14pub mod express;
15mod header;
16/// Physical-file tokenizer.
17pub mod lexer;
18mod model;
19mod parser;
20mod partition;
21/// Malformed-record recovery policy and non-fatal diagnostics.
22pub mod recovery;
23pub mod schema;
24/// Semantic exchange writer.
25pub mod writer;
26
27pub use diagnostic::{Source, SourceLocation, Span, Spanned, StepError};
28pub use header::is_step_file;
29pub use model::{
30    DataRecord, DataSection, Exchange, HeaderRecord, HeaderSection, InstanceId, Parameter, Record,
31    StandardHeader,
32};
33pub use parser::{parse, parse_events, parse_events_with, parse_with, Event, EventSink};
34pub use partition::{data_record_spans, partition_data_records, Partition};
35pub use recovery::{Diagnostic, OnMalformed, ParseOptions, ParseOutcome, Severity};
36pub use schema::SchemaGraph;
37pub use writer::{write, write_parameter, write_to_string};
38
39/// Maximum nesting accepted for lists and typed parameters.
40pub const MAX_PARAMETER_NESTING: usize = 128;