Skip to content

ISRO Scientist/Engineer CSE 2016Compiler Design › Parsing

ISRO Scientist/Engineer CSE 2016 PYQ: A top-down parser generates

A top-down parser generates

  1. A
    Rightmost Derivation
  2. B
    Rightmost derivation in reverse
  3. C
    Leftmost derivation
    Correct answer
  4. D
    Leftmost 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.