1 votes 1 votes Given solution: After reducing two 1's of expression to E, E*E should be reduced not the 3rd 1. So final output will be 112*311+2 instead of the given output. Please check. Compiler Design compiler-design parsing test-series + – shikharV asked Jan 14, 2016 shikharV 1.7k views answer comment Share Follow See 1 comment See all 1 1 comment reply amarVashishth commented Jan 19, 2016 reply Follow Share Grammar is ambiguous; There is no LR or LL parser for an ambiguous grammar, this question is flawed. 2 votes 2 votes Please log in or register to add a comment.
1 votes 1 votes Bottom Up Parsing = http://dragonbook.stanford.edu/lecture-notes/Stanford-CS143/08-Bottom-Up-Parsing.pdf amarVashishth answered Jan 19, 2016 amarVashishth comment Share Follow See all 2 Comments See all 2 2 Comments reply Vishal Goyal commented May 22, 2017 reply Follow Share can u please solve the above question iam not able to get the above parse tree can u explain in detail please 0 votes 0 votes LeenSharma commented May 22, 2017 reply Follow Share Vishal Goyal Question is incorrect. There is two possible parse tree for 1*1+1.Both parse tree will give a different result.Given grammar is ambiguous and no LL or LR parser can parse ambiguous grammar. 0 votes 0 votes Please log in or register to add a comment.