At&CD Pre Finalexam
At&CD Pre Finalexam
1)
a. Define DFA [1]
b. Explain about €-transition [1]
c. state pumping lemma [1]
d. write applications of pumping lemma [1]
e. define Ambiguity in CFG [1]
f. Define undesirability [1]
g. Define token and lexeme [1]
h. Define First and follow [1]
i. What is the S – attributes and Ll – attributes? [1]
j. Draw annotated parse tree for the expression: 3 ∗ 5 + 4𝑛. [1]
2.a) Design a FA for the language which accepts odd number of 0’s and odd
number of 1’s over input alphabet ={0,1}
b)
OR
6. Design a Turing machine for the language
(a) L={a^nb^2n /n>=1} (b) L= {ww^R /w € (a+b)+} [5+5]
OR
7.a)
(b)
10.a) Translate the expression –(a+b) *(c+d) + (a+b+c) into quadruple , triple and indirect triple
b) Give the syntax-directed definition of a simple desk calculator and construct an
annotated parse for the input expression (4*7+1)*2. [5+5]
OR
11.a) How are conditional statements and loops translated into Three-Address-Code ?
b) Write the SDD for a Simple type declaration and write annotated parse tree & the
dependency graph for the declaration float a,b,c [5+5]