loading...

CS606 Compiler Construction Current Mid term paper 14 December

Q. In two pass assembler what is the objective of First Pass? 2 marks

 

Q. What is Relocation? 3 marks

5 marks

Up frontier discovery  useful for top down parser.

 

Parser tree 3 marks

one grammar  5 marks

=========mcqs============

LR parsers can handle ________________ grammars.
 Left-recursive
file-recursive
End-recursive
Start-recursive

_____ convert the relocatable machine code into absolute machine code by linking library and relocatable object files.

  1. Assembler
  2. 2.      Loader/link-editor
  3. Compiler
  4. Preprocessor

Consider the grammar A –> B C D

B –> h B | epsilon

C –> C g | g | C h | i

D –> A B | epsilon

Follow of B is _____________ .

h
g, h, i, $
g, i
g
Consider the grammar A –> B C D

B –> h B | epsilon

C –> C g | g | C h | i

D –> A B | epsilon

Follow of C is _____________ .

g, h, i, $
g, h, $
h, i, $
h, g, $

 

An important component of semantic analysis is __________________ .
code checking
type checking
flush checking
None of the given

In PASCAL ___________ represent the inequality test.
:=
=
<>
None of the given

Lexical Analyzer generator ________________ is written in Java.

  1. Flex
  2. 2.      Jlex
  3. Complex
  4. None of given

____________avoid hardware stalls and interlocks.

  1. Register allocation
  2. 2.      Instruction scheduling
  3. Instruction selection
  4. None of given

Consider the following grammar, A –> B C D B –> h B | episilon C –> C g | g | C h | i D –> A B | episilon First of A is _______________ .
h, g, i
g
h
None of the given..doubted

Recursive ____________ parsing is done for LL(1) grammar.
Decent
Ascent
Forward
Backward

One of the core tasks of compiler is to generate fast and compact executable code.

True
False

 

Left factoring of a grammar is done to save the parser from back tracking.
True
False

Responsibility of ______________ is to produce fast and compact code.
Instruction selection
Register allocation
Instruction scheduling
None of given

________________ algorithm is used in DFA minimization.
James’s
Robert’s
Hopcroft’s
None of given

Compilers are sometimes classified as.

  1. Single pass
  2. Multi pass
  3. Load and go
  4. 4.      All of the given

 

DOWNLOAD SOLUTION HERE
loading...