(chain-left p op)
(chain-left p op a)
Parse repeated applications of a parser p, separated by applications of a parser op whose result value is an operator that is assumed to associate to the left, and which is used to combine the results from the p parsers.
Parse repeated applications of a parser p, separated by applications of a parser op whose result value is an operator that is assumed to associate to the left, and which is used to combine the results from the p parsers.
(chain-right p op)
(chain-right p op a)
Parse repeated applications of a parser p, separated by applications of a parser op whose result value is an operator that is assumed to associate to the right, and which is used to combine the results from the p parsers.
Parse repeated applications of a parser p, separated by applications of a parser op whose result value is an operator that is assumed to associate to the right, and which is used to combine the results from the p parsers.
(choice p1 p2)
(a|b)
Deterministic choice (+++) operator. Has the same behaviour
as or-else
, except that at most one result is returned.
(a|b) Deterministic choice (+++) operator. Has the same behaviour as `or-else`, except that at most one result is returned.
(many p)
(a*)
Parse repeated applications of a parser; the many combinator permits zero or more applications of the parser.
(a*) Parse repeated applications of a parser; the many combinator permits zero or more applications of the parser.
(optional p)
(a?)
Parse zero or one applications of a parser.
(a?) Parse zero or one applications of a parser.
(or-else p1 p2)
(a|b)
Non-deterministic choice (++) operator. Applies both parsers to the argument string, and appends their list of results.
(a|b) Non-deterministic choice (++) operator. Applies both parsers to the argument string, and appends their list of results.
(plus p)
(a+) is equivalent to (aa*)
Parse repeated applications of a parser; the plus combinator permits one or more applications of the parser.
(a+) is equivalent to (aa*) Parse repeated applications of a parser; the plus combinator permits one or more applications of the parser.
(separated-by p sep)
Parse repeated applications of a parser p, separated by applications of a parser sep whose result values are thrown away.
This parser will process at least one application of p. For a list of zero or more, use:
(optional (separated-by p sep))
Parse repeated applications of a parser p, separated by applications of a parser sep whose result values are thrown away. This parser will process at least one application of p. For a list of zero or more, use: (optional (separated-by p sep))
Parse a single space, tab, newline or carriage-return.
Parse a single space, tab, newline or carriage-return.
Parse a string of (zero or more) spaces, tabs, and newlines.
Parse a string of (zero or more) spaces, tabs, and newlines.
(token p)
Parse a token using a parser p, throwing away any trailing space.
Parse a token using a parser p, throwing away any trailing space.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close