2 votes 2 votes here it is given bottom up parsing still action is given in middle so output should be GAAAAT??? Is it true that in syntax tree tanslation bottom up and top down gives same answer??? Compiler Design compiler-design syntax-directed-translation test-series + – Rahul Jain25 asked Dec 26, 2016 retagged Jul 18, 2022 by makhdoom ghaya Rahul Jain25 1.2k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 6 votes 6 votes bottom up evaluation.it will be TAAAAG..i have missed one A to write... .. sudsho answered Dec 27, 2016 selected Dec 30, 2016 by Rahul Jain25 sudsho comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments sudsho commented Dec 30, 2016 reply Follow Share no in bottom up we perform SDT only when there is a reduction..like first reduction is r->P then SP->Q..so on...because we have to do reverse of rmd..so go till bottom then make building upwards 1 votes 1 votes Rahul Jain25 commented Dec 30, 2016 reply Follow Share Thanks @sudsho. Well expalined. 1 votes 1 votes reena_kandari commented Sep 19, 2017 reply Follow Share @Bikram sir, in page 1 of this pdf,it is mentioned that: General rule: The actions are viewed as "dummy" terminals embedded in the parse tree. They are executed in the order of a preorder traversal of the tree. Thus, the result of the SDT is the same whether parsing is top-down, bottom-up, or something else. In what sense they are saying that the result of SDT is same during both TDP and BUP.In this question also we can see TD and BU implementation are giving different results. 1 votes 1 votes Please log in or register to add a comment.