Syntax diagrams
Graphical representations of grammar rules showing valid language syntax through flowchart-like diagrams. Syntax diagrams provide visual alternative to BNF notation, often more intuitive for humans. Rectangles represent non-terminals, circles represent terminals. Paths through diagrams show valid symbol sequences.
Real World
Oracle's official Java documentation uses syntax diagrams to show developers the valid structure of a for-loop, making it easier to read than the equivalent BNF rules.
Exam Focus
Trace through the diagram with a specific string to verify validity — examiners award marks for showing the path taken.
How well did you know this?