0 votes 0 votes Can the following grammar be parsed by LR(0) parser? E -> E+id | id Is the accept state entry considered on all the terminal symbol columns for LR(0) parser? Compiler Design compiler-design lr-parser parsing + – Jayant Isswani asked May 2, 2018 Jayant Isswani 591 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes LR(0) parser is constructed for LP(0) grammar in which the parse table is free from multiple entries (conflicts). as we show in the above question the grammar is E -> E+id | id there are multiple entries when you construct a table manvi answered May 5, 2018 manvi comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes If a grammar is left recurcive then it never be LR(0) . Given grammar is left recurcive . Hence it is not parsed by LR(0) . abhishekmehta4u answered May 2, 2018 abhishekmehta4u comment Share Follow See all 2 Comments See all 2 2 Comments reply dan31 commented May 10, 2018 reply Follow Share Being Left Recursive does not hinder the grammar being parsed by LR(0). 0 votes 0 votes adityaecdrid commented May 12, 2018 reply Follow Share we can always remove the left recursive-ness, this grammer isnt LR(0) beacause it will have multiple entries in the parsing Table.. 0 votes 0 votes Please log in or register to add a comment.