written 8.6 years ago by |
System Programming And Compiler Construction - Dec 2014
Computer Engineering (Semester 6)
TOTAL MARKS: 80
TOTAL TIME: 3 HOURS
(1) Question 1 is compulsory.
(2) Attempt any three from the remaining questions.
(3) Assume data if required.
(4) Figures to the right indicate full marks.
Solve any four of the following:-
1 (a) Explain different functions of loader in brief.(5 marks)
1 (b) Explain positional parameter in macro.(5 marks)
1 (c) Explain heap allocation.(5 marks)
1 (d) Explain role of finite automata in compiler.(5 marks)
1 (e) What are system software and application software?(5 marks)
2 (a) Explain code optimization in compiler designing with suitable example.(10 marks)
2 (b) Explain two pass macro with flowchart and database.(10 marks)
3 (a) Explain the working of direct linking loader with a proper example. Show the entries in different database built by direct linking loader.(10 marks)
3 (b) Explain different error recovery techniques used by compiler.(10 marks)
4 (a) Explain one pass assembler with flowchart and respective database.(10 marks)
4 (b) Explain operator preceding parsing with example.(10 marks)
5 (a) Consider the following grammar with terminals (,[,) and ]
S?TS|[S]S|)S|?
T?(X)
X?TX|[X]X|?
i) Construct first and follow set for the non-terminals.
ii) Construct its LL(1) parsing table.
iii) Is this LL(1) grammar?(10 marks)
5 (b) Explain syntax directed translation.(5 marks)
5 (c) Explain three address code.(5 marks)
6 (a) Consider the following grammar:-
S?SbS | bSaS| ?
i) Frame the transition table and action/goto table of the given grammar.
ii) Demonstrate if the grammar is LR(O) or not.(10 marks)
6 (b) Explain handle, first set and follow set.(5 marks)
6 (c) Explain role of lexical analyser.(5 marks)
Solve any four of the following:-
7 (a) Explain DAG.(5 marks) 7 (b) Explain LEX and YACC.(5 marks) 7 (c) Explain the working and need of linkage editor.(5 marks) 7 (d) What is toward reference problem? How it is resolved in two pass assembler?(5 marks) 7 (e) Explain activation record.(5 marks)