1.

Which one of the following is a top-down parser?(a) Recursive descent parser(b) Operator precedence parser(c) An LR(k) parser(d) An LALR(k) parserThe question was asked during an interview.My question is taken from Top-Down Parsing in section Topdown Parsing of Compiler

Answer» RIGHT option is (a) Recursive descent parser

The best explanation: Recursive Descent also known as TOP down PARSING also known to be LL(1).

 Consider the following two statements:

P: Every regular grammar is LL(1)

Q: Regular is LR(1) grammar.


Discussion

No Comment Found

Related InterviewSolutions