| Crates.io | s-expression |
| lib.rs | s-expression |
| version | 0.2.0 |
| created_at | 2023-01-25 19:53:56.383055+00 |
| updated_at | 2025-08-05 15:28:29.202289+00 |
| description | A simple S-Expression parser |
| homepage | |
| repository | https://github.com/eckertliam/s-expression |
| max_upload_size | |
| id | 767736 |
| size | 37,385 |
A high-performance, zero-copy S-expression parser optimized for compiler use cases. Features fast parsing with minimal memory allocations through borrowed string slices and various performance optimizations.
use sexpression::{Expression, read, ParseError};
fn main() -> Result<(), ParseError> {
let source = "(define (factorial n) (if (= n 0) 1 (* n (factorial (- n 1)))))";
let expr = read(source)?;
println!("Parsed: {:?}", expr);
Ok(())
}
Run cargo doc --open to view the full documentation.