Pulled out shunting-yard algorithm