CIT445 : PRINCIPLES & TECHNIQUES OF COMPILERS (2014)

NATIONAL OPEN UNIVERSITY OF NIGERIA

14/16 AHMADU BELLO WAY, VICTORIA ISLAND, LAGOS

SCHOOL OF SCIENCE AND TECHNOLOGY

MARCH/APRIL 2014 EXAMINATION

COURSE CODE: CIT 445

COURSE TITLE: PRINCIPLES & TECHNIQUES OF COMPILERS

TIME ALLOWED: 2½ HOURS

INSTRUCTION:ANSWER ANY FIVE (5) QUESTIONS. EACH QUESTION CARRIES EQUAL MARKS

1. (a) What do you understand by the term Viable Prefix? (3 marks)

(b) Given the grammar G with following production rules, S → a | aS | bS, determine

whether the string aababbba can be generated by the grammar (5marks)

(c) Enumerate any three of the errors which can be detected during lexical analysis

(6 marks)

2. (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)

3. (a) What do you understand by top-down parsing technique (2 marks)

(b) State the difficulties in top-down parsing (6 marks)

(c) Using examples state and illustrate how to minimize (6 marks)

4. (a) State and describe the three main techniques for loop optimisation (6 marks)

(b) State eight qualities of a compiler (8 marks)

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

6. (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)

7. Consider the grammar G below:

G: E ® E + T / T

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)

For the 2015 – till date past questions for this course CLICK HERE

Contact me for your TMA, GST302 Business plan writeup, Project Writeup and also get your Exam Summary for this course.

Leave a Reply

MEET OVER 2000 NOUN STUDENTS HERE. 

Join us for latest NOUN UPDATES and Free TMA answers posted by students on our Telegram. 

OUR ONLINE TUTORIAL CLASS IS NOW ON!!! JOIN US NOW. 
JOIN NOW!
close-link
%d bloggers like this: