Posted by : Anonymous Thursday, 24 January 2013

Q 1: Marks [5+8]
S XYZ
X aX | bX | ^
Y aY | bY | ^
Z aZ | ^


a. Remove all NULL productions from the given grammar.

b. Remove all UNIT productions from the grammar obtained in part (a).


Q 2:
S mno | mA | nB | oC
A mX | ^
B nY | ^
C oZ | ^
X mn | m
Y no | n
Z om | o

Draw the total language tree for above CFG. Marks [7]

Best of luck!

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © virtual university of pakistan - Skyblue - Powered by Blogger - Designed by Johanes Djogan -