purr/lib.rs
1//! Primitives for reading and writing the [Simplified Molecular Line Input Line Entry System](https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system) (SMILES) language. Based on [OpenSMILES](http://opensmiles.org).
2//! For goals and rationale, see:
3//!
4//! - [SMILES Formal Grammar](https://depth-first.com/articles/2020/05/25/lets-build-a-smiles-parser-in-rust/)
5//! - [SMILES Formal Grammar Revisited](https://depth-first.com/articles/2020/04/20/smiles-formal-grammar/)
6//! - [Let's Build a SMILES Parser in Rust](https://depth-first.com/articles/2020/12/14/an-abstract-syntatx-tree-for-smiles/)
7//! - [Abstract Syntax Trees for SMILES](https://depth-first.com/articles/2020/12/21/smiles-formal-grammar-revisited/)
8
9/// Common components used in `graph` and `tree` representations.
10pub mod feature;
11/// Reading SMILES representations from strings.
12pub mod read;
13/// Writing SMILES string representations.
14pub mod write;
15/// Traversal of an adjacency representation.
16pub mod walk;
17/// SMILES adjacency list representation.
18pub mod graph;
19
20// https://github.com/rust-lang/cargo/issues/383#issuecomment-720873790
21#[cfg(doctest)]
22mod test_readme {
23 macro_rules! external_doc_test {
24 ($x:expr) => {
25 #[doc = $x]
26 extern {}
27 };
28 }
29
30 external_doc_test!(include_str!("../README.md"));
31}