Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OABNF - Augmented Backus-Naur Form for Objects #2

Open
imhele opened this issue Sep 27, 2019 · 1 comment
Open

OABNF - Augmented Backus-Naur Form for Objects #2

imhele opened this issue Sep 27, 2019 · 1 comment

Comments

@imhele
Copy link
Contributor

imhele commented Sep 27, 2019

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.

@imhele imhele added the specification specs to be sorted out label Sep 27, 2019
@imhele imhele changed the title Object-Oriented Backus-Naur Form OABNF - Object-Oriented Augmented Backus-Naur Form Sep 27, 2019
@imhele imhele changed the title OABNF - Object-Oriented Augmented Backus-Naur Form OOABNF - Object-Oriented Augmented Backus-Naur Form Sep 27, 2019
@imhele imhele added this to Improve specification in Act Auth - Jan Sep 27, 2019
@imhele imhele moved this from Improve specification to Waiting for review in Act Auth - Jan Sep 27, 2019
@imhele imhele added this to Waiting for review in Act Auth - Feb Sep 27, 2019
@imhele imhele added this to Proposal in Act Auth - Jul Sep 27, 2019
@imhele imhele moved this from Proposal to Finished in Act Auth - Jan Oct 6, 2019
@imhele imhele changed the title OOABNF - Object-Oriented Augmented Backus-Naur Form OABNF - Augmented Backus-Naur Form for Objects Oct 7, 2019
@imhele
Copy link
Contributor Author

imhele commented Oct 7, 2019

Rename from "Object-Oriented Augmented Backus-Naur Form" to "Augmented Backus-Naur Form for Objects".

Related pull request: #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
specification specs to be sorted out
Projects
Act Auth - Feb
  
Proposal
Act Auth - Jan
  
Finished
Act Auth - Jul
  
Proposal
Development

No branches or pull requests

1 participant