Compiler Design
Lexical Analysis & Parsing
GATE 2007
Easy
Which one of the following is a top-down parser?
- Recursive descent parser
- BOperator precedence parser
- CAn LR(k) parser
- DAn LALR(k) parser
Explanation
Recursive descent parsing builds the parse tree from the root downward, following the grammar's productions top-down. Operator precedence, LR(k), and LALR(k) are all bottom-up parsing techniques.
Source: GATE CS 2007 (2007)
This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.