Re: [Haskell-cafe] Lazy Parsing (ANN: vcd-0.1.4)

2010-04-28 Thread Jason Dusek
2010/04/28 S. Doaitse Swierstra : > On 27 apr 2010, at 22:12, Jason Dusek wrote: > > So UU parsers can construct input? > > The perform an editing action on the input so it becomes a > sentence of the language recognised. My questions betray a fundamental misunderstanding on my part; reading t

Re: [Haskell-cafe] Lazy Parsing (ANN: vcd-0.1.4)

2010-04-28 Thread S. Doaitse Swierstra
On 27 apr 2010, at 22:12, Jason Dusek wrote: > So UU parsers can construct input? The perform an editing action on the input so it becomes a sentence of the language recognised. > The presence of an > empty list in the 2nd slot of the tuple is the only > indicator of errors? The parser wa

Re: [Haskell-cafe] Lazy Parsing (ANN: vcd-0.1.4)

2010-04-27 Thread Jason Dusek
So UU parsers can construct input? The presence of an empty list in the 2nd slot of the tuple is the only indicator of errors? For parsing datatypes without a sensible default value, what happens? -- Jason Dusek ___ Haskell-Cafe mailing list H

Re: [Haskell-cafe] Lazy Parsing (ANN: vcd-0.1.4)

2010-04-27 Thread S. Doaitse Swierstra
How about: import Text.ParserCombinators.UU.Parsing import Text.ParserCombinators.UU.Examples pDate :: Pars (Int,Int,Int) pDate = (,,) <$> pNatural <* pDot <*> pNatural <* pDot <*> pNatural where pDot = pSym '.' and then: *Main> test pDate "3.4.5" Loading package syb-0.1.0.2 ... linkin

[Haskell-cafe] Lazy Parsing (ANN: vcd-0.1.4)

2010-04-27 Thread Tom Hawkins
I had been using Parsec to parse VCD files, but needed to lazily parse streaming data. After stumbling on this thread below, I switch to polyparse. What a great library! I was able to migrate from a strict to a semi-lazy parser and many of my parse reductions didn't even need to change. Thanks