A top-down parser generates
2016
A top-down parser generates
Answer: C. Leftmost derivation — Top-down parsers begin parsing from the start symbol of the grammar. They construct the parse tree by expanding non-terminals, always choosing to expand the…
- A.
Rightmost Derivation
- B.
Rightmost derivation in reverse
- C.
Leftmost derivation
- D.
Leftmost derivation in reverse
Attempted by 453 students.
Show answer & explanation
Correct answer: C
Top-down parsers begin parsing from the start symbol of the grammar.
They construct the parse tree by expanding non-terminals, always choosing to expand the leftmost non-terminal first.
This specific order of expansion ensures that top-down parsers generate a leftmost derivation.
A video solution is available for this question — log in and enroll to watch it.
Explore the full course: Iocl Engineers Officers Grade A Paper 2