Liking cljdoc? Tell your friends :D

zetta.parser.seq


any-tokenclj

Parser that matches any element from the input seq, it will return the parsed element from the seq.

Parser that matches any element from the input seq, it will return the
parsed element from the seq.
raw docstring

at-end?clj

Parser that never fails, it returns true when the end-of-input is reached, false otherwise.

Parser that never fails, it returns `true` when the end-of-input
is reached, `false` otherwise.
raw docstring

charclj

(char c)

Parser that matches only a token that is equal to character c, the character is returned.

Parser that matches only a token that is equal to character `c`, the
character is returned.
raw docstring

demand-inputclj

Basic parser that will ensure the request of more input via a continuation.

Basic parser that will ensure the request of more input via a continuation.
raw docstring

digitclj

Parser that matches any character that is considered a digit, it uses Character/isDigit internally. This parser will return the matched digit character.

Parser that matches any character that is considered a digit, it uses
`Character/isDigit` internally. This parser will return the matched digit
character.
raw docstring

double-or-longclj


end-of-inputclj

Parser that matches only when the end-of-input has been reached, otherwise it fails. Returns a nil value.

Parser that matches only when the end-of-input has been reached, otherwise
it fails. Returns a nil value.
raw docstring

ensureclj

(ensure n)

If at least n items of input are available, return the current input, otherwise fail.

If at least `n` items of input are available, return the current input,
otherwise fail.
raw docstring

eolclj

Parser that matches different end-of-line characters/sequences. This parser returns a nil value.

Parser that matches different end-of-line characters/sequences.
This parser returns a nil value.
raw docstring

getclj

Returns the input given in the zetta.core/parse function.

Returns the input given in the `zetta.core/parse` function.
raw docstring

letterclj

Parser that matches any character that is considered a letter, it uses Character/isLetter internally. This parser will return the matched character.

Parser that matches any character that is considered a letter, it uses
`Character/isLetter` internally. This parser will return the matched
character.
raw docstring

not-charclj

(not-char c)

Parser that matches only an item that is not equal to character c, the item is returned.

Parser that matches only an item that is not equal to character `c`, the
item is returned.
raw docstring

numberclj

Parser that matches one or more digit characters and returns a number in base 10.

Parser that matches one or more digit characters and returns a number in
base 10.
raw docstring

putclj

(put s)

satisfy?clj

(satisfy? pred)

Parser that succeeds for any item for which the predicate pred returns true. Returns the item that is actually parsed.

Parser that succeeds for any item for which the predicate `pred` returns
`true`. Returns the item that is actually parsed.
raw docstring

skipclj

(skip pred)

Parser that succeeds for any item for which the predicate pred, returns nil.

Parser that succeeds for any item for which the predicate `pred`, returns
`nil`.
raw docstring

skip-spacesclj

Parser that skips many spaces. Returns nil.

Parser that skips many spaces. Returns `nil`.
raw docstring

skip-whileclj

(skip-while pred)

Parser that skips input for as long as pred returns true.

Parser that skips input for as long as `pred` returns `true`.
raw docstring

skip-whitespacesclj

Parser that skips many whitespaces. Returns nil.

Parser that skips many whitespaces. Returns `nil`.
raw docstring

spaceclj

Parser that matches any character that is equal to the character \space. This parser returns the \space character.

Parser that matches any character that is equal to the character `\space`.
This parser returns the `\space` character.
raw docstring

spacesclj

Parser that matches many spaces. Returns a seq of space characters

Parser that matches many spaces. Returns a seq of space characters
raw docstring

stringclj

(string s)

Parses a sequence of items that identically match a given string s. Returns the parsed string. This parser consumes no input if it fails (even with a partial match).

Parses a sequence of items that identically match a given string `s`.
Returns the parsed string. This parser consumes no input if it fails (even
with a partial match).
raw docstring

takeclj

(take n)

Parser that matches exactly n items from input. Returnes the matched input as a seq.

Parser that matches exactly `n` items from input. Returnes the matched
input as a seq.
raw docstring

take-restclj

Parser that returns the rest of the seqs that are given to the parser, the result will be a seqs of seqs where the number of seqs from the first level will represent the number of times a continuation was used to continue the parse process.

Parser that returns the rest of the seqs that are given to the parser,
the result will be a seqs of seqs where the number of seqs
from the first level will represent the number of times a
continuation was used to continue the parse process.
raw docstring

take-tillclj

(take-till pred)

Matches input as long as pred returns false (i.e. until it returns true), and returns the consumed input as a seq.

This parser does not fail. It will return an empty seq if the predicate returns true on the first item from the input.

WARNING: Because this parser does not fail, do not use it with combinators such as many, because such parsers loop until a failure occurs. Careless use will thus result in an infinite loop.

Matches input as long as `pred` returns `false`
(i.e. until it returns `true`), and returns the consumed input as a seq.

This parser does not fail.  It will return an empty seq if the predicate
returns `true` on the first item from the input.

**WARNING**: Because this parser does not fail, do not use it with combinators
such as `many`, because such parsers loop until a failure occurs. Careless
use will thus result in an infinite loop.
raw docstring

take-whileclj

(take-while pred)

Parser that matches input as long as pred returns true, and return the consumed input as a seq.

This parser does not fail. It will return an empty seq if the predicate returns false on the first token of input.

WARNING: Because this parser does not fail, do not use it with combinators such as many, because such parsers loop until a failure occurs. Careless use will thus result in an infinite loop.

Parser that matches input as long as pred returns `true`, and return
the consumed input as a seq.

This parser does not fail.  It will return an empty seq if the predicate
returns `false` on the first token of input.

**WARNING**: Because this parser does not fail, do not use it with
combinators such as `many`, because such parsers loop until a failure
occurs. Careless use will thus result in an infinite loop.
raw docstring

take-while1clj

(take-while1 pred)

Parser that matches input as long as pred returns true. This parser returns the consumed input in a seq.

This parser will fail if a first match is not accomplished.

Parser that matches input as long as pred returns `true`. This parser
returns the consumed input in a seq.

This parser will fail if a first match is not accomplished.
raw docstring

take-withclj

(take-with n pred)

Parser that matches n items of input, but succeed only if the predicate pred returns true on the parsed input. The matched input is returned as a seq.

Parser that matches `n` items of input, but succeed only if the predicate
`pred` returns `true` on the parsed input. The matched input is returned
as a seq.
raw docstring

want-input?clj

Parser that returns true if any input is available either immediately or on demand, and false if the end of all input has been reached.

WARNING: This parser return succeeds.

Parser that returns `true` if any input is available either immediately or
on demand, and `false` if the end of all input has been reached.

**WARNING**: This parser return succeeds.
raw docstring

whitespaceclj

Parser that matches any character that is considered a whitespace, it uses Character/isWhitespace internally. This parser returns the whitespace character.

Parser that matches any character that is considered a whitespace, it uses
`Character/isWhitespace` internally. This parser returns the whitespace
character.
raw docstring

wordclj

Parser that matches a word, e.g (many1 letter), returns the parsed word.

Parser that matches a word, e.g `(many1 letter)`, returns the parsed word.
raw docstring

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

× close