Example: Reference: |
This manual employs a variant of what is known as Backus Naur Form (BNF) notation to describe SQL syntax. In BNF, a language construct is defined as follows:
something ::= its definition
A language construct may be used on the right hand side of such an expression (sometimes called a production) to define something else. When a known construct appears on the right side of a production it is represented by its name enclosed within angled brackets (<...>).
a_new_thing ::= <any_old_thing>
The right hand side of a production may be composed of any sequence of bracketed names and printable characters. Curly brackets ({...}) are used to delimit choices separated by vertical bars and square brackets ([...]) are used to indicate optional phrases. When a bracketed expression is followed by an asterisk ([...]*) it represents zero, one or more of the enclosed language constituents. Printable characters employed outside of brackets in productions are meant to be used verbatim.
The ::= operator is the BNF equivalent of is made up of in English.
The following productions could be read as computer books are made up of zero, one or more instances of information or examples and syntax.
computer_books ::= [<technical_information>]* and syntax.
technical_information ::= information | examples
Productions amount to formulas for creating a well-formed string in a given language. All of the following conform to the computer_books syntax:
information examples and syntax.
and syntax.
information information information and syntax
The chart below summarizes the BNF symbols and their meanings.
Symbol |
Meaning |
{ } |
Indicates a group of valid options. You must choose at least one of the enclosed options. |
[ ] |
Indicates a group of valid options. You can select one of the options or none. |
::= |
Indicates is made up of. |
< > |
Indicates the command or production qualifier or construct. |
, |
Indicates that you can select one or more or none of the options. |
| |
Indicates that you can select one of the options or none. |
[]* |
Zero or more occurrences of item in brackets. |
iWay Software |