All mock tests are FREE till 31 December — register to save your progress

Which phase of the compiler checks the grammar of the program?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. Syntax analysis

Explanation

The syntax analyser (parser) checks the token stream against the grammar.

More Theory of Computation and Compilers questions