Module CCParse.Infix
val (>|=) : 'a t -> ('a -> 'b) -> 'b tAlias to
map.p >|= fparses an itemxusingp, and returnsf x.
val (>>=) : 'a t -> ('a -> 'b t) -> 'b tAlias to
bind.p >>= fresults in a new parser which behaves aspthen, in case of success, appliesfto the result.
val (<*) : 'a t -> _ t -> 'a ta <* bparsesaintox, parsesband ignores its result, and returnsx.
val (*>) : _ t -> 'a t -> 'a ta *> bparsesa, then parsesbintox, and returnsx. The result ofais ignored.
val (<|>) : 'a t -> 'a t -> 'a tAlias to
or_.a <|> btries to parsea, and ifafails without consuming any input, backtracks and tries to parseb, otherwise it fails asa. Seetry_to ensureadoes not consume anything (but it is best to avoid wrapping large parsers withtry_).
val (<?>) : 'a t -> string -> 'a ta <?> msgbehaves likea, but ifafails,a <?> msgfails withmsginstead. Useful as the last choice in a series of<|>. For example:a <|> b <|> c <?> "expected one of a, b, c".
val (|||) : 'a t -> 'b t -> ('a * 'b) tAlias to
both.a ||| bparsesa, thenb, then returns the pair of their results.- since
- NEXT_RELEASE
Let operators on OCaml >= 4.08.0, nothing otherwise
- since
- 2.8