Compare and contrast compilers and interpreters.
[3 marks]Give the significance of left factoring and explain with an example.
[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) Lexeme 2) Handle pruning 3) Viable prefixes
[3 marks]Write regular expression over {a,b} 1. The set of all strings which starts and ends with different symbols 2. The set of all strings having even number of “a” 3. The set of all strings having odd number of “b” 4. The set of all strings having at least two times “a”
[4 marks]Construct LL(1) parsing table for the following Grammar: S -> aABb A-> c | ε B-> d | ε
[7 marks]Construct NFA for following regular expression using Thompson’s construction and then convert it into DFA. ab(a|b)*ab*.
[7 marks]Differentiate between parse tree and syntax tree
[3 marks]What is inherited attribute? Explain with suitable example.
[4 marks]Check whether the following grammar is SLR or not S -> AaAb | BbBa A -> ε B -> ε
[7 marks]Compare and contrast SLR and LALR.
[3 marks]Write down the algorithm for partitioning of basic blocks.
[4 marks]Explain operator grammar. Generate precedence function table for the following grammar. E -> EAE | id A -> + | *
[7 marks]What is sentinel? Explain with an example.
[3 marks]Explain Error Recovery Strategies in brief.
[4 marks]Explain quadruples, triple and indirect triple form of three address code with example.1
[7 marks]Draw a DAG for expression: a + a * (b – c) + (b – c) * d.
[3 marks]Explain various parameter passing methods.
[4 marks]Write syntax directed definition for simple desk calculator. Using this definition, draw annotated parse tree for 7*9+6 n.
[7 marks]What do you mean by dangling references?
[3 marks]Which are the different conflicts occurs during constructing LR parsing table? Explain in detail.
[4 marks]Implement the following grammar using Recursive Descent Parser. S -> Aa | bAc | bBa A -> d B -> d
[7 marks]Differentiate top down and bottom up parser.
[3 marks]Write a short note on symbol table.
[4 marks]What is peephole optimization? Explain with example.
[7 marks]