Predictive parser follows a ________.

2022

Predictive parser follows a ________.

  1. A.

    Top down parsing approach

  2. B.

    Bottom up parsing approach

  3. C.

    Shift–reduce parsing

  4. D.

    Both (a) and (b)

Attempted by 264 students.

Show answer & explanation

Correct answer: A

A predictive parser is a kind of LL(1) parser , which follows a top-down parsing approach that builds the parse tree from the start symbol using lookahead. It does not use bottom-up or shift–reduce parsing techniques, so only the top-down approach is correct for predictive parsers.

Explore the full course: Niacl Ao It Specialist