Define following terms: i. Compiler ii. Interpreter iii.Token
[3 marks]Explain activation tree?
[4 marks]Explain a rule of Left factoring a grammar and give Example.
[7 marks]Explain input buffering methods.
[3 marks]Draw NFA from regular expression using Thomson’s construction and convert it into DFA. (a | b)* a b* a
[7 marks]Define the following terms and give suitable example for it. i. Augmented Grammar ii. LR(0) Item iii.LR(1) Item
[4 marks]Draw the DFA for the regular expression (a|b)*abb using set construction method only.
[7 marks]Design FIRST and FOLLOW set for the following grammar. S→ 1AB | ε A→1AC | 0C B→0S C→1
[4 marks]Differentiate Top Down Parsing and Bottom up parsing
[3 marks]Explain error recovery strategies used by parser.
[4 marks]Construct CLR parsing table for following grammar. S -> aSA | € A -> bS | c
[7 marks]Describe Ambiguous Grammar with example.
[3 marks]Explain operator grammar. Generate precedence function table for following grammar. E -> EAE | id A -> + | *
[7 marks]Draw a DAG for expression: a + a * (b – c) + (b – c) * d.
[3 marks]Compare: Static v/s Dynamic Memory Allocation.
[4 marks]Explain the following parameter passing methods. 1. Call-by-value 2. Call-by-reference 3. Copy-Restore 4. Call-by-Name
[4 marks]Explain Peephole Optimization. OR1
[7 marks]Explain various issues in design of code generator.
[3 marks]Translate following arithmetic expression - ( a * b ) + ( c + d ) - ( a + b + c + d ) into 1] Quadruples 2] Triple 3] Indirect Triple
[7 marks]Explain symbol table. For what purpose , compiler uses symbol table?
[3 marks]Explain Basic-Block Scheduling.
[4 marks]Explain synthesized attributes with the help of an example.
[7 marks]Define a following: i. Basic block ii. Constant folding iii. Handle.
[3 marks]Write difference(s) between stack and heap memory allocation.
[4 marks]Explain Pass structure of assembler.
[7 marks]