Compare and contrast compilers and interpreters.
[3 marks]Write a short note on LEX Tool.
[4 marks]Explain phases of compilers with suitable example.
[7 marks]Define terms: pattern, lexeme, token
[3 marks]Write any one method used in lexical analyzer for buffering the input.
[4 marks]Construct nondeterministic finite automata by using Thomson’s Construction for following regular expression. Show the sequence of moves made in processing the input string ababbab. (a|b)* abb
[7 marks]Consider the following grammar to construct leftmost and right most derivation for the sentence abab. SaSbS|bSaS|ε
[3 marks]Write rule(s) to check grammar is left recursive or not. Remove left recursive from the following grammar. SaBDh BBb|c DEF Eg| ε Ff| ε
[4 marks]Construct the SLR parsing table for the following Grammar. E E+T | T T T*F | F F (E) | id
[7 marks]Write rule(s) to check grammar is operator grammar or not.
[3 marks]Explain any two error-recovery strategies.
[4 marks]Construct LALR parsing table for the following grammar. S -> CC C -> cC C -> d1
[7 marks]Define : 1) synthesized attribute 2) inherited attribute
[3 marks]Explain any two parameter passing methods.
[4 marks]Write SDD for arithmetic expression and Construct annotated parse tree for the input expression (4*7+1)*2 .
[7 marks]What is activation record?
[3 marks]What is Intermediate form of the code? What are the advantages of it?
[4 marks]Construct syntax directed translation scheme and definition that translate arithmetic operation from infix to postfix in which an operator appears before its operand as for example xy- is a positive notation for x-y . Give annotated parse tree for the input 9-5+2 and 9-5*2.
[7 marks]Explain any two issues in design of code generator
[3 marks]Compare: static v/s dynamic Memory Allocation.
[4 marks]Translate the expression –(a+b)*(c+d)+(a+b+c) into 1. Quadruples 2. Triples 3. Indirect triples
[7 marks]What are the limitations of static storage allocation?
[3 marks]Write a short note on Symbol table management.
[4 marks]Write any two methods of code-optimization in detail.
[7 marks]