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


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Assignment No. 01 –Solution & Discussion Fall 2014 Compiler Construction CS606 Due Date: 24/11/2014




To learn and understand basic concepts of Context free grammar, parse tree, regular expression, deterministic and nondeterministic finite automata in building a Lexical analyzer.



It should be clear that your assignment will not get any credit (zero marks will be awarded) if:


  • The assignment is submitted after due date.
  • The submitted assignment does not open or file corrupt.
  • The assignment is copied (from other student or copy from handouts or internet).
  • Student name and ID are not mentioned in the assignment file.
  • It is in some format other than .doc or .docx(MS Word Document).

For any query about the assignment, contact at cs606@vu.edu.pk

Question No 1:                                                                                                                       Marks 10

Let CFG be G = (N,T, S, P) where;

  • N = {<goal>, <expression>, <term>, <factor>}
  • T = {A, B, C, *, +}
  • S = <goal>
  • P=<1,2,3,4,5,6,7,8,9,10>
  1. Derive the expression “A *B+C”.   [5 Marks]
  2. Construct a parse tree for expression “A *B+C”. [5 Marks]

Question No 2:                                                                                                                        Marks 10             

Construct Nondeterministic finite automata (NFA) for regular expression (ab|ba)* by using Thompson’s Construction Algorithm.

+ How to Follow the New Added Discussions at Your Mail Address?

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

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

See Your Saved Posts Timeline

Views: 950


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

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

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Replies to This Discussion

kindly start discussion  about this assignment 

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.


  • N = {<goal>, <expression>, <term>, <factor>}
  • P=<1,2,3,4,5,6,7,8,9,10>

students in exemple of book there is <op> instead of <factor> how it will effect the answer and we have 10 productions here. i m unable to generate 10, i could do only 9. please help

I made 8 productionz in arithmatic expr. n 9 in tabuler form bcz production 2 has been repeated. 

  1. Derive the expression “A *B+C”.









2: <expression>?<expression><factor><term>

< expression><factor><term>

5: <term>?C

< expression><factor>C

7 :< factor>? +

< expression> + C

2: < expression>?< expression><factor><term> 

< expression><factor><term> + C

4: <term>? B

< expression><factor> B+C

6: <factor>? *

< expression> *B+C

3: < expression>? <term>

<term> *B+C

5: <term>? A


Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....

can we write 

expression=> expression*expression/expression+expression/term

as this is the simple way

need quick answer

koi to is ka idea bta de kesy krna hai


2nd question ka answer bta do yar koi b plz jaldi extended b finish pe hai

NFA for a|b will be: 



Latest Activity

Maham Raza. left a comment for Maria
1 minute ago
Maham Raza. and Maria are now friends
4 minutes ago
Maham Raza. posted a discussion
7 minutes ago
Mani Siddiqui BS VIII replied to Mani Siddiqui BS VIII's discussion تاریخی_جملہ
10 minutes ago
Mani Siddiqui BS VIII posted a status
"0سنو لوگو ! بڑی محبوب ہیں مجھ کو میری یہ نیم تر آنکھیں مگر اب بیچتا ہوں کہ ! مجھے ایک خواب کا تاوان بھرنا ہے"
13 minutes ago
Maham Raza. commented on Maria's status
19 minutes ago
Maria posted a status
"Assalam o Alaikum!me New here and BSCS Student or AP logo ka Study Program kia?"
39 minutes ago
+ Faisal + replied to +M.Tariq Malik's discussion CS202 Assignment No 01 Spring 2020 Solution & Discussion in the group CS202 Fundamentals of Front End Development
49 minutes ago
+ Faisal + joined +M.Tariq Malik's group
49 minutes ago
Maham Raza. replied to Maham Raza.'s discussion Zindagi..
52 minutes ago
Alisha Noor replied to Maham Raza.'s discussion Zindagi..
54 minutes ago
Nouman Butt replied to Nouman Butt's discussion My Birthday
1 hour ago

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

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