On Fri, Sep 24, 2010 at 9:28 PM, Evan Laforge qdun...@gmail.com wrote:
simpleComment = do{ string !--
; manyTill anyChar (try (string --))
}
Note the overlapping parsers anyChar and string !--, and
therefore the use of the try combinator.
First, I would
Stephen,
Thanks much for the pointer to the examples in the sources; found them.
(Its nice to learn from the coding style used by the authors.)
-- Peter
On Sat, Sep 25, 2010 at 12:34 AM, Stephen Tetley
stephen.tet...@gmail.com wrote:
On 25 September 2010 05:30, Evan Laforge qdun...@gmail.com
On 25 September 2010 05:30, Evan Laforge qdun...@gmail.com wrote:
I thought the parsec source included some example parsers for simple
languages? In any case, there is lots of material floating around,
[Snip]
The best documentation is Daan Leijen's original manual, plus the
original source
I am new to parsec and having difficulty understanding the
explanation of manyTill in
http://legacy.cs.uu.nl/daan/download/parsec/parsec.html.
(I really appreciate having this doc by the way; great reference.)
I.e.:
manyTill :: GenParser tok st a - GenParser tok st end - GenParser tok st [a]
[ sorry, forgot reply to all ]
simpleComment = do{ string !--
; manyTill anyChar (try (string --))
}
Note the overlapping parsers anyChar and string !--, and
therefore the use of the try combinator.
First, I would have expected it to instead say:
Note