a) Let L = {a, b}
Suppose you have constructed the following language:
“The set of all strings consisting of zero or more instances of a or b, that is all set of a’s and b’s and starting with aa, ending with bb”.
I. Write the regular expression for this language.
II. Draw the corresponding NFA
III. Show the Transition Table as well DFA diagram.
b) Show functionality of first three (3) phases of compiler for this assignment statement:
number = value + rate *30
a) How compiler is different from interpreter? Explain with example in brief.
b) Draw the block diagram of phases of compiler and explain the phases briefly.
c) How symbols or keywords and errors are detected by the lexical analyzer? Explain
d)Draw the block diagram of a language processing system.
e)Briefly describe the role of lexical analyzer for a compiler using diagram.
f)Define token, lexeme and patterns.
a) Show the NFA and DFA for the following expressions:
(i) ( P (P|Q) | Q)*
(ii) AB | PQR*
b)Construct Finite Automata (DFA) for the following REs (step by step):
i. ab(c|d)
ii.(a|b)ab(a|b)c