Liking cljdoc? Tell your friends :D

org.clojar.marsliu.clj-parsec.combinator


betweenclj

(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.
sourceraw docstring

bindclj

(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].
sourceraw docstring

choiceclj

(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.
sourceraw docstring

manyclj

(many parser)
source

many1clj

(many1 parser)
source

overclj

(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.
sourceraw docstring

sepByclj

(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.
sourceraw docstring

sepBy1clj

(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.
sourceraw docstring

skipclj

(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].
sourceraw docstring

skip1clj

(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].
sourceraw docstring

thenclj

(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].
sourceraw docstring

try-pipeclj

(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.
sourceraw docstring

try-thenclj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close