[go: up one dir, main page]

0% found this document useful (0 votes)
22 views2 pages

Assignment 2

This document outlines the requirements for Assignment-2 in Compiler Design, due on April 27, 2025. It includes a series of questions covering topics such as input buffering techniques, compiler phases, symbol tables, NFA and DFA construction, parsing methods, syntax trees, and code optimization. Students are required to answer all questions, each carrying equal weight.

Uploaded by

swapnil saxena
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)
22 views2 pages

Assignment 2

This document outlines the requirements for Assignment-2 in Compiler Design, due on April 27, 2025. It includes a series of questions covering topics such as input buffering techniques, compiler phases, symbol tables, NFA and DFA construction, parsing methods, syntax trees, and code optimization. Students are required to answer all questions, each carrying equal weight.

Uploaded by

swapnil saxena
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

Assignment-2

Compiler Design (Direct Reading)


Submission Deadline:- 27/04/25

Answer All Questions (25X4)


1. a. Write a brief note on input buffering techniques.
b. Explain phases of compiler with example.

c. What is symbol table? For what purpose , compiler uses symbol table?
d. Construct NFA for following regular expression using Thompson’s
notation and then convert it into DFA. (a/b)*abb#

2 a. Explain subset construction method with example.


b. Define handle and handle pruning. Explain the stack implementation of shift reduce
parser with the help of example.
c. Give the translation scheme that converts infix to postfix notation.
Generate the annotated parse tree for input string 3-5+4.

d. Check given grammar is LL(1) but not SLR(1).


S -> AaAb | BbBa
A -> €
B -> €
3 a. What is left factoring and left recursion? Explain it with suitable example.

b. Define syntax tree. What is s-attributed definition? Explain construction of syntax tree
for the expression a-4+c using SD.
c. Explain parameter passing techniques for procedure.
d. Construct LL(1) parsing table for the following Grammar:
E -> E+T | T
T -> T*F | F F -> (E)
4. a. Explain three loop optimization techniques with example.

b. What is code optimization? Explain data flow equation.

c. Describe code generator design issues.

e. Define following : DAG, Basic Blocks, Flow graph

You might also like