A shift reduce parser carries out the actions specified within braces immediately after reducing with the corresponding rule of grammar S—-> xxW ( PRINT “1”) S—-> y { print ” 2 ” } S—-> Sz { print ” 3 ” ) What is the translation of xxxxyzz using the syntax directed translation scheme described by the above rules?
(a) 23131
(b) 11233
(c) 11231
(d) 33211
This question was posed to me in unit test.
My query is from Data Structure for Representing Parsing Table in division Bottom Up Parsing of Compiler