Open ShuiRuTian opened 11 months ago
Agree. Numeric parts of a pre-release must not have leading zero. Also the part definition isn't BNF but a regex.
How about this?
alphanum ::= ( ['0'-'9'] | ['A'-'Z'] | ['a'-'z'] | '-' ) +
pre ::= ( nr | alphanum ) ( '.' ( nr | alphanum ) ) *
build ::= alphanum ( '.' alphanum ) *
PS: This isn't perfect since alphanum could be a just numbers starting with a zero but the definition makes the difference between pre-release and build much clearer.
Sorry for the late response. I was on Chinese Spring Festival.
It looks good to me!
And just out of curious, why we did not keep it same with(or close to) Semver?
Because it was invented 10 years ago. I'm working on a update to a formal EBNF that will settle several issues (PR after my vacation)
Is there an existing issue for this?
Current Behavior
However, according to the BNF
pre
andbuild
are just the same.Expected Behavior
The behavior of program is correct, but BNF is not.
We need to update the BNF form.
Steps To Reproduce
No response
Environment