suzuran 0.1.1

An operator-precedence parser based on the Shunting Yard algorithm
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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")))
```