0% found this document useful (0 votes)
92 views

Compiler Design Kit052

This document appears to be an exam for a Compiler Design course. It contains 7 sections with multiple choice and long answer questions. Section A asks 10 short answer questions about compiler design topics like lexemes, parsers, error handling, and syntax-directed translations. Section B has 3 long answer questions about DFA construction, symbol table management, and DAG representations. Section C contains 2 long answer questions about shift-reduce parsing and eliminating left recursion. The remaining sections ask students to explain intermediate code, activation records, syntax-directed translations, error recovery techniques, and data flow analysis. In total, there are over 30 questions testing students' knowledge of compiler design principles and techniques.

Uploaded by

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

Compiler Design Kit052

This document appears to be an exam for a Compiler Design course. It contains 7 sections with multiple choice and long answer questions. Section A asks 10 short answer questions about compiler design topics like lexemes, parsers, error handling, and syntax-directed translations. Section B has 3 long answer questions about DFA construction, symbol table management, and DAG representations. Section C contains 2 long answer questions about shift-reduce parsing and eliminating left recursion. The remaining sections ask students to explain intermediate code, activation records, syntax-directed translations, error recovery techniques, and data flow analysis. In total, there are over 30 questions testing students' knowledge of compiler design principles and techniques.

Uploaded by

charvisi2002
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Printed Pages:02 Sub Code: KIT-052

Paper Id: 231849 Roll No.

B. TECH.
(SEM V) THEORY EXAMINATION 2022-23
COMPILER DESIGN
Time: 3 Hours Total Marks: 100
Note: Attempt all Sections. If require any missing data; then choose suitably.

SECTION A

1. Attempt all questions in brief. 2 x 10 = 20


(a) What is a lexeme? Define a regular set.
(b) What is a predictive parser?
(c) List the properties of LR parser.
(d) Give the applications of DAG.
(e) Define backpatching.
(f) Draw the transition diagram for an identifier.
(g) Differentiate analysis and synthesis phase.
(h) What are the functions of error handler?
(i) Define a syntax-directed translation.
(j) Define loop jamming with an example.

2
90

13
_2

2.
SECTION B
P1

24
2. Attempt any three of the following: 10 x 3= 30

5.
3D

.5
(a) Construct a DFA that accepts a language L over input alphabets ∑ = {a, b} such that
P2

L is the set of all strings starting with ‘aa’ or ‘bb’. 17


Q

(b) Define the following terms and give suitable example for it.
|1
i) Handle
ii) Handle pruning
3
:3

iii) Left Factoring


29

(c) Construct CLR parsing table for the following grammar.


S→ CC
:
13

C→ cC | d
(d) Explain various data structures used in symbol table management.
3

(e) Define DAG. Explain DAG representation of basic block with example.
02
-2

SECTION C
01

3. Attempt any one part of the following: 10 x 1= 10


8-
|1

(a) Explain stack implementation of shift reduce parser.


(b) What is left recursion? Eliminate the left recursion from the following grammar.
E→E+T|T
T→ T * F | F
F → ( E ) | id

QP23DP1_290 | 18-01-2023 13:29:33 | 117.55.242.132


4. Attempt any one part of the following: 10 x 1= 10

(a) Discuss differences between inherited attributes and synthesized attributes.


(b) Explain various dynamic storage allocation techniques.

5. Attempt any one part of the following: 10 x 1= 10

(a) What is an activation record? Explain how they are used to access local and global
variables.
(b) Explain syntax directed translation scheme for Infix to Postfix conversation with
example.

6. Attempt any one part of the following: 10 x 1= 10

(a) Generate three address code for the following code segment
While (a<b) do
If (c<d) then x= y+z
(b) Explain different error recovery techniques with suitable example.

2
7. Attempt any one part of the following:
90 10 x 1= 10

13
_2

2.
(a) What is intermediate code? Explain different types of intermediate
P1

24
coderepresentations. Also discuss importance of intermediate code.
(b) Explain in detail about the data-flow schemas on basic block and the transfer

5.
3D

equations for reaching definitions with example.

.5
P2

17
Q

|1
3
:3
: 29
13
3
02
-2
01
8-
|1

QP23DP1_290 | 18-01-2023 13:29:33 | 117.55.242.132

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