Skip to content

Instantly share code, notes, and snippets.

@AlexDaniel
Last active May 12, 2018 03:20
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AlexDaniel/6aaeadbbcbf0a27c327c2914d9028889 to your computer and use it in GitHub Desktop.
grammar Pkg {
token TOP { <name>'-'?<ver>? };
token name { [<.alnum>+ <!before '.'>]+ % '-' };
token ver { [$<verpart>=<.digit>+]+ % '.' }
};
Pkg.parse('rakudo').say;
Pkg.parse('rakudo-1.0.1').say;
Pkg.parse('rakudo-star-1.0.1').say;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment