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

spec: describe components of EBNF grammar #695

Merged
merged 2 commits into from
Jun 23, 2017

Conversation

stevvooe
Copy link
Contributor

@stevvooe stevvooe commented Jun 9, 2017

To clarify the grammar definitions, we define the subset of EBNF used by
this specification to specify various field formats.

Signed-off-by: Stephen J Day [email protected]

Closes #692

```

The above expression defines a symbol, "literal", that matches the exact input of "matchthis".
Character classes are dilineated by brackets (`[]`), describing either a set, range or multiple range of characters:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dilineated -> delineated?

```

Each expression must be matched once and only once.
To allow for describing repitition and optional match criteria, the postfix operators "*" and "+" are defined.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allow for -> allow?

@stevvooe stevvooe force-pushed the ebnf-grammar branch 2 times, most recently from 8873bdb to b5b786c Compare June 9, 2017 21:20
@vbatts
Copy link
Member

vbatts commented Jun 16, 2017

Nothing jumps out at me as being wrong, and seems fine to include our own grammar.

looks like make test failed on something, but LGTM

@stevvooe
Copy link
Contributor Author

@vbatts This is failing waiting on #696.

@vbatts
Copy link
Member

vbatts commented Jun 16, 2017

ah. then rebase pls 😸

@stevvooe stevvooe force-pushed the ebnf-grammar branch 2 times, most recently from d69d2ee to cda46a1 Compare June 16, 2017 20:48
@stevvooe stevvooe added this to the v1.0.0 milestone Jun 21, 2017
algorithm ::= algorithm-component (algorithm-separator algorithm-component)*
algorithm-component ::= [a-z0-9]+
algorithm-separator ::= [+._-]
encoded ::= [a-zA-Z0-9=_-]+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line would seem to get broken into something like [a-z]* | [A-Z]* | [0-9]* | [=_-]+...


The above symbol "set" would match one character of either "a", "b" or "c".
The symbol "range" would match any character, "A" to "Z", inclusive.
Currently, only matching for 7-bit ascii literals and character classes is defined, as that is all that is required by this specification.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should it be clarified that multiple ranges can be in the same brackets, along with a set?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from @wking "multiple ranges and explicit characters should be allowed in a single range. The XML-spec wording for that is "Enumerations and ranges can be mixed in one set of brackets." https://www.w3.org/TR/REC-xml/#sec-notation"

stevvooe added 2 commits June 21, 2017 14:28
To clarify the grammar definitions, we define the subset of EBNF used by
this specification to specify various field formats.

Signed-off-by: Stephen J Day <[email protected]>
@stevvooe
Copy link
Contributor Author

@vbatts Added the character range requests.

@vbatts
Copy link
Member

vbatts commented Jun 21, 2017

LGTM

Approved with PullApprove

@vbatts
Copy link
Member

vbatts commented Jun 21, 2017

@jonboulle your review would be nice 🥇

@philips
Copy link
Contributor

philips commented Jun 23, 2017

LGTM

Approved with PullApprove

@vbatts vbatts merged commit fc936c7 into opencontainers:master Jun 23, 2017
@stevvooe stevvooe deleted the ebnf-grammar branch June 23, 2017 20:52
@vbatts vbatts mentioned this pull request Jul 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants