0% found this document useful (0 votes)
21 views3 pages

DLP Assignment

Uploaded by

21cs060
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views3 pages

DLP Assignment

Uploaded by

21cs060
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

CS450 : Compiler Design A.Y.

: 2024-25

Charotar University of Science and Technology [CHARUSAT]


Chandubhai S. Patel Institute of Technology [CSPIT]
Department of Computer Science & Engineering
Assignment-1 & 2
Last date for submission: 17/8/2024
Subject code : CS450 Semester : 7 Academic Year : 2023-24
Subject name : Compiler Design

Sr. Aim CO
No.
1. What is a compiler? What is the front-end and back-end of the compiler? 1
2. Write a brief note on input buffering techniques. 1
3. Explain the input, output, and action performed by each phases of compiler 3
with example.
4. Explain error recovery strategies. 2
5. What is lexical analysis? Which are the tasks performed by lexical 1
analyzer.
6. Give the rule to remove left recursive grammar. And Eliminate left 4
recursion from following grammar.
S → Aa | b
A → Ac | Sd | f
7. What is left factoring in CFG? Perform the Left factoring of following 4
Grammar.
S → iEtS / iEtSaS / a
E→b
8. Define token, lexeme, and pattern. Identify the lexemes that makes up the 1
tokens for the following code
const p = 10;
if( a < p)
{ a++ ;

Department of Computer Science & Engineering, CSPIT, CHARUSAT Page |


CS450 : Compiler Design A.Y. : 2024-25

If(a== 5)
continue ;
}
9. Consider the following grammar: 4
S’ = S#
S -> ABC
A -> a|bbD
B -> a| Ꜫ
C -> b| Ꜫ
D -> c| Ꜫ
Construct FIRST and FOLLOW for the grammar
10. Explain handle and handle pruning 2
11. Explain the language-dependent and machine-independent phases of 1
a compiler. Also, a List of major functions is done by the compiler.
12. What do you mean by left recursion and how is it eliminated? 4
13. What is ambiguous grammar? Show that 4
S -> aS|Sa|a
is an ambiguous grammar. If ambiguous then remove the ambiguity
14. Design FIRST and FOLLOW set for the following grammar and solve it 4
using LL(1) grammar.
S→ 1AB | ε
A→1AC | 0C
B→0S
C→1
15. Explain the activation tree. 2
16. Explain Syntax Error Handling. 2
17. What is a language processor? 1
18. Explain role of the parser. 3
19. Explain non-recursive predictive parsing. 3
20. Construction of Non-recursive Predictive Parsing Table. 3

Department of Computer Science & Engineering, CSPIT, CHARUSAT Page |


CS450 : Compiler Design A.Y. : 2024-25

Prepared By Hemang Thakar Date: 6/8/2024

Department of Computer Science & Engineering, CSPIT, CHARUSAT Page |

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