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

Which phase of compiler checks the grammar of programming?

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

Show answer & explanation

Correct answer: D. Syntax analysis

Explanation

The syntax analyzer (parser) checks that the token stream follows the language's grammar.

More Theory of Computation and Compilers questions