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
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
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
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
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