CD Question Bank

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

PRIME INSTITUTE OF ENGINEERING AND TECHNOLOGY

QUESTION BANK

Subject Name: Compiler Design


Subject Code: 3170701

Sr.
QUESTIONS
No

1 Explain input, output and action performed by each phases of compiler with example.
(Winter-2022) -7 Marks
What is Input Buffering? Why it is used? (Summer-2022 ) -4 Marks
2
Write a brief note on input buffering techniques. (Winter-2019) 4 marks

3 Explain the language dependent and machine independent phases of compiler. Also List major
functions done by compiler. (Summer-2022) -7 Marks
4 List out phases of a compiler. Write a brief note on Lexical Analyzer
What is lexical analysis? Which are the tasks performed by lexical analyzer.( Winter 2022) – 3Marks
5 Explain activation record in detail. (Summer-2022) 7Marks

6 What are conflicts in LR Parser? What are their types? Explain with an example.
(summer- 2022) - 7 marks

7 Draw the DFA for the regular expression (a|b)*abb using set construction method only.
(Winter-2021) 7 Marks
8 1. ) Compare: Static v/s Dynamic Memory Allocation. (Winter 2021,winter 2020) 4 Marks

9 Translate the following expression into quadruple, triple, and indirect triple: -(a+b)*(c+d)-(a+b+c)
(Summer-2022) 7 marks
10 Consider the following grammar:
S’ = S#
S -> ABC
A -> a|bbD
B -> a| Ꜫ
C -> b| Ꜫ
D -> c| Ꜫ
Construct FIRST and FOLLOW for the grammar also design LL(1)
parsing table for the grammar
(Summer 2022) - 7 Marks
11 For the following production write the semantic action:
1. S -> E$
2. E -> E1 + E2
3. E -> E1 * E2
4. E - > digit
Summer-2022 -4Marks
12 Construct SLR parsing table for the following grammar :
S → (L) | a
L→ L,S | S
(Winter-2022) -7marks.
13 Compare: Static v/s Dynamic Memory Allocation. (Winter-2022,winter 2019) -3 marks

14 Translate following arithmetic expression


- ( a * b ) + ( c + d ) - ( a + b + c + d ) into
1] Quadruples
2] Triple
3] Indirect Triple (Winter 2021 , winter 2019) -7 marks
15 Explain Pass structure of assembler. (winter-2021) -7Marks

16 Differentiate Top Down Parsing and Bottom up parsing (winter-2021) -3 Marks

17 Construct CLR parsing table for following grammar.


S -> aSA | €
A -> bS | c
(Winter-2021) -7marks
18 Give syntax directed definition for simple desk calculator. Also show annotated parse tree for 6*5+7n,
(Winter 2022) -7 Marks

19 Write a brief note on input buffering techniques. (Winter 2022) -4 Marks

20 Explain any two error-recovery strategies. (Winter-2021,winter-2020,winter 2019) -4 marks

21 Discuss symbol table management in detail (Winter 2019, winter 2020)

22 Write RE the following language..


1. All string of 0’s and 1’s that do not contain 11.
2. All string of 0’s and 1’s that every 1 is followed by 00 (Winter-2022) 3marks
23 Explain the roles of linker, loader and preprocessor. (Summer-2022) 3Marks

24 Explain synthesized attributes with the help of an example. (winter-2021) -7 Marks

25 What is DAG? What are its advantages in context of optimization? How does it help in eliminating
common sub expression? (Summer-2022) -7 Marks
26 Explain the following with example
1) Lexical phase error
2) Syntactic phase error (Summer -2022) -4marks

27 Explain the following parameter passing methods.


1. Call-by-value
2. Call-by-reference
3. Copy-Restore
4. Call-by-Name
Winter-2021 -4 Marks
28 Discuss any three methods for code optimization. (Summer-2022) -7marks
29 Explain three loop optimization techniques with example. (Winter-2022) -7marks
30 Explain peephole optimization (summer-2022, winter-2021) -7Marks

31 Describe code generator design issues. (Winter 2021,Summer-2022,winter-2022) -3Marks,7Marks

32 What is DAG? What are its advantages in context of optimization? How


does it help in eliminating common sub expression? (summer-2022) -7marks

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy