1.

The context free grammar is ambiguous if ______________(a) The grammar contains non-terminals(b) Produces more than one parse tree(c) Production has two non-terminals side by side(d) None of the mentionedThe question was asked by my college professor while I was bunking the class.This question is from Lexical Analyser in division Finite Automata and Regular Expression of Compiler

Answer»

The correct choice is (b) Produces more than one PARSE TREE

The explanation: Since more than one parse tree is generated HENCE one than OPTION is AVAILABLE .Therefore it’s ambiguous.



Discussion

No Comment Found

Related InterviewSolutions