
David W. answered 04/29/19
Experienced Prof
Yes, expressions are evaluated by creating an "expression tree", then by scanning the tree Leftsubtree-Rightsubtree - Node: [note: Postfix notation is RPN] -- no parentheses are needed.
So, Excel, Google, ... and compilers like Java, C, ..., and interpreters like RAPTOR, Flowgrarithm, etc. all use RPN. Many software applications also allow expressions that are evaluated the same way.
A = B + C
becomes the tree
............=
......../......\
......A.......+
............./....\
...........B.....C
Then:
ABC+= [in RPN]
Then, evaluated with a stack:
If value, push onto stack
If operator, pop two values from stack, perform operation, push result onto stack.
Note: A unary operator must get special treatment.