diff --git a/parser.ml b/parser.ml index 2ffedac..8e35aae 100644 --- a/parser.ml +++ b/parser.ml @@ -17,18 +17,18 @@ let unexpected_token t = * precedency, but infering precedence relation from the graph is hard * and the graph can be made to have loops, I just used plain table. *) let precedence = [ + Eq, 1; + Neq, 1; + GE, 1; + LE, 1; + GT, 1; + LT, 1; Add, 10; Sub, 10; Mul, 20; Div, 20; Mod, 30; Exp, 30; - Eq, 100; - Neq, 100; - GE, 100; - LE, 100; - GT, 100; - LT, 100; ] |> List.to_seq |> Hashtbl.of_seq let precedence_of op =