(between open close p)
(between open close p) parses open, followed by p and close. Returns the value returned by p.
(between open close p) parses open, followed by p and close. Returns the value returned by p.
(bind parser binder)
if parser success, pass the result into binder and get a new parser, pass residue data into it and return [result residue].
if parser success, pass the result into binder and get a new parser, pass residue data into it and return [result residue].
(choice parser & parsers)
(choice & ps) tries to apply the parsers in the list ps in order, until one of them succeeds. Returns the value of the succeeding parser.
(choice & ps) tries to apply the parsers in the list ps in order, until one of them succeeds. Returns the value of the succeeding parser.
(over x y)
if x parser success then call y, if y success, return x's result and y's residue, else throw error.
if x parser success then call y, if y success, return x's result and y's residue, else throw error.
(sepBy p sep)
(sepBy p sep) parses zero or more occurrences of p, separated by sep. Returns a list of values returned by p.
(sepBy p sep) parses zero or more occurrences of p, separated by sep. Returns a list of values returned by p.
(sepBy1 p sep)
(sepBy1 p sep) parses one or more occurrences of p, separated by sep. Returns a list of values returned by p.
(sepBy1 p sep) parses one or more occurrences of p, separated by sep. Returns a list of values returned by p.
(skip parser)
skip create a parser, just use parser consume the data and without results. It return [nil residue].
skip create a parser, just use parser consume the data and without results. It return [nil residue].
(skip1 parser)
skip create a parser, just use parser consume the data and without results. The parser must success once or more.It return [nil residue].
skip create a parser, just use parser consume the data and without results. The parser must success once or more.It return [nil residue].
(then x y)
if parser x success, parse the residue party into y and return [result residue].
if parser x success, parse the residue party into y and return [result residue].
(try-pipe parser)
try-pipe create a function, accept a results seq and a data, try to parse the data use the parser. Then append result to results and return [results residue success?]. If failed, just return inputs and false. It is helper for seq combinators as many and many1.
try-pipe create a function, accept a results seq and a data, try to parse the data use the parser. Then append result to results and return [results residue success?]. If failed, just return inputs and false. It is helper for seq combinators as many and many1.
(try-then parser)
try-then create a function, accept data and try to parse the data use the parser. Return [residue true] if parsed. If failed, just return [inputs false]. It is helper for some combinator not need save result that like skip and skip1.
try-then create a function, accept data and try to parse the data use the parser. Return [residue true] if parsed. If failed, just return [inputs false]. It is helper for some combinator not need save result that like skip and skip1.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close