1.

A grammar with more than one parse tree is called:(a) Unambiguous(b) Ambiguous(c) Regular(d) None of the mentionedI have been asked this question at a job interview.I need to ask this question from Construction and Yield of a Parse Tree topic in division Context Free Grammars and Languages of Automata Theory

Answer»

The correct choice is (b) Ambiguous

To EXPLAIN: A context free grammar G is ambiguous if there is at least ONE STRING in L(G) having TWO or more distinct derivation trees or equivalently, two or more distinct leftmost DERIVATIONS.



Discussion

No Comment Found

Related InterviewSolutions