Assignment No-1
Assignment No-1
Assignment No-1
6: Assignment-1 (Unit-1)
School of Computing Science and Engineering
Assignment No-1, September-2019, Semester-V: Fall, 2019-20
[B.Tech] [Semester: IV ] [Batch: CS]
Course Title : Compiler Design
Course Code: BCSE3002
Max Marks: 10
Deadline for submission of solutions by students:
Allotted Mapped Bloom’s
Sl No Assignment statement
students COs Level
Write regular expression to describe a
1. languages consist of strings made of even CO1 K3
numbers a and b.
Write regular expression for identifier and
2. CO1 K3
number.
Write regular expression for no 2 a's and no 2
3. CO1 K2
b's should come together over alphabet {a,b}.
Construct Regular expression for the language
4 L= {w ε{a,b}/w ends in abb} and also draw CO1 K4
DFA for above language.
Derive the string and construct a syntax tree for
5. the input string ceaedae using the grammar CO1 K4
S->SaA|A, A->AbB|B, B->cSd|e
Draw syntax tree for the expression
6. CO1 K4
a=b*– c+b*– c
Construct a parse tree of (a+b)*c for the
grammar E->E+E / E*E / (E) / a / b / c. and
7. CO1 K4
check for given string above Grammar is
ambiguous or not?
Convert the following expression grammar
into right recursive
8. CO1 K4
E -> E * F | F+E | F
F -> F-F | id
Consider the following given grammar:
S → Aa, A → BD
9. B → b|ε, D → d|ε CO1 K4
Compute the First and Follow set of All the
non-terminal.
Define Handle and Handle pruning by taking
10. CO1 K2
suitable Grammar.