StreakPeaked· Practice

ExamsGATETechnical

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

  1. Recursive descent parser.
  2. Operator precedence parser.
  3. An LR(k) parser.
  4. An LALR(k) parser.

Correct answer: Recursive descent parser.

Solution

Recursive descent parsing is a classic top-down parsing technique. The other listed parsers are bottom-up or shift-reduce based methods.

Related GATE Technical questions

⚔️ Practice GATE Technical free + battle 1v1 →