Add ~x.y.z and ^x.y.z parsing

Aha excellent! That explains my comment above.