Assignment No
Assignment No
College of Shariah and Islamic Studies in Ahsa’a جامعـة اإلمام محمد بن سعود اإلسالم ية
Department of Computer Science and Information الشريعة والدراسات اإلسالم ية: كليـــة
Concepts of PL Assignment علوم الحاسب والمعلومات: قســـم
Assignment No.2
Student Name: Elaf Yousef Alyousef Student Number: 441024035 4
Assignment no.2 Instructions:
2. Given the following grammar and the right sentential form, draw a parse tree and show the
phrases and simple phrases, as well as the handle.
S → AbB | bAc
A → Ab | aBB
B → Ac | cBb | c
a. aAcccbbc
b. AbcaBccb
c. baBcBbbc
Solution for part a(
Phrases: aAcccbbc, aAcccb, Ac, ccb, c, c
Simple phrases: c
Handle: c