0 votes 0 votes Compiler Design compiler-design parsing ace-test-series + – iita asked Dec 19, 2016 retagged Nov 6, 2023 by Hira Thakur iita 418 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
2 votes 2 votes Option A..left recursive Purvi Agrawal answered Apr 17, 2017 Purvi Agrawal comment Share Follow See all 3 Comments See all 3 3 Comments reply s9k96 commented Apr 17, 2017 reply Follow Share yes, A is right 0 votes 0 votes AnilGoudar commented Apr 18, 2017 reply Follow Share Hi a small doubt, I think, the answer would be D. Left recursion : A grammar of the form A->Ap/q , where p and q are terminals is left recursive, The given grammar satisfies it. Right Recursion : A grammar of the form A->pA/q , p and q are terminals. Hence right recursive. Operator Grammar: It is CFG where two variable are separated by an operator, Even this is satisfied by the given grammar. Hence the given grammar is left recursive, Right recursive and Operator grammar. Hence answer is D. Correct me if iam wrong. Thank You. 0 votes 0 votes Purvi Agrawal commented Apr 18, 2017 reply Follow Share The conditions required for a grammar to be LL (1) is: 1.Unambiguous 2.No common prefix. 3. Free from left recursion. Option B is not right because a right recursive grammar can be used in LL1. Option C is not right because it is not an operator grammar.Moreover it is not the desired condition. Hence option D cannot be the answer. 1 votes 1 votes Please log in or register to add a comment.