Skip to content

Instantly share code, notes, and snippets.

@anzdaddy
Created June 15, 2024 11:52
Show Gist options
  • Save anzdaddy/be7d679223d8c59b3910efa06392f56d to your computer and use it in GitHub Desktop.
Save anzdaddy/be7d679223d8c59b3910efa06392f56d to your computer and use it in GitHub Desktop.
Simplified semver grammar
semver -> ver ("-" pre)? ("+" build)?;
ver -> num "." num "." num;
pre -> (alnum | num):".";
build -> (alnum | \d+):".";
num -> "0"|[1-9]\d*;
alnum -> [-A-Za-z0-9]* [-A-Za-z] [-A-Za-z0-9]*;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment