1.

If w belongs to L(G), for some CFG, then w has a parse tree, which defines the syntactic structure of w. w could be:(a) program(b) SQL-query(c) XML document(d) All of the mentionedThis question was posed to me in homework.This interesting question is from The Language of a Grammar, Inferences and Ambiguity topic in chapter Context Free Grammars and Languages of Automata Theory

Answer»

Correct CHOICE is (d) All of the mentioned

The BEST explanation: Parse TREES are an alternative representation to DERIVATIONS and recursive inferences. There can be several parse trees for the same string.



Discussion

No Comment Found

Related InterviewSolutions