[Haskell-cafe] ANNOUNCE: Parsed 0.0.1

Tillmann Rendel rendel at informatik.uni-tuebingen.de
Wed Apr 1 11:48:15 UTC 2015

Hi again,

I wrote:
> In parsec,
>    (many1 (string "a") <|> many1 (string "b")) >> string "c"
> accepts "bc", but I don't see how the corresponding grammar can be
> par-séd.

Sorry, I think I was confused because your implementation looked like an 
attempt at unlimited backtracking to me. To compare with Parsec, it is 
better to treat your implementation as an attempt to implement Parsec's 
semantics. In that case, we should note that in Parsec,

   (string "ab" <|> string "a")

rejects "a", but maybe your implementation would accept it?


More information about the Haskell-Cafe mailing list