You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of the syntax and mechanisms specified in this document are described in both prose and the Augmented Backus-Naur Form for Objects (OABNF) based on Augmented Backus-Naur Form (ABNF) that defined by RFC 2234 unless stated otherwise. Implementers will need to be familiar with the notation in order to understand this specification. The OABNF includes the following constructs:
name = definition
The name of a rule is simply the name itself and case sensitive, and separated from its definition by the equal = character.
implied *LWS
The grammar described by this specification is word-based. Except where noted otherwise, linear whitespace (LWS) can be included between any two adjacent words (token or quoted-string), and between adjacent tokens and delimiters (tspecials), without changing the interpretation of a field. At least one delimiter (tspecials) MUST exist between any two tokens, since they would otherwise be interpreted as a single token.
name = multi-line
definition
The indentation consisting of the same number of SPs is used to indicate a rule definition that spans more than one line. Other WSs have no special meaning except for separating text.
name = <rule name or rule description>
Angle brackets are used in the definition to distinguish each rule name to make it more recognizable. For rules that require a literal description can also be enclosed in angle brackets to indicate that the words of the statement are not separate elements.
"literal"
Quotation marks surround literal text. Unless stated otherwise, the text is case-insensitive.
rule1 | rule2
Elements separated by a bar ("|") are alternatives, e.g., "yes | no" will accept yes or no.
(rule1 rule2)
Elements enclosed in parentheses are treated as a single element. Thus, "(elem (foo | bar) elem)" allows the token sequences "elem foo elem" and "elem bar elem".
*#rule
The character "*" and "#" preceding an element indicates repetition and separation. The full form is "<n>*<m>#<c>element" indicating at least <n> and at most <m> occurrences of element, each separated by <c>. Null elments are allowed in an explicitly declared way, e.g., "*#SP( *ALPHA )" allows the token sequences "ab cd ef". Default values are 0 and infinity so that "*(element)" allows any number of elements, including zero; "1*element" requires at least one; and "1*2#SP(element)" allows one or two and separated by SP.
[rule1, rule2]
Square brackets are used to indicate the list. The list allows any number of elements, including zero. The extended form is "[<n>*<m>element]" indicating a list including at least <n> and at most <m> occurrences of element. Thus, "[foo, bar]" means a list including foo and bar in order, "[*(*CHAR)]" means a list including any number of strings with arbitrary length.
rule1{rule2, rule3}
Curly brackets are used to indicate the mapping, and nested to express objects, e.g., "o{a{r}, b}" means an object including two attributes "a{r}" and "b", and "a" maps to "r".
N rule
Specific repetition: "<n>(element)" is equivalent to "<n>*<n>(element)"; that is, exactly <n> occurrences of (element). Thus "2DIGIT" is a 2-digit number, and "3ALPHA" is a string of three alphabetic characters.
; comment
A semi-colon, set off some distance to the right of rule text, starts a comment that continues to the end of line. This is a simple way of including useful notes in parallel with the specifications.
The text was updated successfully, but these errors were encountered:
All of the syntax and mechanisms specified in this document are described in both prose and the Augmented Backus-Naur Form for Objects (OABNF) based on Augmented Backus-Naur Form (ABNF) that defined by RFC 2234 unless stated otherwise. Implementers will need to be familiar with the notation in order to understand this specification. The OABNF includes the following constructs:
The name of a rule is simply the name itself and case sensitive, and separated from its definition by the equal
=
character.The grammar described by this specification is word-based. Except where noted otherwise, linear whitespace (LWS) can be included between any two adjacent words (token or quoted-string), and between adjacent tokens and delimiters (tspecials), without changing the interpretation of a field. At least one delimiter (tspecials) MUST exist between any two tokens, since they would otherwise be interpreted as a single token.
The indentation consisting of the same number of SPs is used to indicate a rule definition that spans more than one line. Other WSs have no special meaning except for separating text.
Angle brackets are used in the definition to distinguish each rule name to make it more recognizable. For rules that require a literal description can also be enclosed in angle brackets to indicate that the words of the statement are not separate elements.
Quotation marks surround literal text. Unless stated otherwise, the text is case-insensitive.
Elements separated by a bar ("|") are alternatives, e.g., "yes | no" will accept yes or no.
Elements enclosed in parentheses are treated as a single element. Thus, "(elem (foo | bar) elem)" allows the token sequences "elem foo elem" and "elem bar elem".
The character "*" and "#" preceding an element indicates repetition and separation. The full form is "<n>*<m>#<c>element" indicating at least <n> and at most <m> occurrences of element, each separated by <c>. Null elments are allowed in an explicitly declared way, e.g., "*#SP( *ALPHA )" allows the token sequences "ab cd ef". Default values are 0 and infinity so that "*(element)" allows any number of elements, including zero; "1*element" requires at least one; and "1*2#SP(element)" allows one or two and separated by SP.
Square brackets are used to indicate the list. The list allows any number of elements, including zero. The extended form is "[<n>*<m>element]" indicating a list including at least <n> and at most <m> occurrences of element. Thus, "[foo, bar]" means a list including foo and bar in order, "[*(*CHAR)]" means a list including any number of strings with arbitrary length.
Curly brackets are used to indicate the mapping, and nested to express objects, e.g., "o{a{r}, b}" means an object including two attributes "a{r}" and "b", and "a" maps to "r".
Specific repetition: "<n>(element)" is equivalent to "<n>*<n>(element)"; that is, exactly <n> occurrences of (element). Thus "2DIGIT" is a 2-digit number, and "3ALPHA" is a string of three alphabetic characters.
A semi-colon, set off some distance to the right of rule text, starts a comment that continues to the end of line. This is a simple way of including useful notes in parallel with the specifications.
The text was updated successfully, but these errors were encountered: