The Gateway to Computer Science Excellence
0 votes
160 views

a) (i) and (ii) only
b) (ii) and (iii) only
c) (i) and (iv) only
d) All are correct

in Compiler Design by Loyal (7.7k points)
retagged by | 160 views
0

I think the answer should be a

0

i had doubt on (ii), "the main purpose of semantic analyzer is to produce intermediate code", i used to think its used for type checking and ICG is used to produce intermediate code.

0
option d
0

@ Hira Thakur  answer should not be d, see point iii, it says ICG doesnot use symbol table which is wrong.

0

@stblue you are right about semantic analyser. It is used for type checking and thus form an annotated syntax tree which is further used for code generation

I had my reservations against statement iv as well because I think Intermediate and machine code generator can be same if code optimization is neglected (I think I remember reading this, plesae correct me if I'm wrong). That's why I opted for a

0
@Warlock  i also believe ICG and MCG can be combine, if we are developing compiler for single machine, then we can combine ICG with MCG , so option iv also seems to be wrong to me.
0
So i think correct answer should be (i) only, which is not present in any option.
@joshi_nitish @just_bhavana @Shubanshu what do you think ?
0
i also think only (i) is correct.

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,492 answers
195,439 comments
100,708 users