Computing - Syntax Diagrams
AQA Computer Science 2022
See also:
Syntax diagrams and their components
What does this represent in a syntax diagram?
What does this represent in a syntax diagram?A non-terminal symbol that can be used more than once.
Can you picture what an integer would look like in a syntax diagram, made from a “non-zero-digit” and a “digit” category?

What does the fork on the left hand side of this syntax diagram mean?
What does the fork on the left hand side of this syntax diagram mean?A digit can either be a non-zero digit or a zero.
How would you write this in BNF using a “non-zero-digit” category?
How would you write this in BNF using a “non-zero-digit” category?<digit> ::= <non-zero-digit>|0
How would you write this in BNF using a “non-zero-digit” and a “digit” category?
How would you write this in BNF using a “non-zero-digit” and a “digit” category?<integer> ::= <non-zero-digit>|<integer><digit>
When drawing a syntax diagram, should you write recursive rules or iterative ones?
Iterative rules.
Question
Are you allowed to use recursive definitions in syntax diagrams??
What does this represent in a syntax diagram?