What is the difference between top-down and bottom-up parsing?

PYQ TPSC Computer/IT Posts 2024

What is the difference between top-down and bottom-up parsing?

  1. A.

    Top-down parsing starts from the start symbol/root, while bottom-up parsing starts from the input symbols/leaves.

  2. B.

    Top-down verifies rules against previous tokens, bottom-up constructs the parse tree

  3. C.

    Top-down is more efficient for smaller grammars, bottom-up for larger ones

  4. D.

    All of the above.

Attempted by 348 students.

Sign up free to check your answer

Sign up free

Explore the full course: Tpsc Assistant Technical Officer

Loading lesson…