Repository navigation
Add BNF Grammar for valid version strings - #116
Conversation
|
@petermichaux Yes, that's absolutely right. Also, this doesn't allow build identifiers to have leading zeroes, so Updated. The change is this: diff --git a/semver.md b/semver.md
index 34b67df..e8b732d 100644
--- a/semver.md
+++ b/semver.md
@@ -144,19 +144,25 @@ Backus–Naur Form Grammar for Valid SemVer Versions
<pre-release> ::= <dot-separated identifiers>
- <build> ::= <dot-separated identifiers>
+ <build> ::= <dot-separated build identifiers>
<dot-separated identifiers> ::= <identifier>
| <identifier> "." <dot-separated identifiers>
+ <dot-separated build identifiers> ::= <build identifier>
+ | <build identifier> "." <dot-separated build identifiers>
+
+ <identifier> ::= <non-negative integer>
+ | <non-numeric identifier>
+
+ <build identifier> ::= <identifier character>
+ | <identifier character> <build identifier>
+
<non-numeric identifier> ::= <non-digit character>
| <non-digit character> <identifier>
| <identifier> <non-digit character>
| <identifier> <non-digit character> <identifier>
- <identifier> ::= <identifier character>
- | <identifier character> <identifier>
-
<non-digit character> ::= <letter> | "-"
<identifier character> ::= <non-digit character> | <digit> |
|
Oh, also, the Fixed with this patch: diff --git a/semver.md b/semver.md
index e8b732d..73f098c 100644
--- a/semver.md
+++ b/semver.md
@@ -159,9 +159,9 @@ Backus–Naur Form Grammar for Valid SemVer Versions
| <identifier character> <build identifier>
<non-numeric identifier> ::= <non-digit character>
- | <non-digit character> <identifier>
- | <identifier> <non-digit character>
- | <identifier> <non-digit character> <identifier>
+ | <non-digit character> <build identifier>
+ | <build identifier> <non-digit character>
+ | <build identifier> <non-digit character> <build identifier>
<non-digit character> ::= <letter> | "-"
Perhaps a better name for |
|
Where do I see the aggregate change set? |
|
The aggregate from master is on the "files changed" tab. The aggregate from when you first started reviewing is https://gist.github.com/isaacs/5784077 I'm not sure how to get that sort of thing from the github website. If you'd prefer, I can push incremental changes as we discuss, and only squash once you +1 it. |
|
Some of the choices for names of things in the BNF could be improved now that it has grown to this stage and perhaps the ordering could be improved but it might be better to have this committed as is and then clean up later. I think this should be intended to be in a version of the standard after 2.0.0 so it can be seen by more people and refined before being official. The BNF now seems quite complex. That is unfortunate. |
How do others feel about this? I'm all for releasing 2.0 now and having the BNF target 2.1 as it's a clarification of the spec and should not (hopefully) change anything. |
|
Also, I need to make time to review it myself. :) |
Sounds like a plan... 👍 |
|
A proposed simplified and descriptive update to the BNF. |
|
How do we feel about this PR? Ready for my review? Anyone else have any last edits or comments? |
|
@haacked I want to merge in @EddieGarmon's changes into this as well. @EddieGarmon I like the changes in the PR you sent to my repo. Do you mind if I change the commit messages to be a bit more meaningful? |
|
@isaacs sounds good. Just let me know when it's ready. |
Written in collaboration with @petermichaux Closes semver#110
Better names, more intuitive ordering.
|
Landed with @EddieGarmon's changes. Please review, it looks good to me. @petermichaux It'd be good if you could look over it again as well, if you've got time. Thanks :) |
|
|
|
Make that 'non-digits'. I'm a doof. |
|
|
|
@EddieGarmon True that! Updated on 5f00f57 @petermichaux Can you put |
|
Ship it. Closes #122 |
|
|
|
|
|
|
|
@EddieGarmon If having at least one non-digit is the only requirement then the following works which is what I had previously. |
|
And that is what the current pr looks like |
|
Whatever it was that I was looking at had several more options for |
|
@isaacs I've been pretty busy lately. I'll try to look at it soon. |
Add BNF Grammar for valid version strings

Written in collaboration with @petermichaux
Closes #110