www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

# 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 ;

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Views: 1602

### 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

## Latest Activity

24 minutes ago
+ ! ! ! ❣ Sanam ❣ !+ and az1987 are now friends
48 minutes ago
Arslan#^%Warrior updated their profile
53 minutes ago
59 minutes ago
1 hour ago
+ ! ! Pagal Dewani ! ! + posted discussions
1 hour ago
≋M≋S≋ posted discussions
1 hour ago
≋M≋S≋ replied to ≋M≋S≋'s discussion JAB PYAAR NAHIN HAI
1 hour ago
≋M≋S≋ replied to ≋M≋S≋'s discussion JAB PYAAR NAHIN HAI
1 hour ago
StRaNGeR posted discussions
2 hours ago
StRaNGeR updated their profile
2 hours ago
StRaNGeR liked + !! Ήලᵯᵯℹ Ⲥⱨ !! +'s discussion faraz and parveen shakir@@@@
2 hours ago

1

2

3

4

5