0% found this document useful (0 votes)
8 views

At&CD Pre Finalexam

Uploaded by

sandhyabandaru89
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

At&CD Pre Finalexam

Uploaded by

sandhyabandaru89
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

VIJAYA ENGINEERING COLLEGE

II B.Tech II Semester pre final Examinations, July 2024


Subject : AUTOMATA AND COMPILER DESIGN Branch : AIML
--------------------------------------------------------------------------
Answer all questions Each question carry equal marks 6*10 =60 M

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)

8.a)Explain various phases of compiler considering the example : i=i*70+j+2


b) Explain LEX too in detail [5+5]
OR
9.a) construct predictive parsing table for S-> (L)|a, L->L,S|S
b) Construct SLR parsing table for the givaen grammar E->E+E|E*E|(E)|id and parse
the sentence (id+id)*id [5+5]

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]

You might also like