Safe Haskell | Safe |
---|---|
Language | Haskell98 |
A Parsec parser type that parses Symbol
s and keeps track of the
position within the input stream. Unlike Parsec's default position
tracking, this parser keeps track of the range of whitespace between two
tokens.
Symbols
Symbols form input for parsers. Minimal complete definition: unparse
.
collapse :: Symbol s => (s -> Bool) -> [s] -> [(s, Bounds)] Source #
Given a predicate that tells what tokens to discard, keeps only the meaningful tokens and couples them with position information.
Parsing
type P s = ParsecT [(s, Bounds)] Range Source #
A parser that works on symbols coupled with token information. The state maintains the current position in the stream. This position is the range of whitespace between two tokens.