0% found this document useful (0 votes)
25 views2 pages

AT&CD

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

AT&CD

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

AUTOMATA THEORY & COMPILER DESIGN

MID – I QUESTIONS
SET –I

1. Define regular expression. Construct an equivalent FA for the given regular expression
(0+1)*(00+11)(0+1)* [CO1, BTL-5] [10M]
2. Write the leftmost and rightmost derivations, and draw the parse-tree for the string -
aaabbabbba with the grammar.
S → aB | bA
A → a | aS | bAA
B → b | bS | aBB [CO2, BTL-1] [10M]

3. Construct the predictive parser for the following grammar.


S → (L) | a
L → L,S | S
Construct the behavior of the parser on the sentence (a,a) using the grammar specified above.

[CO3, BTL-5] [10M]

SET – II

1. Construct the RE from FA shown below

[CO1, BTL-5] [10M]


2. Illustrate the various phases of compiler with neat diagram and represent output generated at
each phase with suitable example? [CO2, BTL-3] [10M]
3. Construct the predictive parse table for the following grammar:
S→A
A → aB|Ad
B → bBC |f
C→g [CO3, BTL-5] [10M]

SET – III

1. a) Construct DFA for the language L= {w/ w is of even length and begins with 01}.
[CO1, BTL-5]
[05M]
b) Construct DFA for the language L= {w/ w does not contain 10}? [CO1, BTL-5] [05M]
2. Consider the Grammar: G = ({S}, {a, b}, {S → SbS | a}, S). Find the leftmost derivation,
rightmost derivation, and parse tree for the string: abababa [CO2, BTL-1] [10M]

3. List out the set of recursive procedures in Recursive-Descent parser with suitable example
grammar? [CO3, BTL-1] [10M]

SET – IV

1. Compute the below NFA-Epsilon moves to NFA.

[CO1, BTL-3] [10M]


2. Define ambiguous grammar. Test whether the below grammar is ambiguous or not.
S →SS|AB
A → Aa | a
B → Bb | b [CO2, BTL-1] [10M]
3. Give the rules for computation of FIRST(X) and FOLLOW(X). Construct FIRST and
FOLLOW sets for the following grammar.
E → T E’
E’ → +T E’ | ε
T → F T’
T’ → *FT’ | ε,
F → (E) | id [CO3, BTL-2] [10M]

You might also like