1 votes 1 votes A Grammar which is only left recursive or right recursive can be ambiguous grammar??? Or it should have both left recursive and right recursive to be ambiguous??? Compiler Design compiler-design ambiguous-grammar left-recursion descriptive + – learner_geek asked Aug 3, 2017 retagged Jun 21, 2022 by Lakshman Bhaiya learner_geek 278 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 1 votes 1 votes S->A /b A->Aa/b It's a left recursive grammar but it's ambiguous also because for string 'b' there are two parse trees. S-> A/bb A->bA/b It's a right recursive grammar and ambiguous also, because for the string "bb" there will be two parse trees. Manu Thakur answered Aug 3, 2017 selected Aug 3, 2017 by learner_geek Manu Thakur comment Share Follow See all 0 reply Please log in or register to add a comment.