Our site uses cookies. Some of the cookies we use are essential for parts of the site to operate and have already been set. You may delete and block all cookies from this site, but parts of the site will not work. To find out more about cookies on this website, see our Cookie Policy
Accept
© eRevision.uk and ZigZag Education 2025
This test is run by .
Note that your final mark will not be saved in the system.

7 - Context-free Languages GapFill

Target Level
C
Running Total
0
0%
Attempt
1 of 3

You must fill all the gaps before clicking ‘Check Answers!’

The following is a BNF definition for a decimal number, which...

  • begins with either a minus sign or no sign...
  • which is then followed by one or more digits...
  • which is then followed by a decimal point...
  • which is then followed by one or more digits.

<decimal> ::= <sign> <digits> <point>  <digit><digits><decimal><number>
 <digits><sign><point><digit> ::= - |  <digit>+<digits>null
<digits> ::=   <decimal><digits><digit><point> | <digit>   <digit><dot><decimal><digits>
 <decimal><point><dot><fraction> ::= .
 <digits><digit><decimal><point> ::= 0|1|2|3|4|5|6|7|8|9|0

This is your 1st attempt! You get 3 marks for each one you get right. Good luck!

Pass Mark
72%