1.

Which of the following derivations does a top-down parser use while parsing an input string?(a) Leftmost derivation(b) Leftmost derivationin reverse(c) Rightmost derivation(d) Rightmost derivation in reverseI had been asked this question during an interview.This question is from Top-Down Parsing topic in portion Topdown Parsing of Compiler

Answer»

Right OPTION is (a) Leftmost DERIVATION

The best explanation: In top down parser takes INPUT from Left to right CONSTRUCTING leftmost derivation of the SENTENCE.



Discussion

No Comment Found

Related InterviewSolutions