National Open University Exam Past Question – CIT 445 October, 2013 Examination

NATIONAL OPEN UNIVERSITY OF NIGERIA CIT 445 Principles & Techniques of Compilers

14/16, Ahmadu Bello Way, Victoria Island




Course Code:    CIT 445

Course Title:     Principles & Techniques of Compilers

Credit Unit:       3

Time:                 2½ hours

Instruction:       Answer any five (5) questions. Each question carries 14 marks



  1. (a) Define the term parsing (3 marks) (b) State and discuss four examples of analytic grammar formalisms                              (8 marks) (c) Given the grammar G with the following production rules, S → a | aS | bS, determine whether the string babbaa can be generated by the grammar                                                   (3 marks)


  1. (a) What is the difference between a translator and a compiler (6 marks) (b) State and describe four components of the structure of a compiler                             (8 marks)


  1. (a) With the aid of a diagram describe the functions of a T.diagram (8 marks) (b) State the Roles of a Parser                                                                                            (6 marks)


  1. (a) State four difficulties with Top-down parsing (6 marks) (b) State five benefits of LR Parsing                                                                                  (7 marks)


  1. With the aid of illustrative diagram describe the phases of a compiler (14 marks)



  1. (a) State and describe the three main techniques for loop optimisation (6 marks) (b) State any six qualities of a compiler                                                                             (8 marks)
  2. Consider the grammar G below: G: E ® E + T / T
YOU MAY ALSO LIKE  National Open University Exam Past Question - EDU 758 MAY/JUNE 2013 EXAMINATION

T ® T * F / F F ® (E) / i


(a) Generate the non-left recursive version of the grammar                                             (5 marks) (b) Find FOLLOW of all the nonterminal symbols in the non-left recursive version of the grammar

(9 marks)

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button