We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

Assignment No.  2
Semester: Spring 2018

CS606 – Compiler Construction


Total Marks: 20


Due Date:

May 28, 2018


Please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:


o        Assignment is submitted after due date.

o        Submitted assignment does not open or file is corrupt.

o        Assignment is copied (From internet/ to from students).


Software (s) Used to develop Assignment

-          MS Word

-          MS Paint


Assignment Submission Instructions

Microsoft Word file is required to submit on LMS.




Task 1: [Marks = 4]


Draw NFA of Regular Expression of table of 5 (Assignment 1 – Task1). Correct RE is provided below;


X = {1+2+3+4+5+6+7+8+9}

Y = {1+2+3+4+5+6+7+8+9+0}


RE =   (0+5) + (XY*(0+5))



Task 2: [Marks = 4 * 2 = 8 * 2 = 16]


Prove that which of the following grammars are ambiguous or not; (No marks are awarded if parse tress are not attached in solution and 2 parse trees are required to justify your answer for each grammar)


i –


S → AB | C

A → aAb | ab

B → cBd | cd

C → aCd | aDd

D → bDc | bc

If String “aabbccdd” is produced from the above grammar using parse tree, would it be ambiguous or not?


ii –



X → S | Z

Y → + | - | * | /

Z → 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9


If we are trying to produce String “9+2+4*8/5*4-3”, would this grammar seems to be ambiguous?



Your assignment must be uploaded on VULMS on May 28, 2018.


+ Click Here To Join also Our facebook study Group.

..How to Join Subject Study Groups & Get Helping Material?..

See Your Saved Posts Timeline

Views: 1181


+ http://bit.ly/vucodes (Vu Study Groups By Subject Codes Wise)


Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

Discussed & be touched with this discussion. After discussion a perfect solution will come in a result at the end.



For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.

For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.

Or visit this link 

Click Here For Detail.


.•°How to Download past papers from study groups°•.


Please Click on the below link to see…

.... How to Find Your Subject Study Group & Join .... 


P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”

If someone have idea please share it. Thanks

If any one have done this 606 assignment 2, then plz share..today is last date to submit its of 20 marks

dekhty hain is bar is assignment ka sehra kis k sar jata hai

Solution idea can made using video lecture 7 and 8

Solutin of Task 1

Solution of Task 2 part 1

Solution of Task 2 part ii

It is not parse tree for Task 2 Part 2

One More thing Task 2 completely is ambiguous. Thanks ... Do pray

is this a right Answer Fawad?


© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service