Basic calculator : parse input, compute output