Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar?
Show answerHide answer
Correct answer: (D) None of the above
Explanation
Removing left recursion and left factoring the grammar do not suffice to convert an arbitrary CFG to an LL(1) grammar. LL(1) parsing is top-down; for it the grammar must also be unambiguous and deterministic (e.g. an ambiguous grammar stays non-LL(1)), besides being free from left recursion.