It should not be unexpected that you will be given a string representation of some ranges and you will need to parse them so that you can then do some further processing. This parser exists in order to make the most common forms of range strings easy to parse. It does not cover all cases however but you should not be too worried about that because you should be able to write your own parser using parsec or Alex/Happy and then you can convert everything that you parse into a RangeTree object for easier processing.
Given a string this function will either return a parse error back to the user or the list of ranges that are represented by the parsed string.
Given the parser arguments this returns a parser that is capable of parsing a list of ranges.
The arguments that are used, and can be modified, while parsing a standard range string.