Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions