All mock tests are FREE till 31 December — register to save your progress
Unit 8 · Theory of Computation and Compilers Paper 2 CS · December 2023

Match List I with List II according to the input to the compiler phase that processes it:
List IList II
(a) Syntax tree(I) Code generator
(b) Intermediate representation(II) Semantic analyzer
(c) Token stream(III) Lexical analyzer
(d) Character stream(IV) Syntax analyzer

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

Show answer & explanation

Correct answer: B. (a)-(II), (b)-(I), (c)-(IV), (d)-(III)

Explanation

The semantic analyser takes the syntax tree (II), the code generator takes the intermediate representation (I), the syntax analyser takes the token stream (IV), and the lexical analyser takes the character stream (III).

More Theory of Computation and Compilers questions