ISRO Scientist/Engineer CSE 2016Compiler Design › Parsing
ISRO Scientist/Engineer CSE 2016 PYQ: A top-down parser generates
A top-down parser generates
- ARightmost Derivation
- BRightmost derivation in reverse
- CLeftmost derivationCorrect answer
- DLeftmost derivation in reverse
Answer
(C) Leftmost derivation
Approach
Recall the standard classification: top-down parsers (LL) construct a parse tree from the start symbol down to the input, which corresponds to a leftmost derivation; bottom-up parsers (LR) reduce the input back to the start symbol, i.e., a rightmost derivation in reverse.
Reviewed by ISRO IQ Editorial Team.