0% found this document useful (0 votes)
34 views1 page

0f024ff2ba645662fba3f26d4e9819d6

Uploaded by

Pratham Wakde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
34 views1 page

0f024ff2ba645662fba3f26d4e9819d6

Uploaded by

Pratham Wakde
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 1
2 Any revealing of identification, appeal to evaluator and/or equations written eg, 4248=50, will be treated as malpractice. Imprtant Note: 1. On competing your anbnrs, compulsory éraw diagonal cots nes onthe remb..ng lank pages USN Zf 06CS63 Sixth Semester B.E. Degree Examination, Dec.09/Jan.10 Compiler Design Time: 3 hrs. Max. Marks:100 Note: Answer any FIVE full questions, selecting at least TWO questions from each part. PART-A 1a. Explain a language processing system, with a block diagram. (08 Marks) ’. Explain the concept of input buffering in the lexical analysis. (06 Marks) ©. Write the transition diagram to recognize the token relop. (Corresponding to relational operators ina language). (06 Marks) 2° a, Whatis left-recursion? Eliminate left recursion from the following grammar: E>E+T/T; ToT+F/F; F(B)/id (06 Marks) b. Obtain the predictive parsing table for the following grammar: SiESS'/a; — S'-reS/e; E+b (14 Marks) 3° a, Obtain LR(O) items for the following grammar: S+L=R/R; L'R/id; RoL (08 Marks) b. Obtain first and follow symbols for the grammar shown in Q3 (a) and obtain SLR parsing table. Is the grammar SLR? ; (12 Marks) 4a. Given the following grammar: S>CC; CoC/d i) Construct sets of LR(A) items. ii) Construct canonical LR(1) parsing table. (12 Marks) b. Construct LALR parsing tables for the grammar shown in Q4 (a) using LR(1) items. (08 Marks) PART-B Sa, Explain the concept of syntax directed translation, with examples. (06 Marks) b. Define inherited and synthesized attributes. (04 Marks) ©. Give SDD ofa simple desk calculator. (04 Marks) 4. Write the annotated parse tree for 3+5+4n. (06 Marks) 6 a Draw the DAG for the arithmetic expression, a+a*(b—c)+(b—c)#d. Show the steps for constructing the DAG. (10 Marks) b. What are three address codes? Explain different ways of representing three address codes, with examples. (10 Marks) 7. What is an activation record? Explain the purpose of each item in the activation record, with example. (08 Marks) b. Distinguish between static scope and dynamic scope. (04 Marks) ©. What do you mean by calling sequence? Explain the actions performed during, i) function call ii) retum, (08 Marks) 8 a. Explain the main issues in code generation. (10 Marks) b. For the following program segment: for i= 1 to 10.do for j=1 to 10.do afi, j} = 0.0 fori= 1 t0 10 do afi, i] = 1.0 generate intermediate code and identify basic blocks. (10 Marks) tenes

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy