Which phase of compiler checks the grammar of programming?
2023
Which phase of compiler checks the grammar of programming?
- A.
Code Optimization
- B.
Semantic Analysis
- C.
Code Generators
- 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.