Several syntax diagrams are shown. [Figure X.X - several syntax diagrams]
- (a)Complete the Backus-Naur Form (BNF) for the given syntax diagrams. <operator> ::= <label> ::= <equation> ::=[4]
- (b)(i)A new syntax rule, password, is required. It must begin with a letter or a symbol, followed by a digit and end with one or two symbols. Draw a syntax diagram for password.[3]
- (b)(ii)Write the BNF for password.[2]
This question uses a diagram from the original paper, which isn't shown here. Open the full paper from the past papers archive to see it.
Mark scheme
Marking points from the official mark scheme (Oct/Nov 2024). The mark or mark type is shown in brackets.
- 10(a) One mark per mark point (Max 4)
- 10(a) • <operator> ::= + | - | * | /
- 10(a) • <label> ::= <letter><digit>|<letter><digit><digit>
- 10(a) • <equation> ::= <label> = <label><operator><label>
- 10(b)(i) One mark per mark point (Max 3)
- 10(b)(i) MP1 begin with either a letter or a symbol
- 10(b)(i) MP2 end with either one or two symbols
- 10(b)(i) MP3 digit and all other connections and label correct.
- 10(b)(i) [Figure X.X - password syntax diagram describing: Start -> (letter OR symbol) -> (digit) -> (symbol OR (symbol -> symbol)) -> End]
- 10(b)(ii) One mark per mark point (Max 2)
- 10(b)(ii) • <password> ::= <letter><digit><symbol>| <letter><digit><symbol><symbol>|<symbol><digit><symbol>| <symbol><digit><symbol><symbol>
- 10(b)(ii) Alternative Answer One mark per mark point (Max 2) • All three lines correct • Any two lines correct <first> ::= <letter>|<symbol> <last> ::= <symbol>|<symbol><symbol> <password> ::= <first><digit><last>
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →