Question: Given the following WFF for integers, which yields single-digit and multi-digit numbers which may be marked as positive (+) or negative (): T start::= signum

Given the following WFF for integers, which yields single-digit and multi-digit numbers which may be marked as positive (+) or negative (): T

start::= signum string0fDigits

signum::= "+" I "-"

String0fDigits ::= digit [stringOfDigits)

digit :: = "0" I "1" I "3" I "4" I

"5" I "6"I "7" I "8"I "9"

Task 3a Make minimal modifications to this wff so that the new wff still yields all usual single- digit and multi-digit numbers, but no wff has a signum in front of a single 0 or in front of combinations of 0s (i.e., no +0, +00, etc., -0, -00, etc.). It may still yield, however, something like +03 or -000000400. T

Task 3b Modify the original wff (Task 3) such that no number has a signum.

Task 3c Modify the wff obtained in Task 3b such that a comma separates every third digit from the right (e.g., 1,000 or 12,345,678 or 98,765 but has no comma for numbers smaller than 1,000).

Task 3d Modify the wff obtained in Task 3b such that it still yields all usual single-digit and multi-digit numbers, but no wff has only multiples of 0s (i.e., no 00, 000, 0000, etc.).

Task 3e Based on the wff obtained in Task 3d define a wff for rational numbers of the form rationalNumber ::= numerator / denominator where numerator is an integer and denominator is a n

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!