Sunday , 24 November 2024

CS606 Assignment 2 Spring 2012

Assignment No. 02
Semester Spring 2012
Compiler Construction CS606

 Total Marks: 20

 

 

 Objective:

To learn and understand basic concepts of parsing.


 

Instructions:

 

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 ID is not mentioned in the assignment File or name of file is other than student ID.
  • It is in some format other than .doc (MS Word Document).

 

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

 

 

BEST OF LUCK

 

Question No 1:                                                                                                                          Marks 10

 

Consider the following grammar;

 

S ―> XaYb

X ―> bXc | b

Y ―> dYa | d

 

Find the first sets for each non-terminal of the given grammar.


 

 

 

Question No 2:                                                                                                                         Marks 10              

 

Consider the following grammar and construct the corresponding parse tree for string “aabbabab”.

 

S ―> aSSb | bSSa | ε

 

 

 

 

 

 

 

 

 

 

 

 

Check Also

CS606 Assignment no 01 Spring 2013 Solution Required

Assignment No. 01 Semester Spring 2013 Compiler Construction CS606   Total Marks: 20   Due …

Leave a Reply

Your email address will not be published. Required fields are marked *

*