Skip to main content

Crate openbim_step

Crate openbim_step 

Source
Expand description

Generic ISO 10303 STEP Part 21 and EXPRESS syntax infrastructure.

The crate has no domain-schema dependency. It tokenizes bytes with spans, decodes physical-file strings, parses records into generic parameters, writes them back, partitions complete records, and offers a structural, explicitly partial EXPRESS declaration extractor.

Re-exports§

pub use recovery::Diagnostic;
pub use recovery::OnMalformed;
pub use recovery::ParseOptions;
pub use recovery::ParseOutcome;
pub use recovery::Severity;
pub use writer::write;
pub use writer::write_parameter;
pub use writer::write_to_string;

Modules§

escape
STEP string escape codec. STEP string-literal escape decoding and encoding.
express
Structural, explicitly partial EXPRESS declaration extraction. Explicitly structural, partial EXPRESS declaration extraction.
lexer
Physical-file tokenizer. Byte-level tokenizer for STEP physical files.
recovery
Malformed-record recovery policy and non-fatal diagnostics. Opt-in malformed-record recovery policy and non-fatal diagnostics.
writer
Semantic exchange writer. Semantic exchange writer.

Structs§

DataRecord
A simple or complex #id=...; instance in DATA;.
DataSection
The generic DATA; ... ENDSEC; section.
Exchange
A complete ISO 10303-21 exchange structure.
HeaderRecord
A record in HEADER;.
HeaderSection
The generic HEADER; ... ENDSEC; section.
InstanceId
An arbitrary-precision instance identifier as written by #42.
Partition
A half-open byte range containing one or more complete data records.
Record
One named parameter record within a DATA instance.
Source
Source text used to resolve byte spans to human-readable locations.
SourceLocation
A source span resolved to a display location.
Span
A half-open byte range in the original source.
Spanned
A value paired with its source span.
StandardHeader
Standard header fields projected from raw header records.
StepError
Failure while tokenizing or semantically parsing a physical file.

Enums§

Event
A semantic parser event.
Parameter
One generic parameter value.

Constants§

MAX_PARAMETER_NESTING
Maximum nesting accepted for lists and typed parameters.

Traits§

EventSink
Consumer for parse events.

Functions§

data_record_spans
Locates complete data records.
is_step_file
Returns whether bytes begin with the ISO 10303-21 marker.
parse
Parses a physical file into an owned generic exchange structure.
parse_events
Parses a physical file and sends semantic records to sink.
parse_events_with
Streams semantic records under explicit ParseOptions, returning the non-fatal diagnostics collected on the way.
parse_with
Parses a physical file under explicit ParseOptions.
partition_data_records
Splits data records into at most partition_count balanced groups.