-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
I'm trying to implement the libversion algorithm in the Raku Programming Language, and have some test failures that I think are somehow related to my misunderstanding of the algorithm.
Looking at https://github.com/repology/libversion/blob/master/doc/ALGORITHM.md , it states:
Version is split into separate all-alphabetic or all-numeric components. All other
characters are treated as separators. Empty components are not generated.
10.2alpha3..patch.4. → 10, 2, alpha, 3, patch, 4
Then later it states:
A special case exists for alphabetic component which follows numeric component,
and is not followed by another numeric component (1.0a, 1.0a.1, but not 1.0a1). Such
alphabetic component is assigned a different rank, LETTER_SUFFIX, which follows
NONZERO (choice of this behavior explained below).
I don't understand why 1.0a1 is not included in this constraint, and 1.0a.1 is. They both split into 1, 0, a, 1 do they not?
So is this a problem in the documentation? Or the algorithm? Or the tests?
Metadata
Metadata
Assignees
Labels
No labels