Shift–reduce parsing reads the input from left to right onto a stack, shifting tokens and reducing right sides of productions at the top of the stack to their left sides. A handle of a right sentential form is a production together with a position of in such that replacing that by gives the previous form of a rightmost derivation of .
id + id * id, each interior node numbered by the reduction that built it. Reduction 8 is the first step of the rightmost derivation on the right, reduction 1 its last.