Predictive parser follows a ________.

2021

Predictive parser follows a ________.

Answer: A. Top down parsing approachA 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…

  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 550 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: Hpsc Pgt Computer Science

Loading lesson…