[Haskell-cafe] Parsec combinator like Prolog's cut operator?

Erik de Castro Lopo mle+hs at mega-nerd.com
Tue Jun 29 23:26:59 EDT 2010


Hi all,

I'm reading John Hughes' paper "Generalizing Monads to Arrows" and found
the statement regarding parser combinators:

   "... depend on the programmer using an additional combinator similar
   to Prolog's 'cut' operator do declare that a parser need never
   backtrack beyond a certain point."

Does something like this already exist in Parsec? If not is there a way
to write it?

Having this would really help with a parsing problem I have.

Cheers,
Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the Haskell-Cafe mailing list