Grammar notation
This language specification adopts a flavor of Backus-Naur Form (BNF) to describe the syntax of language features.
SPL uses the following conventions:
Notations | Meaning |
---|---|
Italics |
Non-terminal. |
ALL_CAPS_ITALICS |
Token. For example, ID for
identifiers. |
'fixed-width font' |
Verbatim text that is quoted to avoid confusion
with meta-characters. For example: '( ' |
(...) | Grouping - to disambiguate meta-syntax precedence. |
... | ... | Alternatives - to match syntax on either left or right of the bar. |
...? | The syntax that precedes this notation is optional. |
...* | The syntax that precedes this notation is repeated zero or more times. |
...+ | The syntax that precedes this notation is repeated one or more times. |
...*, | Comma-separated list of zero or more items. |
...+, | Comma-separated list of one or more items. |
...*; | Semicolon separated list of zero or more items. |
...+; | Semicolon separated list of one or more items. |
...+. | Period separated list of one or more items. |
nonTerminal ::= ... |
Rule definition. |