[Haskell-cafe] followedBy parser in Parsec
pkeir at dcs.gla.ac.uk
Thu Nov 27 12:57:57 EST 2008
Is there a way in Parsec to check what the next token is, and if it is what you're hoping for, leave it there.
This is an example of something which doesn't work at all:
testpar = try $
do ae <- array_element
option  $ try $ satisfy (\c -> c /= '(') >> unexpected ""
I'm finding this totally confusing by now %0 Can I invert "notFollowedBy" somehow, or maybe there's a "peek" function I don't know about? Help!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe