Shift-Reduce Parser also called as Bottom Up Parser
Input string : xxxxyz
So Draw the Annotated Parse tree for the input string.
S -> xxW [S -> xxW] pf{1}
-> xxSz [W -> Sz] pf{3}
-> xxxxWz [S-> xxW] pf{1}
-> xxxxSzz [W ->Sz] pf {3}
-> xxxxyzz [S->y reduced ] pf{2}
So Bottom to top order : 23131, Option 3