Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Unit I Questions (16 marks)

1. i. What are the various phases of the compiler? Explain each phase in detail. Write down the output of each phases for the expression, a := b + c 60 ii. Briefly explain about compiler construction tools 2. 3. i. Describe how various phase could be combined as a pass in a compiler. ii. What are the cousins of compiler? Explain in detail. i. Write down the algorithm for following a. Minimizing the number of states of a DFA. b. - closure ii. Give the hierarchical structure of programming language. 4. i. Explain briefly about input buffering? ii. Define regular expression with an example. iii. Give the attribute of token and why it is called as token. 5. 6. i. Write an algorithm to construct NFA from RE ii. Explain briefly the design of lexical analyzer i. Construct an optimized DFA from the following RE. (a|b)(a|b)a ii. Write First position and follow position rule. 7. DFA. (a|b)*a(a|b)(a|b) 8. that the minimum state DFAs are same i. ii. 9. 10. (a|b)* (a*|b*)* (16) (10) (6) (4) (8) (4) (16) Can you prove that the following two regular expressions are equivalent by showing (4) i. Draw the NFA f or the following Regular expression and convert into minimized (4) (4) (8) (8) (4) (4) (8) (8) (12) (6) (6) (10) (10)

i. Explain brief about specification of tokens. ii. Write an algorithm to construct DFA from regular expression. i. What is the software tools used to manipulate source program? ii. What is the role of lexical analyzer? iii. Draw the transition diagram of relational operators.

You might also like