parsec
parsec copied to clipboard
A monadic parser combinator library
Basically I need a function with the following signature: hoistParsecT :: (m a -> n a) -> (n a -> m a) -> ParsecT s u m a -> ParsecT...
Although the parser is rather easy to use to export `Text` from `Data.Text`, the `Text.Parsec.Token` library is rather hard to use to create a lexer using `Text`. I'm not exactly...
The function `buildExpressionParser` in module `Text.Parser.Expr` has a bug. In the uncommon case where a prefix operator has lower precedence than an infix operator, such as in boolean expressions, _e.g_...
A parser like ``` parser :: GenParser Char st String parser = choice $ fmap (try . string) ["head", "tail", "tales"] ``` with malformed input "ta " will produce an...
As described in [this SO question](http://stackoverflow.com/questions/5672142/in-parsec-is-there-a-way-to-prevent-lexeme-from-consuming-newlines), many of the token parser functions consume newlines, which is often not the desired behaviour. It's also not easy, without copying most of the...
Hi! I'm a wee baby Haskell programmer, but I noticed that the example at the bottom here: https://hackage.haskell.org/package/parsec-3.1.9/docs/Text-Parsec-Expr.html Doesn't seem to type check. I don't think the types of parens...
[integer](https://hackage.haskell.org/package/parsec-3.1.9/docs/Text-Parsec-Token.html#v:integer) doesn't behave properly for input with leading white spaces. ``` import Text.Parsec import Text.Parsec.String (Parser) import qualified Text.Parsec.Token as P import Text.Parsec.Language (emptyDef) lexer = P.makeTokenParser emptyDef integer =...