A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar
- $S \rightarrow xxW \;\text{{print“1"}}$
- $S \rightarrow y \;\text{{print“2"}}$
- $W \rightarrow Sz\; \text{{print“3"}}$
What is the translation of $xxxxyzz$ using the syntax directed translation scheme described by the above rules?
- $23131$
- $11233$
- $11231$
- $33211$