stacks and queues table evaluating + - item read expression parsed so far comments + - when you see the -you can evaluate + end when you reach the end of the expressionyou can evaluate - you can' evaluate the + until you see what operator follows the if it' an or /you need to wait before applying the sign until you've evaluated the or howeverin this example the operator following the is -which has the same precedence as +so when you see the -you know you can evaluate + which is the then replaces the + you can evaluate the - when you arrive at the end of the expression figure shows this process in more detail notice how you go from left to right reading items from the inputand thenwhen you have enough informationyou go from right to leftrecalling previously examined input and evaluating each operandoperator-operand combination because of precedence relationshipsevaluating + * is bit more complicatedas shown in table table evaluating + * item read expression parsed so far + + + * + end comments you can' evaluate + because is higher precedence than when you see the you can evaluate * when you see the end of the expressionyou can evaluate + here you can' add the until you know the result of * why notbecause multiplication has higher precedence than addition in factboth and have higher precedence than and -so all multiplications and divisions must be carried out before any additions or subtractions (unless parentheses dictate otherwisesee the next example