It is clear that the deduction rules involve at most top two stack elements.
we extract the indices stored at the top of the stack which are potentially directly involved in any next action: l 1 , r 1 , l 0 , r 0 , and the buffer pointer i.