1 votes 1 votes Since it is a Bottom Up Parser do we need to evaluate expressions following Right Hand Derivations or Left Hand Derivations,i.e. should we evaluate D -> d first or B -> B first? Compiler Design compiler-design parsing test-series + – vishal chugh asked Jan 23, 2018 retagged Jul 18, 2022 by makhdoom ghaya vishal chugh 1.0k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply hs_yadav commented Jan 23, 2018 reply Follow Share i think it is...$67$ 0 votes 0 votes vishal chugh commented Jan 23, 2018 reply Follow Share Yes. I also initially calculated the value as 67. But then changed my answer by evaluating using Right Hand Derivations. Since in question it's specified "Bottom Up Parser" shouldn't we evaluate starting from d -> D? 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes A bottom up parser works by scanning the string from left to right and performing reduction when the stack top has a handle. So, the answer is 67. The reductions are in the order as B->b, A->gBa, B->b, C->cc, D->d and then S->ABCD wh04m1 answered Jun 12, 2018 wh04m1 comment Share Follow See 1 comment See all 1 1 comment reply G Phalkey commented Nov 5, 2019 reply Follow Share simply for derivation follow Right most derivation and for evaluation of expression move in reverse order of Right most derivated string till u get start symbol 0 votes 0 votes Please log in or register to add a comment.