Question: NEED TO CODE A C++ a recursive descent parser that uses your attribute grammar to check the correctness of sentences of the grammar according to

NEED TO CODE A C++ a recursive descent parser that uses your attribute grammar to check the correctness of sentences of the grammar according to the rules below .

List of attributes with brief descriptions of their meanings:

.person : stores whether the subject is in first person or third person. (e.g. I or the cat)

. person : stores whether the object is in first persona or third person. (e.g. me or the cat)

.type: stores whether the noun is an object or animal (e.g. cat or mat)

.conjugation : stores the correct conjugation of the verb (e.g. first person for like or third person for likes)

BNF productions and corresponding semantic rules and predicates:

-> .

Predicate: .person == .conjugation

-> I

.person = first

-> A

.person = third

-> The

.person = third

-> me

.person = first

-> a

.person = third

-> the

.person = third

-> cat

.type = animal

-> rat

.type = animal

-> mat

.type = object

-> like

.conjugation = first

-> likes

.conjugation = third

-> am

.conjugation = first

-> is

.conjugation = third

-> see

.conjugation = first

-> sees

.conjugation = third

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!