Calculator using shunting yard algorithm