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

Define the grammar for EBNF-ish spec entries #692

Closed
wking opened this issue Jun 2, 2017 · 0 comments
Closed

Define the grammar for EBNF-ish spec entries #692

wking opened this issue Jun 2, 2017 · 0 comments

Comments

@wking
Copy link
Contributor

wking commented Jun 2, 2017

We currently have a digest grammar with no defined grammar syntax. I had previously floated transitioning that grammar to the well-defined ABNF, but #655 was rejected. There has recently been a lot of discussion about various grammar syntax in #671, but no consensus around picking an externally-defined grammar or adding local definition for the grammar. Many of the external grammars are very similar to the current digest grammar:

digest                := algorithm ":" encoded
algorithm             := algorithm-component [algorithm-separator algorithm-component]*
algorithm-component   := /[a-z0-9]+/
algorithm-separator   := /[+._-]/
encoded               := /[a-zA-Z0-9=_-]+/

being very similar to XML 1.0 EBNF:

digest                ::= algorithm ":" encoded
algorithm             ::= algorithm-component (algorithm-separator algorithm-component)*
algorithm-component   ::= [a-z0-9]+
algorithm-separator   ::= [+._-]
encoded               ::= [a-zA-Z0-9=_-]+

After extensive discussion on IRC today (starting here), @stevvooe offered to define the grammar if I filed an issue, so here it is.

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

No branches or pull requests

1 participant