| Crates.io | squiid-parser |
| lib.rs | squiid-parser |
| version | 1.5.2 |
| created_at | 2025-03-11 19:14:20.548147+00 |
| updated_at | 2025-03-12 04:06:30.515279+00 |
| description | The algebraic expression parser for Squiid Calculator. |
| homepage | |
| repository | https://gitlab.com/ImaginaryInfinity/squiid-calculator/squiid-parser |
| max_upload_size | |
| id | 1588356 |
| size | 104,104 |
Squiid Parser is the algebraic expression parser for Squiid Calculator, designed to parse infix notation into postifix (RPN) notation, which can then be evaluated by squiid-engine. It is implemented in Rust to ensure high performance and safety.
unwrap()/expect()cargo add squiid-parser
use squiid_parser::parse;
fn main() {
// Parse an algebraic expression: (3 + 5 * 7)
let result = parse("(3+5*7)");
assert_eq!(result, vec!["3", "5", "7", "*", "+"]);
}
Squiid Parser is licensed under GPLv3.
To compile the shared object file for use in bindings, just run install Rust and run cargo build --release --lib --features=ffi. The shared object file should be found in target/release/libsquiid_parser.so.