0 votes 0 votes consider the grammar G: S->A|B A->a|c B->b|c where {S,A,B} are non-terminals,{a,b,c} are terminals. Does LR(1) can parse all strings that are generated by grammar G.? Please any one help me to how to check it? Compiler Design compiler-design grammar parsing lr-parser + – abc1 asked Jan 26, 2019 retagged Jun 20, 2022 by Lakshman Bhaiya abc1 4.0k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Shaik Masthan commented Jan 26, 2019 reply Follow Share Only way is " Constructing the LR(1) items ", if there is no conflicts, then it is OK Note that, it should be unambiguous grammar first ! 0 votes 0 votes abc1 commented Jan 26, 2019 reply Follow Share @ shaik Masthan, I am new to this.will you please explain this example in detail. 0 votes 0 votes Shaik Masthan commented Jan 26, 2019 reply Follow Share if you don't know about Bottom-Up parsers, just left it ! 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes The above given grammar is not LL(1) so it is not LR(1) as well. You can first check it for ll(1). Manoj Kumar Pandey 1 answered May 16, 2019 Manoj Kumar Pandey 1 comment Share Follow See 1 comment See all 1 1 comment reply swaroop-nath commented Feb 5, 2021 reply Follow Share What do you mean? Can you cite some proof that LL(1) grammar is a superset of LR(1)? 0 votes 0 votes Please log in or register to add a comment.