Describe the role of preprocessor, assembler and loader in program execution.
[3 marks]Compare and contrast compilers and interpreters.
[4 marks]Explain phases of compiler in context of front end and back end with example. Give the significance of both.
[7 marks]Define following terms. 1) Handle pruning 2) Unambiguous grammar 3) Left recursion
[3 marks]What is common prefix problem? Write steps to solve it with example.
[4 marks]Construct NFA for following regular expression using Thompson’s notation and then convert it into DFA. ab*a(a|b)*bb.
[7 marks]Construct SLR parsing table for the following grammar : E -> T+E | T T -> i
[7 marks]What is sentinel? Explain with an example.
[3 marks]Differentiate synthesized and inherited attributes.
[4 marks]Construct LL(1) parsing table for the following Grammar after applying necessary action. S→ 1AB | ε A→ 1AC | 0C B→ 0S C→ 1
[7 marks]What is operator grammar? Explain with example.
[3 marks]Construct LR (1) item set for following grammar. E -> E+T | T T -> T*F | F F -> id
[4 marks]Draw DFA for the following regular expression using firstpos( ), lastpos ( ) and followpos ( ) functions. (a|b)*abb.
[7 marks]Define basic block with a simple example.
[3 marks]Which are the different conflicts occurs during constructing LR parsing table? Explain in detail.
[4 marks]Explain the issues regarding code generation in compiler design with example.
[7 marks]Differentiate SLR, LALR and CLR.
[3 marks]Write a short note on peephole optimization.1
[4 marks]Explain quadruples, triple and indirect triple form of three address code with example.
[7 marks]Give the regular definition for unsigned numbers in Pascal and also construct transition diagram for that.
[3 marks]Write a short note on symbol table.
[4 marks]Explain all error recovery strategies using suitable examples.
[7 marks]What is activation record?
[3 marks]Explain any two methods of parameter passing.
[4 marks]Write syntax directed definition for simple desk calculator. Using this definition, draw annotated parse tree for 3*5+4 n.
[7 marks]