Safe Haskell | None |
---|---|
Language | Haskell98 |
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.
- parseRanges :: Read a => String -> Either ParseError [Range a]
- ranges :: Read a => RangeParserArgs -> Parser [Range a]
- data RangeParserArgs = Args {}
- defaultArgs :: RangeParserArgs
Documentation
parseRanges :: Read a => String -> Either ParseError [Range a] Source
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.
ranges :: Read a => RangeParserArgs -> Parser [Range a] Source
Given the parser arguments this returns a parser that is capable of parsing a list of ranges.
data RangeParserArgs Source
The arguments that are used, and can be modified, while parsing a standard range string.
Args | |
|
defaultArgs :: RangeParserArgs Source
These are the default arguments that are used by the parser. Please feel free to use the default arguments for you own parser and modify it from the defaults at will.