0 votes 0 votes Compiler Design compiler-design parsing test-series + – Rajesh R asked Nov 6, 2017 retagged Jul 18, 2022 by makhdoom ghaya Rajesh R 1.4k views answer comment Share Follow See all 4 Comments See all 4 4 Comments reply Rajesh R commented Nov 6, 2017 reply Follow Share GAAAT or TAAAG ? 0 votes 0 votes Akash Mittal commented Nov 6, 2017 reply Follow Share GAAAT 0 votes 0 votes arch commented Nov 20, 2017 reply Follow Share what will be the correct answer? 0 votes 0 votes Vishal Goel commented Jan 6, 2018 reply Follow Share I think it should be GAAAAT. If the print statements were at the end of each production, then it would have been TAAAAG. 1 votes 1 votes Please log in or register to add a comment.
0 votes 0 votes Ans. TAAAAG targate2018 answered Nov 6, 2017 edited Nov 6, 2017 by targate2018 targate2018 comment Share Follow See 1 comment See all 1 1 comment reply vrajdobariya commented Dec 19, 2020 reply Follow Share here parse tree is correct but answer should be GAAAAT. here in 1st production rule,before reduction and after p, we have to perform semantic action.so when p occurs we print G so reduction perform in bottom to up traverse as usual but semantic action perform before reduction. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes ans is TAAAAG suryaprakash answered Jun 13, 2018 suryaprakash comment Share Follow See all 0 reply Please log in or register to add a comment.