www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# cs606 compiler construction assignment # 2

discuss here.

Assignment No. 02
Semester Fall 2012
Compiler Construction CS606
Total Marks: 20
Due Date: 04-12-2012

Question No 1: Marks 10
Considering the following grammar, find the first sets for each non-terminal of the grammar.
S →aS | Ab
A →XYZ | ε
X →cX | ε
Y →dS | ε
Z →eS | ε

Question No 2: Marks 10
Prove that the following grammar is ambiguous because the sentence if ( id == id) then if ( id == id)
then id := id ; else id := id ;can be derived using two different parse trees.
S →id := id ;
S →if (E) then S
S →if (E) then S else S
E →id == id ;

Views: 1642

### Replies to This Discussion

Our main purpose here discussion not just Solution

can any one confirm that the answer for question # 2  will be from LECTURE 12//?

GIVEN THERE TWO PARSE TREES?

yup, that is the same example. :)

can we write all terminal in one line and their FIRST in one go..?

plz share the solution of this assignment or the idea of this assignment.

is there any helping material ?? or idea ??

help for first question..

Attachments:

plz koi to assigm,enk ka soltion day aj extended date ha

plz any one have idea how to solve or give some idea or reference...

to solve it/....

Tariq Malik plz upload the Solution today is extended day

1

2

3

4

## Latest Activity

Muhammad Bilal liked иαвєєℓ αнмє∂'s discussion Kya hal hain ning awam?
2 hours ago
Technical Guru liked Sana Sunny ツ's discussion we need Chat box at ning
8 hours ago
Technical Guru updated their profile
11 hours ago
Technical Guru is now a member of Virtual University of Pakistan
12 hours ago
yesterday
monaliza and waseem are now friends
yesterday
Zubii joined + M.Tariq Malik's group

### MTH401 Differential Equations

Friday
Zubii joined + M.Tariq Malik's group

Friday