What is the role of lexical analyzer? Justify your answer with example.
[3 marks]Briefly explain the role of linker and loader in language processing activity.
[4 marks]Discuss the various storage allocation strategies for compilers in detail.
[7 marks]Define the following terms:
[3 marks]Context free grammar (ii) Handle pruning (iii) Symbol table
[ marks]What is recursive descent parsing? Design recursive descent parsing for the following grammar: S aSa | aa
[4 marks]Convert the following regular expression to DFA using subset construction method. ((0|1)(0|1))*#
[7 marks]Construct the predictive parser for sentence (a, a) using the grammar: S (L)|a L L,S|S Check whether the given grammar is LL(1) or not?
[7 marks]Write CFG for the following languages: i. {ambm: m>=n} ii. generates strings having equal number of a’s and b’s over symbols {a,b}.
[3 marks]Given the algorithm for computing precedence function. Consider the following OPG table matrix, compute precedence function. a ( ) ; $ a > > > ( < < < ) < < < ; < < > > $ < <
[4 marks]Construct the SLR parsing table for the following grammar. S AaAb S BbBa1 A ^ B ^
[7 marks]Explain the strategies used to recover from syntactic errors.
[3 marks]Explain the algorithm to remove left recursion in context free grammar with example.
[4 marks]Construct the LALR parsing table for the following grammar: S AA A aA|b
[7 marks]Explain Activation record in detail.
[3 marks]Translate the expression – (a+b)*(c+d)+(a+b+c) into 1. Quadruples 2. Triples 3. Indirect triples
[4 marks]Consider the following grammar. Write syntax directed definition. Consider “char a, b, c” as the input sentence and draw augmented parse tree. Also determine evaluation order. S T List T integer/float/double/char List List1, id List id
[7 marks]List the different conflicts that occur in Bottom up parsing and give examples for that.
[3 marks]Write a three address code for the following expression: a < b or c < d
[4 marks]Give the translation scheme for converting the assignment statements into three address code. Assume suitable example for the same.
[7 marks]What is DAG? Construct DAG for following expression: a + a * (b-c)+ (b–c)* d.
[3 marks]Explain parameter passing techniques for procedure.
[4 marks]Write Short notes on 1. Local and loop optimization 2. induction variable elimination
[7 marks]What is flow graph? Give suitable example.
[3 marks]Discuss briefly about the Peephole optimization
[4 marks]Explain the issues regarding code generation in compiler design with example.
[7 marks]