Question: ### **Unit I** 1. **What is compilation process? Explain different phases of compiler with an example.** *(15 marks)* 2. **Discuss the issues involved in designing


### **Unit I**  


1. **What is compilation process? Explain different phases of compiler with an example.** *(15 marks)*  

2. **Discuss the issues involved in designing Lexical analyzer and draw NFA for regular expression ab*/ab.** *(15 marks)*  


---


### **Unit II**  


3. **Consider the following grammar:**  

   - E ? E+T | T  

   - T ? TF | F  

   - F ? F* | a | b  


   **Construct the SLR Parsing table for the above grammar.** *(15 marks)*  

4. (a) **Write an algorithm for Non-recursive predictive parsing.** *(7.5 marks)*  

   (b) **What is the role of parser in syntactic analysis?** *(7.5 marks)*  


---


### **Unit III**  


5. **What is symbol table and different data structures used for organizing symbol tables?** *(15 marks)*  

6. **What is meant by syntax-directed translation? Explain the variants of syntax trees with a suitable example.** *(15 marks)*  


---


### **Unit IV**  


7. **Write short notes on the following:** *(5 marks each)*  

   (a) **Reducible flow graphs**  

   (b) **Loop optimization**  

   (c) **Peephole optimization**  

8. **What is code generation? Discuss the issues related to code generation with examples.** *(15 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Unit I 1 What is the compilation process Explain different phases of the compiler with an example The compilation process consists of several phases 1 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Algorithms Questions!