previous
|
index
|
next
Another Scenario
But if there is another operator
op2
beneath
N
on the stack, then we must compare the precedence of
op
and
op2
:
Stack
Rest of Expression
Next Action
...
op2
N
op
... $
Reduce, if
prec(op2) ≥ prec(op)
Shift, otherwise
previous
|
index
|
next