1.

Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?(a) Removing left recursion only(b) Factoring the grammar alone(c) Factoring & left recursion removal(d) None of the mentionedThe question was posed to me in an online quiz.This intriguing question originated from Top-Down Parsing in section Topdown Parsing of Compiler

Answer» RIGHT OPTION is (d) NONE of the mentioned

The explanation: Factoring as well as left recursion removal do not SUFFICE to CONVERT an arbitrary CFG to LL(1) grammar.


Discussion

No Comment Found

Related InterviewSolutions