BNF Syntax, Structure and Conventions : Symbol Types : BNF Notations

BNF Notations

The | indicates a mutually exclusive choice between symbols in a non-terminal symbol definition.

Example:

variable_name | numeric_constant
| integer | function_name

The => separates the non-terminal symbols on the left from its definition on the right. Can be read as is “defined as ...”

Example:

relational_operator => = | / = | < | <= | >=

Square brackets [ ] indicate that the symbols within the brackets are optional. This is a BNF convention. Recall that square brackets themselves may appear in the SCP as part of the Rational Statemate expression.

Example:

timeout (event[condition],3)

Curled brackets { } indicate that the symbols which they enclose are optional and can be repeated.

Example:

depend_on (state_name{, state_name})