CS471 Programming
Language Structure I
Spring 2002
ástopñ ::= b | d
áplosiveñ ::= ástopñ a
ásyllableñ ::= áplosiveñ | áplosiveñ ástopñ | a áplosiveñ | a ástopñ
áwordñ ::= ásyllableñ | ásyllableñ áwordñ ásyllableñ
ásentenceñ ::= áwordñ | ásentenceñ · áwordñ
Which of the following speakers is a monkey in disguise? i.e. which of the following utterances cannot be generated by the grammar? Draw parse trees in order to show your answer.
Gibbon: ba · ababadada · bad ·
dabbada
Spider: abdabaadab · ada
Rhesus: dad · ad ·
abaadad ·
badadbaad
This assignment is worth 50 points. Questions 1 and 2 are worth 15 points each, and Questions 3 and 4 are worth 10 points each.
This assignment must be submitted through WebCT, so it must be prepared electronically. Read the drop box information page before submitting it. Pay close attention to the availability “window” of the assignment. When the window closes, you will not be able to submit an answer.