2 2 votes Read the following grammars and their translations: $S\rightarrow xX\;\left \{ print ``0" \right \}$ $X\rightarrow zZ\;\left \{ print ``1" \right \}$ $X\rightarrow y\;\left \{ print ``2" \right \}$ $X\rightarrow e\;\left \{ print ``-" \right \}$ $Z\rightarrow pX\;\left \{ print ``1" \right \}$ $Z\rightarrow e\;\left \{ print ``0" \right \}$ What is the output produced for the input string $xzpzpy$ using Bottom-Up Parsing (with the above translations)? $0111012$ $0111-20$ $0211-10$ $011112$ Compiler Design tbb-mockgate-4 syntax-directed-translation compiler-design + – Bikram 793 views answer comment Share Follow Print See all 3 Comments 3 3 Comments reply rohan_a commented Jan 22, 2018 i edited by rohan_a Jan 24, 2018 reply Follow flag in mock1-7 we are printing from left to right https://gateoverflow.in/106160/go-17-mock-1-7 why we are printing right to left in this question?? 1 1 replyShare Rishabh Gupta 2 commented Jan 30, 2018 reply Follow flag There seems to be a problem in the options. 4 4 replyShare garimanand commented Jan 11, 2019 reply Follow flag answer should be 211110 5 5 replyShare Please log in or register to add a comment.
0 0 votes Answer is 211110 Ashwani Kumar 2 answered Dec 15, 2019 Ashwani Kumar 2 comment Share Follow 0 reply Please log in or register to add a comment.