One of the questions most frequently asked of me as a consultant in matters visual is, "How should we format syntax statements in our manuals?" A syntax diagram shows the parameters and values that can be specified for a statement or command in a programming language.
One of the best approaches is to avoid syntax diagrams entirely--especially in publications for users who are not trained in computer science or who write programs only as part of another task.
Annotated examples are definitely the most expensive of the syntax diagrams discussed.
"System/38 syntax diagrams: A better idea." In Proceedings of the 31st International Technical Communication Conference, pp.