00:09
We're asked to give production rules an extended bacchus in our form that generate all decimal numerals consisting of an optional sign, a non -negative integer, and a decimal fraction that is either the empty string or a decimal point followed by an optional positive integer, optionally preceded by some number of zeros.
00:37
So, first of all, it's assumed that leading zeros are not going to be allowed in the whole number part, because the problem explicitly mentions the leading zeros only for the decimal part.
00:53
Now we're going to allow the optional sign using a question mark.
01:00
The integer part is going to consist of one or more digits, not beginning with a zero, unless zero is the entire integer part, and then either, after that, we're going to have the decimal part or not.
01:19
The decimal part is going to have a decimal point followed by zero or more digits.
01:27
So first of all, we have that we're not going to use brackets for this extended focus form.
01:41
So i'll just write numeral colon, colon, equals sign for the plus or minus sign, and then a question mark.
02:04
So this is an optional sign, then followed by non -zero digits, followed by digit, followed by a star.
02:31
This means we have zero or more digits following the non -zero digits, followed by decimal.
02:48
Recall that we wanted the decimal part to be optional, so we have decimal, followed by a question mark.
03:01
And after the question mark, we have a line.
03:10
So this is the case for all numerals which are not zero.
03:14
So the numeral zero, we're going to have either a plus or minus sign.
03:18
So we have sign question mark followed by a zero, followed by decimal question mark...