Use of Stacks in Evaluating Arithmetic Expressions
When a right parenthesis is read, the top two numbers are popped, the top operation is popped, the numbers are combined using this operation, and the result is pushed back onto the numbers stack.
Other input characters (left parentheses and blanks) are skipped.
This continues until the end of the input expression.