squiid-parser

Crates.iosquiid-parser
lib.rssquiid-parser
version
sourcesrc
created_at2025-03-11 19:14:20.548147+00
updated_at2025-03-12 04:06:30.515279+00
descriptionThe algebraic expression parser for Squiid Calculator.
homepage
repositoryhttps://gitlab.com/ImaginaryInfinity/squiid-calculator/squiid-parser
max_upload_size
id1588356
Cargo.toml error:TOML parse error at line 21, column 1 | 21 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Tabulate (TabulateJarl8)

documentation

README

Squiid Parser

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.

Features

  • Fast and memory-safe algebraic (infix) to RPN (postfix) conversion
  • Well-documented API
  • Error handling with the prohibition of unwrap()/expect()
  • Able to be used through a variety of different languages through the bindings

Installation

cargo add squiid-parser

Example Usage

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", "*", "+"]);
}

License

Squiid Parser is licensed under GPLv3.

Compiling

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.

Commit count: 0

cargo fmt