Define lexemes, patterns and tokens.
[3 marks]Differentiate compilers and interpreters.
[4 marks]Explain analysis of source program for compilers.
[7 marks]Give regular definition for signed and unsigned numbers.
[3 marks]Check whether the following grammar is ambiguous or not. S (S) S S ε
[4 marks]Draw DFA from regular expression without constructing NFA. (a | b | c)* a (b | c)* #
[7 marks]Draw NFA from regular expression using Thomson’s construction and convert it into DFA. (a | b)* a b* a
[7 marks]Define handle and handle pruning.
[3 marks]Construct operator precedence relations table for following grammar. E E+E E E-E E E*E E (E) E id Assume suitable operator associativity and precedence.
[4 marks]Construct recursive descent parser for following grammar. E T A A + T A A ε T F B B* F B B ε F ( E ) F id
[7 marks]Differentiate top down parsing and bottom up parsing.
[3 marks]Construct syntax directed translation scheme for infix to postfix conversion.
[4 marks]Construct LL(1) parsing table for following grammar. Check whether the grammar is LL(1) or not. A Aa B A x B B Cb B Cy C Cc C ε1
[7 marks]Define Intermediate code and its importance.
[3 marks]Construct LR(0) item sets for following grammar. S AaAb S BbBa A ε B ε
[4 marks]Explain various error recovery schemes in detail.
[7 marks]Differentiate LR(1) and LALR(1) parsers.
[3 marks]Construct syntax tree and DAG for following expression. a = (b+c+d) * (b+c-d) + a
[4 marks]Explain quadruples, triples and indirect triples with examples.
[7 marks]Define basic block with a simple example.
[3 marks]Explain activation record.
[4 marks]Explain various methods of peephole optimization.
[7 marks]Explain static storage allocation.
[3 marks]Explain any two parameter passing methods.
[4 marks]Explain various issues in design of code generator.
[7 marks]