Match the description of several parts of a classic optimizing compiler in…

2017

Match the description of several parts of a classic optimizing compiler in List–I with the names of those parts in List–II

List–I
(a) A part of a compiler that is responsible for recognizing syntax
(b) A part of a compiler that takes as input a stream of characters and produces as output a stream of words along with their associated syntactic categories
(c) A part of a compiler that understands the meanings of variable names and other symbols and checks that they are used in ways consistent with their definitions
(d) An IR-to-IR transformer that tries to improve the IR program in some way

List–II
(i) Optimizer
(ii) Semantic Analysis
(iii) Parser
(iv) Scanner

Answer: A. iii,iv,ii,iThe correct mappings are: (a) Parser for syntax recognition, (b) Scanner for character-to-token conversion, (c) Semantic Analysis for variable meanings, and…

  1. A.

    iii,iv,ii,i

  2. B.

    iv,iii,ii,i

  3. C.

    ii,iv,i,iii

  4. D.

    ii,iv,iii,i

Attempted by 199 students.

Show answer & explanation

Correct answer: A

The correct mappings are: (a) Parser for syntax recognition, (b) Scanner for character-to-token conversion, (c) Semantic Analysis for variable meanings, and (d) Optimizer for IR transformation.

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

Explore the full course: Mppsc Assistant Professor Computer Science Paper 2

Loading lesson…