Which phase of compiler checks the grammar of programming?

2023

Which phase of compiler checks the grammar of programming?

  1. A.

    Code Optimization

  2. B.

    Semantic Analysis

  3. C.

    Code Generators

  4. D.

    Syntax Analysis

Attempted by 184 students.

Show answer & explanation

Correct answer: D

Syntax Analysis is the compiler phase responsible for checking the grammar of programming languages. It validates syntax rules and structure, typically forming a parse tree before semantic analysis or code generation.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor