Thanks to visit codestin.com
Credit goes to www.scribd.com

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

CD Assignment-2 (2024-25) - 1

This document is an assignment for the Compiler Design course at the Synergy Institute of Engineering and Technology. It includes various questions related to parsing techniques, grammar analysis, and construction of parsing tables, divided into three sections with specified marks. Students are required to complete the assignment within one week from the notification date.
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)
16 views1 page

CD Assignment-2 (2024-25) - 1

This document is an assignment for the Compiler Design course at the Synergy Institute of Engineering and Technology. It includes various questions related to parsing techniques, grammar analysis, and construction of parsing tables, divided into three sections with specified marks. Students are required to complete the assignment within one week from the notification date.
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

SYNERGY INSTITUTE OF ENGINEERING AND TECHNOLOGY, DHENKANAL

Near NH-55, Banamali Prasad – 759001

Assignment-II [CO2]

Full Marks-40 Duration-Within 1 Week


from Notification
Name- Registration No-
Subject with Code: Compiler Design (RCS6C002) Course & Branch: B. Tech: CSE
Year & Semester: 3rd & VI

Section-A
Answer All Questions

1. What is Reduce-Reduce conflict in CLR Parser. [2 Marks][L2]


2. Calculate FIRST and FOLLOW for all non-terminals. [2 Marks][L3]
S→AB
A→a|↋
B→b
3. Differentiate between Top-Down and Bottom-Up Parsing. [2 Marks}[L2]
4. Test the following Grammar LL(1) or not? [2 Marks][L3]
S→AaAb | BbBa
A→↋
B→↋
Section-B
Answer All Questions

1. Construct the CLR Parser for the following Grammar. [6 Marks[]L3]


S→(L) | a
L→L,S | S
2. Show that the following Grammar is LR(1) but not LALR(1). [6 Marks][L3]
S→Aa | bAc | Bc | bBa
A→d
B→d
Section-C
Answer All Questions

1. Find LR(0) Automaton for the following Grammar, Construct SLR parsing table
and show the moves for “ id*id+id”. [10 Marks][L3]
E→E+T | T
T→T*F | F
F→ (E) | id
2. Construct Predictive Top-Down Parsing table for the following Grammar and show
the moves for input “id+id*id”. [10 Marks][L3]
E→TE’
E’→+TE’ | ↋
T→FT’
T’→*FT’ | ↋
F→(E) | id

You might also like