Which one of the following is true?
2020
Which one of the following is true?
Answer: D. Every regular grammar is not LL(1) and every regular set has an LR(1) grammar — The correct option is D. Not every regular grammar is LL(1) because left-recursion or common prefixes can cause conflicts. However, every regular set…
- A.
Every regular grammar is LL(1) and every regular set does not have an LR(1) grammar
- B.
Every regular grammar is not LL(1) and every regular set does not have an LR(1) grammar
- C.
Every regular grammar is LL(1) and every regular set has an LR(1) grammar
- D.
Every regular grammar is not LL(1) and every regular set has an LR(1) grammar
Attempted by 209 students.
Show answer & explanation
Correct answer: D
The correct option is D. Not every regular grammar is LL(1) because left-recursion or common prefixes can cause conflicts. However, every regular set (language) can be represented by at least one deterministic, conflict-free LR(1) grammar because regular languages are a strict subset of deterministic context-free languages (DCFLs).
Explore the full course: Iocl Engineers Officers Grade A Paper 2