Question: ( a ) Consider the grammar L below: S - > NP V P | V P NP NP - > Pronoun | Proper Noun

(a) Consider the grammar L below:
S -> NP V P | V P NP
NP -> Pronoun | Proper Noun | Determiner Nominal | NP PP
V P -> Verb | V P NP | V P PP
PP -> Preposition NP
ADV P -> Adverb
Nominal -> Noun Nominal | Noun
Noun -> flight | breeze | trip | morning | afternoon
V erb -> is | prefer | takes | need | want | fly .
Adjective -> cheapest | long | first | latest | other
Adverb -> very
Pronoun -> me | I | you | it
Proper Noun -> London | New York | Cape Town
Determiner -> the | a | an | this | these | that
Preposition -> from | to | on | near
Conjunction -> and | or | but
Is L a context-free grammar? Justify your answer. (6)
(b) Using L from (a) above, give the complete parse tree for the sentence
Do you desire the morning flight from New York to Lon do n?
You should enhance the grammar by adding one or more production rules in an appropriate
way, if you deem it necessary, in order to produce a linguistically valid parse
tree.
You do not need to include the question mark (?) as part of the parse tree.(a) Consider the grammar L below:
Is L a context-free grammar? Justify your answer. (6)
(b) Using L from (a) above, give the complete parse tree for the sentence
Do you desire the morning flight from New York to London?
You should enhance the grammar by adding one or more production rules in an ap-
propriate way, if you deem it necessary, in order to produce a linguistically valid parse
tree.
You do not need to include the question mark (?) as part of the parse tree. (12)
 (a) Consider the grammar L below: S -> NP V P

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!