Module Buf_read.Syntax

Convenient syntax for some of the combinators.

val let+ : 'a parser -> ('a -> 'b) -> 'b parser

Syntax for map.

val let* : 'a parser -> ('a -> 'b parser) -> 'b parser

Syntax for bind

val and+ : 'a parser -> 'b parser -> ('a * 'b) parser

Syntax for pair

val and* : 'a parser -> 'b parser -> ('a * 'b) parser

Syntax for pair (same as and+).

val (<*>) : 'a parser -> 'b parser -> ('a * 'b) parser

a <*> b is pair a b.

val (<*) : 'a parser -> 'b parser -> 'a parser

a <* b is map fst (pair a b). It parses two things and keeps only the first.

val (*>) : 'a parser -> 'b parser -> 'b parser

a *> b is map snd (pair a b). It parses two things and keeps only the second.