parsec icon indicating copy to clipboard operation
parsec copied to clipboard

A monadic parser combinator library

Results 47 parsec issues
Sort by recently updated
recently updated
newest added

The purpose of this parameter is to have character offset into the input stream. Currently I use the following code to keep track of the offset: handleNewline = do p0

pvp:major

Just a small thing if you want, i'm pointing this out while approaching Parsec, before getting used to this. Usually a parser's name refers to the current parser input. `char...

In `Text.Parsec.Language` the definition for the `javaStyle` is: ```hs javaStyle :: LanguageDef st javaStyle = emptyDef { commentStart = "/*" , commentEnd = "*/" , commentLine = "//" , nestedComments...

we have ``` emptyDef :: LanguageDef st type LanguageDef st = GenLanguageDef String st Identity makeTokenParser :: Stream s m Char => GenLanguageDef s u m -> GenTokenParser s u...

``` λ parseTest (operator haskell) "∧" parse error at (line 1, column 1): unexpected "\8743" expecting operator ```

In particular I was looking for a parser for qualified Haskell identifiers and operators.

According to the Haskell 2010 Language Report [floating literal should be parsed as `Rational`](https://www.haskell.org/onlinereport/haskell2010/haskellch6.html#x13-1360006.4.1). However `Text.Parsec.Language.haskell` parses them as `Double`. To fix this we would need to change the types...

Extracted from #22. @gbaz: > It would actually be very good if we could also pull the documentation from the homepage (as hosted by web.archive.org: http://web.archive.org/web/20140329210442/http://legacy.cs.uu.nl/daan/download/parsec/parsec.html) and ported the parts...

Currently `notFollowedBy` always succeeds with parsers that don't consume input: ``` haskell -- This parser succeeds. > parseTest (lookAhead (string "a")) "abc" "a" -- Therefore this parser should fail –...

pvp:major

ByteString parser seems to be not usable because there are 0 parser functions operating on ByteString. When we operate on strings of chars we have useful parsers like "oneOf", "digit",...