Jawaharlal Nehru Technological University Hyderabad 2010-2nd Year B.Tech Computer Science and Engineering R07 CSE Computer Science Engineering -Jawarharlal Nehru Technological University - EMBER, 3rd- university paper
JNTU-HYDERABAD : third Year second Semester December 2010 B-Tech examination ques. Papers Regular R07 Regulations.
COMPILER DESIGN ques. paper has been attached.
Code No: 07A60502 R07I Set No. 2
III B.Tech II Semester Examinations,December 2010 COMPILER DESIGN Computer Science And Engineering Time: 3 hours Max Marks: 80
Answer any FIVE Questions All Questions carry equal marks k k k k k
1. Explain how storage allocation is done for arrays, strings and records? [16]
2. (a) Write about the issues in the design of code generator.
(b) Write about target code forms. Explain how the instruction forms effect the computation time. [8+8]
3. Define the following terms.
(a) Reaching definition.
(b) Live variables.
(c) Flow graphs.
(d) Global optimization. [16]
4. (a) Construct operator precedence parse table for the below grammar.
S > iEts|iEtSeS|a E > b|c|d.
(b) Eliminate Ambiguity for above grammar. [10+6]
5. (a) Translate the following code segment into Quadruples.
While A < C and B < D
if A=1 then C:= C+1
else while A <= D do A:= A+2
(b) Explain the different statements allowed in TAC with examples. [8+8]
6. (a) Write the procedure for constructing the DAG.
(b) For the following basic block construct DAG. d = b * c; e = a * b; b = b + c;
c = b * c; [8+8]
7. (a) Construct an NFA for regular expression R= (aa/b)*ab convert it into an
equivalent DFA
(b) Write a LEX program for identifying the keywords and identifiers from the file? [8+8]
8. Give the algorithm to generate the canonical collection of LR(0) items. [16]
kkkkk
2
Attachment: |
Earning: Approval pending. |