Transferred from: http://blog.itpub.net/22990797/viewspace-750157/
The Oracle documentation uses two methods of expressing syntax, syntax diagrams, and BNF.
BNF, Backus-naur Form, Chinese is the Backus paradigm: It is a set of symbols introduced by John Bacos (John Backus) and Peter Nore (Peter Naur) to describe computer language syntax.
First look at the syntax diagram. Read the syntax diagram, go from left to right, and read along the arrows.
Meaning of different shapes:
- Uppercase words in a rectangle, commands.
- lowercase words in an ellipse, parameters.
- Circle, punctuation, operator, delimiter, Terminator.
If the graph has several paths, you can choose one, each of which is the correct syntax.
- Main path: The arrow points to a straight line.
- Required keywords: can be only one graphic, indicating that this one is required, or it can be a vertical arrangement of a few graphics, indicating that is required.
- Optional keywords: Outside the main path is optional.
- Syntax loop (Sytax loop): Used for a syntax loop.
- Identifier rule: The identifier cannot exceed 30 characters and must begin with a letter. Identifiers are case-insensitive, except in double quotation marks.
Each syntax diagram has a link to the synonymous BNF expression.
The symbolic meaning used by BNF expressions:
- [], Options available
- {}, one of the required options
- |, separating different options
- ..., repeatable syntax
- Delimiter, different before four other separators to be entered as-is
- Bold, bold is the keyword, must be entered as is, non-uppercase characters, is a placeholder, do not need to enter the same, you have to use other values instead.
This article is an appendix A to the SQL Language reference a how to read Syntax diagrams reading notes, is directly from the English translation, may only I see understand. But after this section, reading the grammar chart is no more difficult for me.
Https://docs.oracle.com/cd/E24693_01/server.11203/e17118/ap_syntx.htm
"Go" how to read syntax diagrams in Oracle documents