SDL grammar rules are presented at the start of many of the following sections. They are also collected in Appendix A. The notation is an extended form of BNF, with ``regular expressions'' allowed on the right-hand side.
Terminal symbols (tokens) are represented by upper-case words or strings enclosed in single quotes. Non-terminal symbols (syntax classes) are denoted by lower-case words. Grammar operators are as follows.
|
spec2
The postfix operators `+' and `*'
have higher precedence than concatenation, which has higher precedence
than `|
'.
Colon (`:') has the lowest precedence of all.
Parentheses are used to override these precedences as appropriate.
Indentation is used to indicate continuation of a grammar rule over multiple
lines.
A standard BNF grammar (acceptable to YACC or Bison) is given in Appendix B.