Thomas Beale wrote:
>>   v1.1.1.1   -- or even more than three parts?
>
> yes you are right - we probably should limit it to 3, which will
> require a change
>
>> The version_id regex rejects these: ...
>>   v1.10       -- surely this should be allowed!
>
> yes - that's an error. I think this part of the regex should be:
>
> .v[1-9]\d*(\.[0-9]+){0,2}

Ok, so in Perlesque it would be:

v[1-9]\d*(\.\d+){0,2}

And the "classic regular expression equivalent" would be:

v[1-9][0-9]*(\.[0-9]+){0,2}

Therefore, the production rule would be:

     version_id: 'v' V_NONZERO_DIGIT { V_DIGIT } [ '.' V_DIGIT { V_DIGIT } ] 
[ '.' V_DIGIT { V_DIGIT } ]
     V_DIGIT: [0-9]
     V_NONZERO_DIGIT: [1-9]

- Peter 



Reply via email to