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
//! SMILES parsing plus the shared SMARTS parser frontend.
//!
//! This module hosts the SMILES serialization pipeline and exposes
//! [`parse_smarts`] for the canonical SMARTS engine in
//! [`crate::chem::smarts`]. SMARTS matching lives there; this module owns only
//! syntax parsing shared with SMILES.
//!
//! * [`smiles`] — the SMILES serialization format: parse a string into an
//! intermediate representation, validate it, and convert it into an
//! atomistic molecular graph.
//!
//! Both SMILES and SMARTS share a common chemistry vocabulary (AST types, byte
//! scanner, ring-closure validation) that lives in [`chem`].
//!
//! # Pipeline (SMILES)
//!
//! ```text
//! SMILES string → parse_smiles() → SmilesIR → to_atomistic() → Atomistic
//! ```
//!
//! # Pipeline (SMARTS)
//!
//! ```text
//! SMARTS string → parse_smarts() → SmilesIR → crate::chem::smarts::SmartsPattern
//! ```
//!
//! # Example
//!
//! ```ignore
//! use molrs::io::smiles::{parse_smiles, to_atomistic};
//!
//! let ir = parse_smiles("CCO").unwrap();
//! let mol = to_atomistic(&ir).unwrap();
//! assert_eq!(mol.n_atoms(), 3);
//! ```
// The serialization-format module retains its `smiles` name internally. The
// re-exports below flatten it so callers write `molrs::io::smiles::parse_smiles`,
// not the doubled path.
// The parser is internally unified: a single `Parser` struct dispatches by
// `ParserMode`. Both sibling modules re-export their respective entry point.
// ---------------------------------------------------------------------------
// Public re-exports (stable surface — downstream callers depend on these).
// ---------------------------------------------------------------------------
pub use ;
pub use ;
pub use parse_smarts;
pub use ;