Assignment 1 CD
Assignment 1 CD
SESSION:2023-24
COURSE OUTCOMES
By the end of the course, students will be able to:
Acquire knowledge of different phases and passes of the compiler and also able to
CO1 use the compiler tools like LEX, YACC, etc. Students will also be able to design
different types of compiler tools to meet the requirements of the realistic constraints of
compilers.
CO2 Understand the parser and its types i.e. Top-Down and Bottom-up parsers and
construction of LL, SLR, CLR, and LALR parsing table.
CO3 Implement the compiler using syntax-directed translation method and get knowledge
about the synthesized and inherited attributes.
CO4 Acquire knowledge about run time data structure like symbol table organization and
different techniques used in that.
CO5 Understand the target machine’s run time environment, its instruction set for code
generation and techniques used for code optimization.
Q1. Describe all the phases of compiler. Demonstrate all the phases for the K3
source program x = y + z* 10.
Q2. Write down all the rules of Thompson Construction method for creating K3 ,K6
NFA.Design NFA for b (a/b)*ab and convert into equivalent DFA.
Q3. Write short notes on following : K2
i) LEX Tool ii) YACC Tool
Q4. Consider the grammar : S → ( L ) │a & L → L, S │ S K3
Find the parse trees for the following sentences:
i) ( a, a) ii) ( a, (a, a))
Differentiate the following: K3
Q5. i) Single Pass and Multi Pass Compiler
ii) One Buffer and Two Buffer Scheme
Q6. Write short notes on: i) Bootstrapping ii) Cross Compiler K3