suzuran 0.1.1

An operator-precedence parser based on the Shunting Yard algorithm
Documentation
  • Coverage
  • 0%
    0 out of 9 items documented0 out of 4 items with examples
  • Size
  • Source code size: 10.85 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.54 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • mushitoriami/suzuran
    0 0 2
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mushitoriami

suzuran

An operator-precedence parser based on the Shunting Yard algorithm

let mut parser = suzuran::Parser::new(["+", "*"]);
println!("{:?}", parser.parse(["1", "+", "2", "*", "3"]).unwrap());
// Operator("+", Primitive("1"), Operator("*", Primitive("2"), Primitive("3")))

parser = suzuran::Parser::new(["+", "-", "*"]);
println!("{:?}", parser.parse(["-", "(", "1", "+", "2", ")", "*", "3"]).unwrap());
// Operator("-", Placeholder, Operator("*", Parentheses(Operator("+", Primitive("1"), Primitive("2"))), Primitive("3")))