Explain the role of linker, loader and preprocessor in the process of compilation.
[3 marks]Define lexeme, token and pattern. Identify the tokens from the following program segment void change (int c, int d) { int m; m = c; c= d; d = m; }
[4 marks]Explain the phases of compiler with an example.
[7 marks]Find the Regular Expression corresponding to given statement subset of {0,1}* 1) The Language of all strings containing exactly three 1’s 2) The Language of all strings begins or ends with 00 3) The Language of all strings that contain at least three 1’s
[3 marks]What is Left Recursion? Give an example for eliminating the same
[4 marks]Draw DFA for the following regular expression without construction of NFA. ( a | b) * a (a | b)#
[7 marks]Explain recursive-descent parsing with suitable example.
[7 marks]Explain the stack implementation of shift reduce parser with the help of example.
[3 marks]What is inherited attribute? Explain with suitable example.
[4 marks]Check the following grammar is SLR(1) or not S → Aa | bAc | Bc | bBa A → d B → d
[7 marks]Define the following terms: 1) LL(1) Grammar 2) Ambiguous Grammar 3) Operator Grammar
[3 marks]Find out FIRST & FOLLOW set for all the Nonterminals S-> 1AB | ϵ A-> 1AC | 0C B-> 0S C-> 1
[4 marks]Write a syntax directed definition for desk calculator. Using this definition draw annotated parse tree for 6*3+5n1
[7 marks]Explain Activation Record
[3 marks]Explain panic mode and phrase level error recovery techniques.
[4 marks]Explain quadruple, triple and indirect triple with suitable example.
[7 marks]Explain flow graph with suitable example.
[3 marks]Explain dynamic storage allocation techniques.
[4 marks]Explain syntax directed definition to produce three address codes for flow of control statements with suitable example.
[7 marks]Draw the parse tree and derive the left most derivation using the following grammar for the input string: (a + a) * (a * a). E → E + T | T T → T * F | F F → ( E ) | a
[3 marks]Write down the algorithm for partitioning of basic blocks.
[4 marks]Explain any four code optimization techniques with suitable example.
[7 marks]Explain code scheduling constraints.
[3 marks]Write short note on LEX.
[4 marks]Explain the generic issues in the design of code generators.2
[7 marks]