11 releases (1 stable)

Uses old Rust 2015

1.0.0 Aug 10, 2021
0.2.5 May 1, 2017
0.2.4 Mar 21, 2017
0.1.4 Mar 17, 2017

#1745 in Parser implementations

MIT license

10KB
200 lines

Yard crates.io version Codeship Status for squiidz/ShuntingYard

shunting yard algorithm in rust

alt_tag

Example

extern crate yard;

fn main() {
  let equation = "1 + 2 * 3";
  println!("{}", yard::evaluate(equation).unwrap());
}


lib.rs:

Evaluate arithmetic operations of a string, based on the shunting yard algorithm.

Dependencies

~470KB