Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

programing languages Question 3: (a) Complete the semantic rules below for Roman numerals, given that c-100, 1-50, x-10, v-5, i-1, and symbol values are added

programing languages

image text in transcribed

Question 3: (a) Complete the semantic rules below for Roman numerals, given that c-100, 1-50, x-10, v-5, i-1, and symbol values are added except: i before v or x indicates one less (e.g., iv is 4) and x before 1 or c indicates ten less (e.g., xc is 90). Use the rules to evaluate xcvii, showing all the steps. (3 marks) 1 KT-> C 2 KY> -> V 2 (b) The above grammar allows illegal forms such as xiiii or xxxxx. Add the 1 necessary attribute/s, semantic rule/s, and predicate/s to ensure that generated sentences contain groups of at most 3 i or 3 x. Draw a synthetized, decorated parse tree showing that 1viiii is not a valid Roman numeral. (4 marks) Question 3: (a) Complete the semantic rules below for Roman numerals, given that c-100, 1-50, x-10, v-5, i-1, and symbol values are added except: i before v or x indicates one less (e.g., iv is 4) and x before 1 or c indicates ten less (e.g., xc is 90). Use the rules to evaluate xcvii, showing all the steps. (3 marks) 1 KT-> C 2 KY> -> V 2 (b) The above grammar allows illegal forms such as xiiii or xxxxx. Add the 1 necessary attribute/s, semantic rule/s, and predicate/s to ensure that generated sentences contain groups of at most 3 i or 3 x. Draw a synthetized, decorated parse tree showing that 1viiii is not a valid Roman numeral. (4 marks)

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

Step: 3

blur-text-image

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 And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

Discuss the techniques of sales forecasting.

Answered: 1 week ago

Question

Write short notes on Marketing mix.

Answered: 1 week ago

Question

Analyse the process of new product of development.

Answered: 1 week ago

Question

=+ How would you advise those problems be resolved?

Answered: 1 week ago