The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+20 votes

Type checking is normally done during

  1. lexical analysis
  2. syntax analysis
  3. syntax directed translation
  4. code optimization
asked in Compiler Design by Veteran (59.5k points)
edited by | 4.8k views

3 Answers

+35 votes
Best answer

The answer is c .

The use of syntax analyser is used to create parse Tree. But along with Grammar as input to Syntax Analyser we add even semantic rules which form the basis of Syntax Directed Translation That help us in Evaluation of Expression .Remember that

Syntax Directed Translation is used in following cases

  1. Conversion of infix to Postfix
  2. Calculation of infix expression
  3. For creating a Acyclic graph
  4. Type Checking
  5. Conversion of Binary number to Decimal
  6. Counting the numbers of bits (0 or 1 ) in a binary number
  7. Creation of syntax tree
  8. To generate Intermediate code
  9. Storing the data into Symbol table
answered by Active (1.9k points)
edited by
Can u plz elaborate last 9 th point ,storing data into symbol table is done during syntax directed translation .
@radha gogia

Yes, we may manipulate symbol table during SDT.
7th point ?? i think it is work of syntax analyzer??plz correct me!!

@Rajesh Syntax Analysis create Parse Tree, not Syntax Tree. Both are different. Syntax Trees are abstract representation of Parse Trees.

0 votes
right ans is C.
answered by (141 points)
–4 votes
answer - B
answered by Loyal (9k points)

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

38,009 questions
45,506 answers
48,693 users