2 votes 2 votes Consider an SLR(1) & LALR(1) tables which of the following is true?? 1. shift entries are same. 2 Reduce entries are same. 3. goto entries are different. 4.error entries are different. Compiler Design parsing compiler-design + – Aman Jha asked Oct 8, 2016 Aman Jha 1.4k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply surbhijain93 commented Jun 28, 2019 reply Follow Share @Arjun Sir, Could you please explain this question. Thank you, Sir. 0 votes 0 votes Arjun commented Jun 28, 2019 reply Follow Share This was already explained in the Parsing notes last year. I'll consolidate them and post after next week as till then is busy with GO book work. Just remind me if I forget. 0 votes 0 votes surbhijain93 commented Jun 28, 2019 reply Follow Share Ok Sir, Thank you. 0 votes 0 votes Please log in or register to add a comment.
3 votes 3 votes here the option (3) is totaly wrong, while option (1) is totaly ri8 but the options like (2) and (4) we cant say say directly that goto entries are different because it may or may not be similarly In error entries may or may not be different. It will solely depends on the production of grammar. Rajesh Raj answered Oct 8, 2016 Rajesh Raj comment Share Follow See 1 comment See all 1 1 comment reply Aman Jha commented Oct 8, 2016 reply Follow Share since error detecting ability of LALR(1) parser is greater than SLR(1) ,error entries must be different. 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Option A will be wrong option for it. Explanation:: Reduce enteries in the both grammar will be same. U can check any practical example on it. Similarly number of error enteries in the bothtypes of grammar will also be same. Paras Nath answered Oct 14, 2016 Paras Nath comment Share Follow See 1 comment See all 1 1 comment reply Aman Jha commented Oct 14, 2016 i edited by Aman Jha Oct 14, 2016 reply Follow Share Reduce entries cannot be same in both grammar. As in LALR(1) reduce entry is placed only into the look ahead symbol , while in SLR(1) reduce entry is placed into follow of left hand non terminal of grammar. Due to difference of reduce entries there should be some differnece in error entries also. 1 votes 1 votes Please log in or register to add a comment.