Top Banner

of 6

Compiler Construction Paper

Jun 02, 2018

Download

Documents

Lulu Tojeen
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/10/2019 Compiler Construction Paper

    1/6

    (Improvement/Su pplementary)

    [2010 admissions]

    Answer all questions.

    Each question carries 3marks.

  • 8/10/2019 Compiler Construction Paper

    2/6

    if(i < j ){

    switch (i)

    {

    case 1:j =j + 1 ;

    Break;case 2 :j =j + 2 ;

    case3 :j = j + 3 ;

    Break;

    default:} = 0;

    }

  • 8/10/2019 Compiler Construction Paper

    3/6

  • 8/10/2019 Compiler Construction Paper

    4/6

    (lmprovement/Supplementary)

    [2010 admissions]

    Answer all questions.Each question carries 3marks.

  • 8/10/2019 Compiler Construction Paper

    5/6

    if(i

  • 8/10/2019 Compiler Construction Paper

    6/6

    13. (a) Write syntax directed translation to convert:

    (i) Assignment statements.

    (ii) Relational expressions.(iii) For statements to three address code.

    Or

    (b) List the different parameter passing methods. Discuss each one ofthem.

    14. (a) Write and explain the Globaloptimization techniques.

    Or

    (b) Explain howtemporaries are manipulated in intermediate codegeneration.

    15. (a) (i) Explain the'concept of next use information and its significancein code gen

    (ii) Write an algorithm for the allocation of registers.

    Or

    (b) Explain the different data structures used for symbol table organization.

    [5x 12