You are on page 1of 1

Compiler Construction (Mid Term 2021)

Note: All questions solve in hand written form and submitted in campus on 17 may 2021

Q1: How this source program gets compiled? (06) E = a+ b * 60;

Q 2: Consider the Grammar given E ̶> E+E | E-E | E/E | E*E | a | b


for the string a+b*b how it derivation get and generate parsing tree for both a) Left Most Derivation b)
Right Most Derivation

Q 3: Write the Lexemes, Tokens and Patters of the following grammar also draw the transition diagram
of the relop.

letter → [A B C……Z | a b c………z)

digit → 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9

relop → < | > | <= | >= | = | <>

You might also like