0% found this document useful (0 votes)
13 views1 page

DLP Assignment 2

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 PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

DLP Assignment 2

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 PDF, TXT or read online on Scribd
You are on page 1/ 1

CS450 : Design of Language Processor A.Y.

: 2024-25

Charotar University of Science and Technology [CHARUSAT]


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

Sr. Aim CO
No.
1. Differentiate between top down parser and bottom up parser. 3
2. Explain handle and handle pruning 4
3. Consider the following grammar 3
S -> AA
A -> aA
A -> b
And construct the LALR parsing table.
4. Differentiate between S attributes and L attributes 4
5. Differentiate between parse tree and syntax tree 3
6. What is DAG? What are its advantages in context of optimization? How 5
does it help in eliminating common sub expression?
7. What is peephole optimization? Explain with example 5
8. What is global optimization? Name the 2 types of analysis performed for 4
global optimization
9. Discuss the functions of error handler. 4
10. Show the following grammar is LR(1) but not LALR(1). 3
S->Aa │bAc │Bc│bBa
A->d
B->d
11. Construct SLR parsing table for the following grammar : 3
S → (L) | a
L→ L,S | S
12. Construct syntax tree and DAG for following expression: 4
X = a * (b+c)- (b+c)* d
13. Explain various parameter passing methods. 5
14. Explain various issues in design of code generator. 5
15. Explain Basic Block and Flow Graph with example. 5

Prepared By: Hemang Thakar Date: 08/10/2024

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

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