Explain the roles of linker, loader and preprocessor.
[3 marks]What is Input Buffering? Why it is used?
[4 marks]Explain the language dependent and machine independent phases of compiler. Also List major functions done by compiler.
[7 marks]Describe the role of lexical analyzer.
[3 marks]Write the regular expression Rover {0,1} or {a,b}: 1) The set of all strings with even number of a’s followed by an odd number of b’s. 2) The set of all strings that consist of alternating 0’s and 1’s
[4 marks]Explain activation record in detail.
[7 marks]What are conflicts in LR Parser? What are their types? Explain with an example.
[7 marks]What do you mean by left recursion and how it is eliminated?
[3 marks]What is ambiguous grammar? Show that S -> aS|Sa|a ia an ambiguous grammar.
[4 marks]Consider the following grammar: S’ = S# S -> ABC A -> a|bbD B -> a| Ꜫ C -> b| Ꜫ D -> c| Ꜫ Construct FIRST and FOLLOW for the grammar also design LL(1) parsing table for the grammar
[7 marks]Differentiate between top down parser and bottom up parser.
[3 marks]Explain handle and handle pruning
[4 marks]Consider the following grammar S -> AA A -> aA A -> b And construct the LALR parsing table.
[7 marks]Differentiate between Sattributes and Lattributes
[3 marks]For the following production write the semantic action: 1. S -> E$1 2. E -> E1 + E2 3. E -> E1 * E2 4. E - > digit
[4 marks]Translate the following expression into quadruple, triple, and indirect triple: -(a+b)*(c+d)-(a+b+c)
[7 marks]Differentiate between parse tree and syntax tree
[3 marks]What is dependency graph? Explain with example.
[4 marks]Generate the three address code for the following program segment: While(a<c and b>d) Do if a=1 then c = c+1 Else While a<=d Do a= a+b
[7 marks]List the issues in code generation.
[3 marks]Discuss the functions of error handler.
[4 marks]What is DAG? What are its advantages in context of optimization? How does it help in eliminating common sub expression?
[7 marks]What is global optimization? Name the 2 types of analysis performed for global optimization.
[3 marks]Explain the following with example 1) Lexical phase error 2) Syntactic phase error
[4 marks]What is peephole optimization? Explain with example.
[7 marks]