Parsers
October 9, 2023Compiler-Design
October 10, 2023Parsers
Question 105 |
Which of the following suffices to convert an arbitrary CFG to an LL(1) grammar ?
Removing left recursion alone | |
Removing the grammar alone | |
Removing left recursion and factoring the grammar | |
None of the above |
Question 105 Explanation:
→ Left recursion removing (or) factoring the given grammar are not sufficient to convert an arbitrary CFG to an LL(1) grammar.
→ To convert an arbitrary CFG to an LL(1) grammar we need to remove the left recursion and as well as left factoring without that we cannot convert.
→ To convert an arbitrary CFG to an LL(1) grammar we need to remove the left recursion and as well as left factoring without that we cannot convert.
Correct Answer: D
Question 105 Explanation:
→ Left recursion removing (or) factoring the given grammar are not sufficient to convert an arbitrary CFG to an LL(1) grammar.
→ To convert an arbitrary CFG to an LL(1) grammar we need to remove the left recursion and as well as left factoring without that we cannot convert.
→ To convert an arbitrary CFG to an LL(1) grammar we need to remove the left recursion and as well as left factoring without that we cannot convert.
Subscribe
Login
0 Comments