Add BNF Grammar for valid version strings

Written in collaboration with @petermichaux

Closes #110