attoparsec Questions
1
Solved
Consider the usage of these different parser combinators.
import Control.Applicative.Combinators
import Text.Regex.Applicative
main :: IO ()
main = do
let parser1 = sym '"' *> manyTill a...
Kopple asked 26/6, 2020 at 0:8
4
I am wondered why there is no generalized parser combinators for Bottom-up parsing in Haskell like a Parsec combinators for top down parsing.
( I could find some research work went during 2004 but...
Cell asked 5/6, 2014 at 2:57
2
Solved
I was reading a lot about Haskell Parser Combinators and found a lot of topics like:
Parsec vs Yacc/Bison/Antlr: Why and when to use Parsec?
Which Haskell parsing technology is most pleasant to u...
Magnetoelectricity asked 3/8, 2013 at 1:5
1
Well in fact I'm pretty sure I'm using the wrong terminology. Here is the problem I want to solve: a parser for the markdown format, well a subset of it.
My problem is with the blockquote feature....
Purpura asked 26/6, 2015 at 21:15
2
Solved
I'd like to understand why this simple parser runs out of memory for large files. I'm really clueless what am I doing wrong.
import Data.Attoparsec.ByteString.Char8
import qualified Data.Attopars...
Chuppah asked 29/12, 2016 at 11:20
1
Solved
I'm trying to parse a string that can contain escaped characters, here's an example:
import qualified Data.Text as T
exampleParser :: Parser T.Text
exampleParser = T.pack <$> many (char '\\...
Eurypterid asked 9/2, 2016 at 19:42
3
Solved
Background
I've written a logfile parser using attoparsec. All my smaller parsers succeed, as does the composed final parser. I've confirmed this with tests. But I'm stumbling over performing oper...
Armillas asked 8/9, 2015 at 21:41
2
Solved
I'm trying to write code to perform the following simple task in Haskell: looking up the etymologies of words using this dictionary, stored as a large tsv file (http://www1.icsi.berkeley.edu/~demel...
Usher asked 29/7, 2015 at 10:28
1
Solved
I'm using Attoparsec, and I would like to track a user state value throughout a parsing task.
I'm familiar with the monadic functions getState, putState, and modifyState of Parsec, but I can't see...
Non asked 28/5, 2015 at 11:27
2
Solved
I have written a following parsing code using attoparsec:
data Test = Test {
a :: Int,
b :: Int
} deriving (Show)
testParser :: Parser Test
testParser = do
a <- decimal
tab
b <- decim...
Norword asked 5/6, 2014 at 11:21
1
Karva notation is used in Gene Expression Programming to represent mathematical expressions.
See here http://www.gene-expression-programming.com/Tutorial002.asp
You create an expression tree by ...
Kiangsu asked 8/8, 2012 at 16:42
1
Solved
I'm trying to augment Haskell's Attoparsec parser library with a function
takeRegex :: Regex -> Parser ByteString
using one of the regexp implementations.
(Motivation: Good regex libraries c...
Rich asked 3/1, 2014 at 1:24
1
Solved
I have to parse some files and convert them to some predefined datatypes.
Haskell seems to be providing two packages for that:
attoparsec
parsec
What is the difference between the two of them ...
Ditchwater asked 6/10, 2013 at 11:12
1
Solved
I'm a little confused by this behaviour of attoparsec.
$ ghci
> :m Data.Attoparsec.Text
> :m + Data.Text
> parse (string (pack "module")) (pack "mox")
Partial _
> parse (string (pack "...
Submariner asked 11/1, 2013 at 21:51
1
Solved
Working on my app I've stumbled into a problem of Aeson not decoding UTF8 input. Digging deeper I found out that it relies on Parser ByteString of Attoparsec, which seems to be the source of the pr...
Mauritamauritania asked 29/12, 2012 at 10:13
2
Solved
I wrote a quick attoparsec parser to walk an aspx file and drop all the style attributes, and it's working fine except for one piece of it where I can't figure out how to make it succeed on matchin...
Charterhouse asked 2/11, 2012 at 20:10
1
Solved
I wanted, just to learn a bit about Iteratees, reimplement a simple parser I made, using Data.Iteratee and Data.Attoparsec.Iteratee. I'm pretty much stumped though. Below I have a simple example th...
Mantua asked 15/6, 2011 at 16:22
1
Solved
So I am writing a packet sniffing app. Basically I wanted it to sniff for tcp sessions, and then parse them to see if they are http, and if they are, and if they have the right content type, etc, s...
Seasoning asked 11/11, 2010 at 4:2
3
Solved
I am converting some functioning Haskell code that uses Parsec to instead use Attoparsec in the hope of getting better performance. I have made the changes and everything compiles but my parser doe...
Ahasuerus asked 7/6, 2010 at 11:22
1
© 2022 - 2024 — McMap. All rights reserved.