Which one of the following is a top-down parser?

2021

Which one of the following is a top-down parser?

  1. A.

    Recursive descent parser

  2. B.

    Operator precedence parser

  3. C.

    An LR(k) parser

  4. D.

    An LALR(k) parser

  5. E.

    Question not attempted

Attempted by 131 students.

Show answer & explanation

Correct answer: A

A top-down parser starts from the start symbol and builds the parse tree from root to leaves.
Recursive descent parser is a classic example of top-down parsing.

Explore the full course: Bpsc