1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//! # IFC-Lite Core Parser
//!
//! High-performance STEP/IFC parser built with [nom](https://docs.rs/nom).
//! Provides zero-copy tokenization and fast entity scanning for IFC files.
//!
//! ## Overview
//!
//! This crate provides the core parsing functionality for IFC-Lite:
//!
//! - **STEP Tokenization**: Zero-copy parsing of STEP file format
//! - **Entity Scanning**: SIMD-accelerated entity discovery using [memchr](https://docs.rs/memchr)
//! - **Lazy Decoding**: On-demand attribute parsing for memory efficiency
//! - **Streaming Parser**: Event-based parsing for large files
//!
//! ## Quick Start
//!
//! ```rust,ignore
//! use ifc_lite_core::{EntityScanner, parse_entity, IfcType};
//!
//! // Scan for entities
//! let content = r#"#1=IFCPROJECT('guid',$,$,$,$,$,$,$,$);"#;
//! let mut scanner = EntityScanner::new(content);
//!
//! while let Some((id, type_name, start, end)) = scanner.next_entity() {
//! println!("Found entity #{}: {}", id, type_name);
//! }
//!
//! // Parse individual entity
//! let input = "#123=IFCWALL('guid',$,$,$,$,$,$,$);";
//! let (id, ifc_type, attrs) = parse_entity(input).unwrap();
//! assert_eq!(ifc_type, IfcType::IfcWall);
//! ```
//!
//! ## Streaming Parser
//!
//! For large files, use the streaming parser to process entities in batches:
//!
//! ```rust,ignore
//! use ifc_lite_core::{parse_stream, StreamConfig, ParseEvent};
//!
//! let config = StreamConfig::default();
//! for event in parse_stream(content, config) {
//! match event {
//! ParseEvent::Entity { id, type_name, .. } => {
//! println!("Entity #{}: {}", id, type_name);
//! }
//! ParseEvent::Progress { percent, .. } => {
//! println!("Progress: {:.1}%", percent);
//! }
//! _ => {}
//! }
//! }
//! ```
//!
//! ## Performance
//!
//! - **Tokenization**: ~1,259 MB/s throughput
//! - **Entity scanning**: ~650 MB/s with SIMD acceleration
//! - **Number parsing**: 10x faster than std using [lexical-core](https://docs.rs/lexical-core)
//!
//! ## Feature Flags
//!
//! - `serde`: Enable serialization support for parsed data
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;