JNTU

JNTU B.Tech III COMPILER DESIGN Previous Question Paper (November/December - 2017 - R13)

B.Tech | III | I | R13 | November/December - 2017

Answer PaperPaper Code: 115APMaximum Marks: 75Time: 3 hours

Note: This question paper contains two parts A and B. Part A is compulsory which carries 25 marks. Answer all questions in Part A. Part B consists of 5 Units. Answer any one full question from each unit. Each question carries 10 marks and may have a, b, c as sub questions.

Part A

1.a

What are the features of a Lexical analyser?

2 marks

Answer

A lexical analyser, or scanner, performs the following primary functions: it reads the input source code character by character to produce a stream of tokens, which are the meaningful units of the language such as keywords, identifiers, operators, and literals. It also removes white space, tabs, and newlines, and strips out comments from the source code. Additionally, it interacts with the symbol table to store information about identifiers and reports any lexical errors, such as illegal characters, to the compiler.

1.b

Explain in brief about left most and right most derivations.

3 marks

Answer

A leftmost derivation is a process where the leftmost non-terminal in the sentential form is replaced by the right-hand side of a production rule at each step. This process continues until the string consists entirely of terminals. It is often associated with top-down parsing strategies.

A rightmost derivation is a process where the rightmost non-terminal in the sentential form is replaced by the right-hand side of a production rule at each step. This process is the reverse of the leftmost derivation in terms of selection order and is typically associated with bottom-up parsing strategies, such as shift-reduce parsing.

1.c

Define Left recursive grammar.

2 marks

Answer

Sign in to view the complete answer paper.

1.d

List out the rules for FIRST and Follow.

3 marks

Answer

Sign in to view the complete answer paper.

1.e

What are the advantages of heap storage allocation?

2 marks

Answer

Sign in to view the complete answer paper.

1.f

Define Type Equivalence.

3 marks

Answer

Sign in to view the complete answer paper.

1.g

What is algebraic transformation?

2 marks

Answer

Sign in to view the complete answer paper.

1.h

Write in brief about flow graphs.

3 marks

Answer

Sign in to view the complete answer paper.

1.i

What are the forms of a target program?

2 marks

Answer

Sign in to view the complete answer paper.

1.j

What is machine independent code optimization?

3 marks

Answer

Sign in to view the complete answer paper.

Part B

210 marks
a

Define Regular Expression? Write about the identity rules for regular expressions.

5 marks

Answer

Sign in to view the complete answer paper.

b

Discuss in brief about left Recursion and Left Factoring with examples.

5 marks

Answer

Sign in to view the complete answer paper.

OR
310 marks
a

Define Compiler. Explain in brief about the LEX compiler.

5 marks

Answer

Sign in to view the complete answer paper.

b

Construct FIRST and FOLLOW for the Grammar: E→E+T/T, T→T*F/F, F→(E)/id ?

5 marks

Answer

Sign in to view the complete answer paper.

410 marks
a

Construct SLR parsing table for the following grammar. E → E+T/T T → T*F/F F →(E)/id

5 marks

Answer

Sign in to view the complete answer paper.

b

Discuss in brief about Yacc.

5 marks

Answer

Sign in to view the complete answer paper.

OR
510 marks
a

Construct CLR parsing table for the following grammar. E → E+T/T T → T*F/F F →(E)/id

5 marks

Answer

Sign in to view the complete answer paper.

b

Discuss in brief about error recovery strategies in Parsing.

5 marks

Answer

Sign in to view the complete answer paper.

610 marks
a

Explain in brief about Type checking and Type Conversion.

5 marks

Answer

Sign in to view the complete answer paper.

b

Define Symbol table. Explain about the data structures used for Symbol table.

5 marks

Answer

Sign in to view the complete answer paper.

OR
710 marks
a

Explain in brief about Stack Storage allocation strategy?

5 marks

Answer

Sign in to view the complete answer paper.

b

Define activation record? Explain in brief about the fields in activation record.

5 marks

Answer

Sign in to view the complete answer paper.

8

What is DAG? Construct DAG for the following Basic block: D:= B*C; E:= A+B; B:=B+C; A:=E-D;

10 marks

Answer

Sign in to view the complete answer paper.

OR
9

Explain how copy propagation can be done using data flow equation?

10 marks

Answer

Sign in to view the complete answer paper.

10

Define loop optimization? Describe in brief about the transformation on basic blocks.

10 marks

Answer

Sign in to view the complete answer paper.

OR
1110 marks
a

Explain reducible and non reducible flow graphs with examples.

5 marks

Answer

Sign in to view the complete answer paper.

b

Discuss about Instruction Selection and Register allocation.

5 marks

Answer

Sign in to view the complete answer paper.

About this paper

This page contains the question paper of COMPILER DESIGN from JNTU for B.Tech CSE III I, November/December - 2017, R13.

For the solved question paper with answers, switch to the Answer Paper tab.

Other papers in COMPILER DESIGN

Loading Question Papers

Fetching data from database...