The | indicates a mutually exclusive choice between symbols in a nonterminal symbol definition. For example:
The separates the nonterminal symbol on the left from its definition on the right and can be read as “is defined as...”. For example:
Square brackets (
[]
) indicate that the symbols within the brackets are optional. For example:Curly braces (
{}
) indicate that the symbols within the braces are optional and can be repeated. For example: