descriptor: Formal ABNF for digest values#655
Conversation
I'm not sure what the grammar language was before, but this commit converts it to ABNF and references the defining RFC. The ABNF highlighting comes from [1,2]. [1]: https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting [2]: https://github.com/github/linguist/blob/v5.0.8/lib/linguist/languages.yml#L50-L56 Signed-off-by: W. Trevor King <wking@tremily.us>
|
I prefer current notation over ABNF for readability, although little a bit informal |
|
On Tue, Apr 25, 2017 at 10:01:53AM -0700, Akihiro Suda wrote:
I prefer current notation over ABNF for readability, although little
a bit informal
Enforcing a MUST based on informal notation seems like more trouble
than reading the ABNF ;). And while the current syntax is more
compact, the ABNF RFC is about the size of the BRE spec [1] and it
makes it easy to compose a more complicated rule from simpler rules,
while BREs do not. The current syntax may be Go's syntax [2], but
that looks underspecified to me unless you say “as implemented in Go
1.8” or some such.
[1]: http://pubs.opengroup.org/onlinepubs/9699919799/
[2]: https://golang.org/pkg/regexp/syntax/
|
|
@wking Could you please stop filing PRs that invalidate others? Please submit an issue and discuss the change before submitting. |
Also, there is nothing informal about the syntax here. Regular expressions are well-defined and understood by a broader group of readers than ABNF. |
|
this seems to be coming from left field and not needed. closing. |
The syntax grammar is informal because the current grammar language is undefined. If we wanted to formally use a known regex language (for example), we'd need to link to the spec defining it. |
|
… On Mon, May 1, 2017 at 12:31 PM W. Trevor King ***@***.***> wrote:
Also, there is nothing informal about the syntax here. Regular expressions
are well-defined…
The syntax grammar is informal because the current grammar language is
undefined. If we wanted to formally usie a known regex language (for
example), we'd need to link to the spec defining it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#655 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABJ6_ftFpkSZSiqdAEU-YXEQHyQbVvjks5r1jMPgaJpZM4NHvsX>
.
|
|
On Mon, May 01, 2017 at 01:04:12PM -0700, Erik Hollensbe wrote:
https://en.m.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions
?
I'm fine linking [1] as an alternative to this PR, but with just BREs
you'd need to have a single regexp for the whole digest. To decompose
it into parts (e.g. an algorithm and a hex/encoded part), you'd need
to use ABNF or some other syntax for defining concatenation.
But as it stands, the spec links nothing to define the syntax being
used.
[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03
|
I'm not sure what the grammar language was before, but this commit converts it to ABNF and references the defining RFC.
The ABNF highlighting comes from here and here.