Related, the Shunting-yard algorithm (http://en.wikipedia.org/wiki/Shunting-yard_algorithm) is a clever algorithm for converting infix expressions into Reverse Polish or Polish Notation, that only takes linear time.
I have once modified the Shunting-yard algorithm to parse distfix expressions (https://github.com/noteed/syntactical). Agda is quite famous for offering distfix (or mixfix) operators.