1 votes 1 votes Is the given grammar ambiguous? S->AB A->a B->b Compiler Design compiler-design parsing ambiguous-grammar true-false + – Prateek Arora asked Oct 27, 2016 • retagged Jun 23, 2022 by Lakshman Bhaiya Prateek Arora 624 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 3 votes 3 votes Grammar is ambigous if it generate two parse tree for any string derived from grammar . here only ab is derive whic is only one derivation tree. So not ambigous. Prashant. answered Oct 27, 2016 • selected Oct 27, 2016 by vijaycs Prashant. comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes no, it is not ambiguous...only ab is derived and it has atmost only one left or right parse tree Pavan Kumar Munnam answered Oct 27, 2016 Pavan Kumar Munnam comment Share Follow See all 0 reply Please log in or register to add a comment.