Given below are two statements Statement I: LL(1) and LR are examples of…
2021
Given below are two statements
Statement I: LL(1) and LR are examples of Bottom‐up parsers.
Statement II: Recursive descent parser and SLR are examples of Top‐down parsers
In light of the above statements, choose the correct answer from the options given below
- A.
Both Statement I and Statement II are true
- B.
Both Statement I and Statement II are false
- C.
Statement I is true but Statement II is false
- D.
Statement I is false but Statement II is true
Attempted by 124 students.
Show answer & explanation
Correct answer: B
Answer: Both Statement I and Statement II are false.
Statement I: LL(1) is a top-down parser, while LR is a bottom-up parser. Therefore, the claim that both LL(1) and LR are examples of bottom-up parsers is false.
Statement II: Recursive descent is a top-down parser, whereas SLR is a bottom-up parser. Thus, the claim that both recursive descent and SLR are top-down parsers is false.
Conclusion: Since each statement contains one correct and one incorrect classification, both statements are false.
A video solution is available for this question — log in and enroll to watch it.