Exam-style question
Try this first
A syntax diagram has a path from Start to End that passes through "A" and then an optional section containing "B". Which set contains all the strings accepted by this diagram?.
- A.A and AB
- B.B and BA
- C.A only
- D.AB only
Model answer
What a good answer should say
- A and AB
Explanation
Why this works
The diagram requires "A" and allows the section containing "B" to be skipped or followed. The accepted strings are therefore "A" and "AB".
Common mistake
No common mistake is linked to this question yet.
