0 votes 0 votes Why isn't it LL(1) ? Compiler Design parsing compiler-design grammar ll-parser lr-parser ace-test-series + – Parshu gate asked Dec 5, 2017 • retagged Jul 15, 2022 by Anjana5051 Parshu gate 1.6k views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Anu007 commented Dec 5, 2017 reply Follow Share First of A= a $\cap$ a = not $\varnothing$ hence not LL(1) 0 votes 0 votes Parshu gate commented Dec 5, 2017 reply Follow Share What must be the condition for LL(1)? 0 votes 0 votes Parshu gate commented Dec 5, 2017 reply Follow Share Why is it LR(1) 0 votes 0 votes Please log in or register to add a comment.
Best answer 3 votes 3 votes Given grammar is not LL(1) because for Non-terminal "A" contains two entries in LL(1) table . a b $ S S-->aAb A A-->aAb A--->a Given grammar is LR(1) because there is no conflict while constructing DFA for LR(1). Akash Mittal answered Dec 6, 2017 • selected Dec 6, 2017 by Parshu gate Akash Mittal comment Share Follow See all 2 Comments See all 2 2 Comments reply Parshu gate commented Dec 6, 2017 i edited by Parshu gate Dec 6, 2017 reply Follow Share Why is it LR(1) ? here LR(1) means SLR(1) or CLR(1) ? 0 votes 0 votes Mk Utkarsh commented Jan 19, 2018 reply Follow Share LR(1) means CLR(1) it uses canonical collection of LR(1) items 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes Not LL(1) OO7 answered Jul 3, 2018 OO7 comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes This grammar is not LL(1) coz we encounter a SR conflict while making canonical collection of LR(0) items. but in case of LR(1) or CLR(1) we don't have any conflict so the correct option is c. The Technical Guy answered Jan 5, 2018 The Technical Guy comment Share Follow See all 0 reply Please log in or register to add a comment.