Liking cljdoc? Tell your friends :D

protoflex.parse

Clojure Parser Library.

Clojure Parser Library.
raw docstring

*parser-state*clj


->fnscljmacro

(->fns & exprs)

all-opsclj

(all-ops)

ang-bracketsclj

(ang-brackets parse-fn)

Returns the result of applying specifed parse function to text that is in between the opening and closing angular brackets '<' and '>'

Returns the result of applying specifed parse function to text that is
in between the opening and closing angular brackets '<' and '>'
raw docstring

anyclj

(any & parse-fns)

Returns the result of the first successfully matching parse-function. If none of the parse functions match, an exception is thrown.

Returns the result of the first successfully matching parse-function.
If none of the parse functions match, an exception is thrown.
raw docstring

any-stringclj

(any-string sep)

Reads a single-quoted or double-quoted or a plain-string that is followed by the specified separator sep; the separator is not part of the returned string.

Reads a single-quoted or double-quoted or a plain-string that is followed
by the specified separator sep; the separator is not part of the returned
string.
raw docstring

any_cljmacro

(any_ & parse-exprs)

Creates and returns a parse function that calls any when it is invoked. The arguments parse-exprs are converted to parse functions and passed to any in the returned function's body. See any.

Creates and returns a parse function that calls `any` when it is
invoked. The arguments `parse-exprs` are converted to parse functions
and passed to `any` in the returned function's body.  See `any`.
raw docstring

at-end?clj

(at-end?)

Returns true if no more input is left to be read; false otherwise.

Returns true if no more input is left to be read; false otherwise.
raw docstring

attemptclj

(attempt parse-fn)

Tries to match the input at the current position with the provided parse function. If the parse function matches successfully, the matched text is returned and the input cursor advances by the length of the matched text. Otherwise a nil is returned and the current position in the input remains unchanged.

Tries to match the input at the current position with the provided
parse function. If the parse function matches successfully, the matched
text is returned and the input cursor advances by the length of the
matched text. Otherwise a nil is returned and the current position
in the input remains unchanged.
raw docstring

attempt_cljmacro

(attempt_ parse-expr)

Creates and returns a parse function that calls attempt when it is invoked. The argument parse-expr is converted to a parse function and passed to attempt in the returned function's body. See attempt.

Creates and returns a parse function that calls `attempt` when it is
invoked. The argument `parse-expr` is converted to a parse function
and passed to `attempt` in the returned function's body.  See `attempt`.
raw docstring

auto-trim-ifclj

(auto-trim-if)

Automatically trim the leading input text if :auto-trim option is set to true.

Automatically trim the leading input text if :auto-trim option is set to true.
raw docstring

auto-trim-offclj

(auto-trim-off)

Turns off the auto-trim option.

Turns off the auto-trim option.
raw docstring

auto-trim-onclj

(auto-trim-on)

Turns on auto-trim feature that cleans trailing white-space, comments or whatever the custom ws-reader if any is spe

Turns on auto-trim feature that cleans trailing white-space, comments
or whatever the custom ws-reader if any is spe
raw docstring

back-to-markclj

(back-to-mark mark)

Resets the positional parameters to a previously set mark.

Resets the positional parameters to a previously set mark.
raw docstring

betweenclj

(between start-fn parse-fn end-fn)

Applies the supplied start-fn, parse-fn and end-fn functions and returns the result of parse-fn. This is typically used to parse content enclosed by some delimiters on either side.

Applies the supplied start-fn, parse-fn and end-fn functions and returns
the result of parse-fn. This is typically used to parse content enclosed by
some delimiters on either side.
raw docstring

blk-cmtclj

(blk-cmt beg end)

Reads and returns a block comment as specified by the begin and end markers. Throws an exception if the specified block-comment doesn't occur at the current position.

Reads and returns a block comment as specified by the begin and end
markers.  Throws an exception if the specified block-comment doesn't
occur at the current position.
raw docstring

blk-cmt?clj

(blk-cmt? beg end)

Similar to blk-cmt but returns a nil instead of throwing an exception in case of a match failure.

Similar to blk-cmt but returns a nil instead of throwing an exception
in case of a match failure.
raw docstring

bracesclj

(braces parse-fn)

Returns the result of applying specifed parse function to text that is in between the opening and closing braces '{' and '}'

Returns the result of applying specifed parse function to text that is
in between the opening and closing braces '{' and '}'
raw docstring

build-treeclj

(build-tree nodes)

chrclj

(chr ch)

If the next character in the input matches the specified character ch, returns it; otherwise throws an exception.

If the next character in the input matches the specified character ch,
returns it; otherwise throws an exception.
raw docstring

chr-clj

(chr- ch)

Same as chr but with auto-trimming turned off for the following input

Same as chr but with auto-trimming turned off for the following input
raw docstring

chr-inclj

(chr-in chars)

If the next character in the input matches any character in the specified string or character collection, the matching character is returned. Otherwise throws an exception.

If the next character in the input matches any character in the specified
string or character collection, the matching character is returned.
Otherwise throws an exception.
raw docstring

chr-in-clj

(chr-in- chars)

Same as chr-in but with auto-trimming turned off for the following input

Same as chr-in but with auto-trimming turned off for the following input
raw docstring

decimalclj

(decimal)

Parses a decimal value and returns a Double.

Parses a decimal value and returns a Double.
raw docstring

default-optionsclj


dq-strclj

(dq-str)

Parses a double-quoted string and returns the matched string (minus the quotes)

Parses a double-quoted string and returns the matched string (minus the quotes)
raw docstring

eval-exprclj

(eval-expr & args)

Parses and evaluates an expression in infix notation. Args: expression-string followed by parser options. See parse function for details.

Parses and evaluates an expression in infix notation.
Args: expression-string followed by parser options.  See parse function for details.
raw docstring

eval-expr-treeclj

(eval-expr-tree ptree)

Evaluates the parse tree returned by expr parse function.

Evaluates the parse tree returned by expr parse function.
raw docstring

expectclj

(expect expected-msg parse-fn)

Customize error message; if the specified parse function doesn't match the current input text, the error message of the parse exception will include the specified custom expected-message.

Customize error message; if the specified parse function doesn't match
the current input text, the error message of the parse exception will include
the specified custom expected-message.
raw docstring

expect_cljmacro

(expect_ expected-msg parse-expr)

Creates and returns a parse function that calls expect when it is invoked. The argument parse-expr is converted to a parse function and passed to expect in the returned function's body. See expect.

Creates and returns a parse function that calls `expect` when it is
invoked. The argument `parse-expr` is converted to a parse function
and passed to `expect` in the returned function's body.  See `expect`.
raw docstring

exprclj

(expr)

Parses expressions and returns the parse tree as nested vectors.

Parses expressions and returns the parse tree as nested vectors.
raw docstring

get-default-op-fn-mapclj

(get-default-op-fn-map)

get-default-opsclj

(get-default-ops)

get-optclj

(get-opt k)
(get-opt k d)

Returns the value for parser option k; if the optional default value parameter d is specified, its value is returned if the option k is not set in parser options.

Returns the value for parser option k; if the optional default value
parameter d is specified, its value is returned if the option k is not set
in parser options.
raw docstring

has-priority?clj

(has-priority? op1 op2)

init-operatorsclj

(init-operators operators)

integerclj

(integer)

Parses a long integer value and returns a Long.

Parses a long integer value and returns a Long.
raw docstring

la-strsclj

(la-strs la-pf-vec)

lexemeclj

(lexeme parse-fn)

Applies the specified parse function for current input text, consumes any following whitespace, comments and returns the result of the parse function application.

Applies the specified parse function for current input text, consumes any
following whitespace, comments and returns the result of the parse function
application.
raw docstring

lexeme_cljmacro

(lexeme_ parse-expr)

Creates and returns a parse function that calls lexeme when it is invoked. The argument parse-expr is converted to a parse function and passed to lexeme in the returned function's body. See lexeme.

Creates and returns a parse function that calls `lexeme` when it is
invoked. The argument `parse-expr` is converted to a parse function
and passed to `lexeme` in the returned function's body.  See `lexeme`.
raw docstring

line-cmtclj

(line-cmt beg)

Reads and returns a line comment as specified by the begin marker. Throws an exception if the specified block-comment doesn't occur at the current position.

Reads and returns a line comment as specified by the begin marker.
Throws an exception if the specified block-comment doesn't occur at the
current position.
raw docstring

line-cmt?clj

(line-cmt? beg)

Similar to line-cmt but returns a nil instead of throwing an exception in case of a match failure.

Similar to line-cmt but returns a nil instead of throwing an exception
in case of a match failure.
raw docstring

line-posclj

(line-pos)

Returns [line column] vector representing the current cursor position of the parser

Returns [line column] vector representing the current cursor position
of the parser
raw docstring

line-pos-strclj

(line-pos-str)

Returns line position in a descriptive string.

Returns line position in a descriptive string.
raw docstring

look-aheadclj

(look-ahead la-pf-vec)

Takes a collection of look-ahead-string and parse-function pairs and applies the first parse function that follows the matching look-ahead-string and returns the result, or throws a parse exception if the parse function fails.

If none of the look-ahead strings match the current text, an exception is thrown.

To specify a default parse function, provide an empty string as look-ahead and the default parse function at the end of the argument list.

Args: [la-str-1 parse-fn-1 la-str-2 parse-fn-2 ...]

Takes a collection of look-ahead-string and parse-function pairs and applies
the first parse function that follows the matching look-ahead-string  and
returns the result, or throws a parse exception if the parse function fails.

If none of the look-ahead strings match the current text, an exception is thrown.

To specify a default parse function, provide an empty string as look-ahead and
the default parse function at the end of the argument list.

Args: [la-str-1 parse-fn-1 la-str-2 parse-fn-2 ...]
raw docstring

look-ahead*clj

(look-ahead* la-pf-vec)

Same as look-ahead, but consumes the matching look-ahead string before applying the corresponding parse function.

Same as look-ahead, but consumes the matching look-ahead string before
applying the corresponding parse function. 
raw docstring

mark-posclj

(mark-pos)

Returns the current positional parameters of the parser.

Returns the current positional parameters of the parser.
raw docstring

multi*clj

(multi* parse-fn)

Matches zero or more occurrences of text accepted by the provided parse function and returns the results in a vector.

Matches zero or more occurrences of text accepted by the provided parse 
function and returns the results in a vector.
raw docstring

multi*_cljmacro

(multi*_ parse-expr)

Creates and returns a parse function that calls multi* when it is invoked. The argument parse-expr is converted to a parse function and passed to multi* in the returned function's body. See multi*.

Creates and returns a parse function that calls `multi*` when it is
invoked. The argument `parse-expr` is converted to a parse function
and passed to `multi*` in the returned function's body.  See `multi*`.
raw docstring

multi+clj

(multi+ parse-fn)

Matches one or more occurrences of text accepted by the provided parse function and returns the results in a vector. If the parse function doesn't match even once, an exception is thrown.

Matches one or more occurrences of text accepted by the provided parse 
function and returns the results in a vector. If the parse function doesn't 
match even once, an exception is thrown.
raw docstring

multi+_cljmacro

(multi+_ parse-expr)

Creates and returns a parse function that calls multi+ when it is invoked. The argument parse-expr is converted to a parse function and passed to multi+ in the returned function's body. See multi+.

Creates and returns a parse function that calls `multi+` when it is
invoked. The argument `parse-expr` is converted to a parse function
and passed to `multi+` in the returned function's body.  See `multi+`.
raw docstring

next-textclj

(next-text)

no-trimclj

(no-trim parse-fn)

Similar to with-trim-off, but takes a function as a parameter instead of the body

Similar to with-trim-off, but takes a function as a parameter instead of
the body
raw docstring

no-trim-nlclj

(no-trim-nl parse-fn)

Turns off automatic trimming of newline characters (as part of white-space) and executes the specified function. The earlier auto-trim options are restored at the end of execution of the specified function.

Turns off automatic trimming of newline characters (as part of white-space)
and executes the specified function. The earlier auto-trim options are restored
at the end of execution of the specified function.
raw docstring

no-trim-nl_cljmacro

(no-trim-nl_ parse-expr)

Creates and returns a parse function that calls no-trim-nl when it is invoked. The argument parse-expr is converted to a parse function and passed to no-trim-nl in the returned function's body. See no-trim-nl.

Creates and returns a parse function that calls `no-trim-nl` when it is
invoked. The argument `parse-expr` is converted to a parse function
and passed to `no-trim-nl` in the returned function's body.  See `no-trim-nl`.
raw docstring

no-trim_cljmacro

(no-trim_ parse-expr)

Creates and returns a parse function that calls no-trim when it is invoked. The argument parse-expr is converted to a parse function and passed to no-trim in the returned function's body. See no-trim.

Creates and returns a parse function that calls `no-trim` when it is
invoked. The argument `parse-expr` is converted to a parse function
and passed to `no-trim` in the returned function's body.  See `no-trim`.
raw docstring

numberclj

(number)

Matches an integral or non-integral numeric value. While the function decimal also matches both integer and non-integer values, it always returns a Double; where as number returns Long for integers and Double for non-integers.

Matches an integral or non-integral numeric value. While the function 
decimal also matches both integer and non-integer values, it always
returns a Double; where as number returns Long for integers and Double
for non-integers.
raw docstring

op-mapclj

(op-map)

operatorclj

(operator)

optclj

(opt parse-fn)
(opt parse-fn default-val)

Same as attempt, but accepts a default value argument to return in case the specified parse function fails. Useful for matching optional text.

Same as attempt, but accepts a default value argument to return in case the
specified parse function fails.  Useful for matching optional text.
raw docstring

opt_cljmacro

(opt_ parse-expr)
(opt_ parse-expr default-val)

Creates and returns a parse function that calls opt when it is invoked. The argument parse-expr is converted to a parse function and passed to opt in the returned function's body. See opt.

Creates and returns a parse function that calls `opt` when it is
invoked. The argument `parse-expr` is converted to a parse function
and passed to `opt` in the returned function's body.  See `opt`.
raw docstring

paren-exprclj

(paren-expr)

parensclj

(parens parse-fn)

Returns the result of applying specifed parse function to text that is in between the opening and closing parentheses '(' and ')'

Returns the result of applying specifed parse function to text that is
in between the opening and closing parentheses '(' and ')'
raw docstring

parseclj

(parse parse-fn input-str & opts)

This function triggers off the parsing of the provided input string using the specified parse function. The following parser options may be provided to alter the default behavior of the parser: :blk-cmt-delim - vector specifying start and end of block-comment markers :line-cmt-start - string specifying the begin marker of a line comment :ws-regex - regular expression for matching (non-comment) white space :auto-trim - whether to automatically remove the leading whitespace/comments at the current position in the input text or immediately after a parse action. :word-regex - regular expression for matching words :operators - a vector of vector of operators in the decreasing order of precedence; see get-default-ops function for an example. :op-fn-map - a map of operator and the function to call for that operator when evaluating expressions :eof - if true, the parse function must consume the entire input text

Args: parse-fn - parse function to apply input-str - input text to be parsed opts - key value options (listed above)

This function triggers off the parsing of the provided input string using
the specified parse function. The following parser options may be provided 
to alter the default behavior of the parser:
:blk-cmt-delim - vector specifying start and end of block-comment markers
:line-cmt-start - string specifying the begin marker of a line comment
:ws-regex - regular expression for matching (non-comment) white space
:auto-trim - whether to automatically remove the leading whitespace/comments
at the current position in the input text or immediately after a parse action.
:word-regex - regular expression for matching words
:operators - a vector of vector of operators in the decreasing order of
precedence; see get-default-ops function for an example.
:op-fn-map - a map of operator and the function to call for that operator when
evaluating expressions
:eof - if true, the parse function must consume the entire input text

Args:
parse-fn  - parse function to apply
input-str - input text to be parsed
opts      - key value options (listed above)
raw docstring

parse_cljmacro

(parse_ parse-expr input-str & opts)

Similar to the parse function, but takes a parse expression instead of a parse function as its first argument. The parse expression is any clojure expression that performs parsing by calling built-in or custom parse functions. See the documentation for parse

Similar to the `parse` function, but takes a parse expression instead of a
parse function as its first argument. The parse expression is any clojure
expression that performs parsing by calling built-in or custom parse
functions. See the documentation for `parse`
raw docstring

parser-initclj

(parser-init input-str)
(parser-init input-str opts)

Initializes the parser state with the specified input string and options.

Initializes the parser state with the specified input string and options.
raw docstring

read-chclj

(read-ch)
(read-ch is-no-auto-trim)

Reads and return the next input character. Throws an exception if the current position is at the end of the input.

Reads and return the next input character. Throws an exception if the
current position is at the end of the input.
raw docstring

read-ch-in-setclj

(read-ch-in-set char-set)
(read-ch-in-set char-set is-no-auto-trim)

Reads and returns the next character if it matches any of the characters specified in the provided set. An exception is thrown otherwise. The optional is-no-auto-trim argument may be used to specify whether or not to apply auto-trim after reading the next character.

Reads and returns the next character if it matches any of the characters
specified in the provided set.  An exception is thrown otherwise.  The
optional is-no-auto-trim argument may be used to specify whether or not
to apply auto-trim after reading the next character.
raw docstring

read-nclj

(read-n n)

Reads and returns an n-character string at the current position.

Reads and returns an n-character string at the current position.
raw docstring

read-reclj

(read-re re)
(read-re re grp)

Reads the string matching the specified regular expression. If a match-group is specified, the corresponding text is returned; otherwise the entire matched text is returned.

Reads the string matching the specified regular expression. If a match-group
is specified, the corresponding text is returned; otherwise the entire 
matched text is returned.
raw docstring

read-toclj

(read-to s)

The parser skips to the position where the text contains the string specified by s. The string itself is not consumed, that is the cursor is positioned at the beginning of the match. If the specified string is not found, cursor position does not change and a parse exception is thrown.

The parser skips to the position where the text contains the string
specified by s. The string itself is not consumed, that is the cursor is
positioned at the beginning of the match. If the specified string is not
found, cursor position does not change and a parse exception is thrown.
raw docstring

read-to-reclj

(read-to-re re)

Reads and returns text upto but not including the text matched by the specified regular expression. If the specified regular expression doesn't occur in the remaining input text, an exception is thrown.

Reads and returns text upto but not including the text matched by the
specified regular expression. If the specified regular expression doesn't
occur in the remaining input text, an exception is thrown.
raw docstring

read-wsclj

(read-ws)

Reads whitespace (including comments) using a whitespace reader based on parser options. If the :ws-reader option is not set, a default whitespace reader based on other parser options such as :ws-regex, :blk-cmt-delim and :line-cmt-start will be used. Returns the whitespace read.

Reads whitespace (including comments) using a whitespace reader based
on parser options. If the :ws-reader option is not set, a default whitespace
reader based on other parser options such as :ws-regex, :blk-cmt-delim and
:line-cmt-start will be used. Returns the whitespace read.
raw docstring

regexclj

(regex re)
(regex re grp)

Returns the text matched by the specified regex; If a group is specified, the returned text is for that group only. In either case, the cursor is advanced by the length of the entire matched text (group 0)

Returns the text matched by the specified regex; If a group is specified,
the returned text is for that group only. In either case, the cursor is
advanced by the length of the entire matched text (group 0)
raw docstring

sep-byclj

(sep-by fld-fn fld-sep-fn)
(sep-by fld-fn fld-sep-fn rec-sep-fn)

Reads a record using the specified field, field-separator and record-separator parse functions. If no record-separator is specified, a newline character is used as record separator. Returns the fields of the record in a vector.

Reads a record using the specified field, field-separator and 
record-separator parse functions.  If no record-separator is specified, 
a newline character is used as record separator. Returns the fields of the 
record in a vector.
raw docstring

sep-by*clj

(sep-by* parse-fn sep-fn stop-fn)

Differs from sep-by in that it allows zero matches of parse-fn before stop-fn; Unlike sep-by, stop-fn must match -- not optional.

Differs from sep-by in that it allows zero matches of parse-fn before stop-fn;
Unlike sep-by, stop-fn must match -- not optional.
raw docstring

sep-restclj

(sep-rest parse-fn sep-fn)

seriesclj

(series & parse-fns)

Applies a sequence of parse functions and returns their results in a vector. Each successfull match by the parse function advances the cursor. If any of the parse functions fails, an exception is thrown.

Applies a sequence of parse functions and returns their results in
a vector. Each successfull match by the parse function advances the cursor.
If any of the parse functions fails, an exception is thrown.
raw docstring

series_cljmacro

(series_ & parse-exprs)

Creates and returns a parse function that calls series when it is invoked. The arguments parse-exprs are converted to parse functions and passed to series in the returned function's body. See series.

Creates and returns a parse function that calls `series` when it is
invoked. The arguments `parse-exprs` are converted to parse functions
and passed to `series` in the returned function's body.  See `series`.
raw docstring

set-blk-cmt-optsclj

(set-blk-cmt-opts beg end)

Sets block comment begin and end markers.

Sets block comment begin and end markers.
raw docstring

set-line-cmt-optsclj

(set-line-cmt-opts beg)

Sets line comment begin marker.

Sets line comment begin marker.
raw docstring

set-optclj

(set-opt k v)

Sets parser option k to value v

Sets parser option k to value v
raw docstring

set-ws-readerclj

(set-ws-reader ws-reader)

This sets the white-space parser to be used when auto-trim is set. If this is specified, it overrides the options set by set-blk-cmt-opts, set-line-cmt-opts and set-ws-regex options.

This sets the white-space parser to be used when auto-trim is set.
If this is specified, it overrides the options set by set-blk-cmt-opts,
set-line-cmt-opts and set-ws-regex options.
raw docstring

set-ws-regexclj

(set-ws-regex ws-re)

Sets the regular expression to be used for matching non-comment white-space.

Sets the regular expression to be used for matching non-comment white-space.
raw docstring

skip-overclj

(skip-over s)

Finds the specified string s in the input and skips over it. If the string is not found, a parse exception is thrown.

Finds the specified string s in the input and skips over it. If the string
is not found, a parse exception is thrown.
raw docstring

skip-over-reclj

(skip-over-re re)

Reads and returns text upto and including the text matched by the specified regular expression. If the specified regular expression doesn't occur in the remaining input text, an exception is thrown.

Reads and returns text upto and including the text matched by the
specified regular expression. If the specified regular expression doesn't
occur in the remaining input text, an exception is thrown.
raw docstring

sq-bracketsclj

(sq-brackets parse-fn)

Returns the result of applying specifed parse function to text that is in between the opening and closing square brackets '[' and ']'

Returns the result of applying specifed parse function to text that is
in between the opening and closing square brackets '[' and ']'
raw docstring

sq-strclj

(sq-str)

Parses a single-quoted string and returns the matched string (minus the quotes)

Parses a single-quoted string and returns the matched string (minus the quotes)
raw docstring

starts-with-re?clj

(starts-with-re? re)

Returns a boolean value indicating whether the specified regular expression matches the input at the current position.

Returns a boolean value indicating whether the specified regular expression
matches the input at the current position.
raw docstring

starts-with?clj

(starts-with? s)

Returns a boolean value indicating whether the current input text matches the specified string.

Returns a boolean value indicating whether the current input text matches
the specified string.
raw docstring

stateclj

(state)

stringclj

(string s)

If the input matches the specified string, the string is returned. Otherwise, a parse exception is thrown.

If the input matches the specified string, the string is
returned. Otherwise, a parse exception is thrown.
raw docstring

string-inclj

(string-in strings)

Returns the longest string from the provided strings that matches text at the current position. Throws an exception if none of the strings match.

Returns the longest string from the provided strings that matches text
at the current position. Throws an exception if none of the strings match.
raw docstring

string-in-ordclj

(string-in-ord strings)

Returns the first string from the provided strings that matches text at the current position. Throws an exception if none of the strings match.

Returns the first string from the provided strings that matches text
at the current position. Throws an exception if none of the strings match.
raw docstring

throw-exclj

(throw-ex)
(throw-ex msg)

Throws an exception; this is usually called to indicate a match failure in a parse function.

Throws an exception; this is usually called to indicate a match
failure in a parse function.
raw docstring

timesclj

(times n parse-fn)

Applies the provided parse function exactly n times and returns the results of applications of the function in a vector.

Applies the provided parse function exactly n times and returns the
results of applications of the function in a vector.
raw docstring

times_cljmacro

(times_ n parse-expr)

Creates and returns a parse function that calls times when it is invoked. The argument parse-expr is converted to a parse function and passed to times in the returned function's body. See times.

Creates and returns a parse function that calls `times` when it is
invoked. The argument `parse-expr` is converted to a parse function
and passed to `times` in the returned function's body.  See `times`.
raw docstring

unexpectedclj

(unexpected expected)
(unexpected actual expected)

Creates a message string for unexpected input exception.

Creates a message string for unexpected input exception.
raw docstring

with-trim-offcljmacro

(with-trim-off & body)

Executes the provided body with auto-trim option set to false. The earlier value of the auto-trim option is restored after executing the body.

Executes the provided body with auto-trim option set to false.  The earlier
value of the auto-trim option is restored after executing the body.
raw docstring

with-trim-oncljmacro

(with-trim-on & body)

Executes the provided body with auto-trim option set to true. The earlier value of the auto-trim option is restored after executing the body.

Executes the provided body with auto-trim option set to true.  The earlier
value of the auto-trim option is restored after executing the body.
raw docstring

wordclj

(word w)

Returns the specified word if the word occurs at the current position in the input text; an exception is thrown otherwise.

Returns the specified word if the word occurs at the current position in
the input text; an exception is thrown otherwise.
raw docstring

word-inclj

(word-in str-coll)
(word-in str-coll word-reader)

Returns the first word from the provided words that matches text at the current position. Throws an exception if none of the words match. An optional word-reader parse-function may be provided to read words.

Returns the first word from the provided words that matches text
at the current position. Throws an exception if none of the words match.
An optional word-reader parse-function may be provided to read words.
raw docstring

wsclj

(ws)
(ws bcb bce lcb wsre)

Matches white space (including comments) at the current position. The optional parameters bcb, bce, lcb and wsre specify block-comment-begin, block-comment-end, line-comment-begin and white-space-regex respectively. If they are not specified here, the options set for the parser are used. Throws an exception if white space doesn't occur at the current position.

Matches white space (including comments) at the current position.  The
optional parameters bcb, bce, lcb and wsre specify block-comment-begin,
block-comment-end, line-comment-begin and white-space-regex respectively.
If they are not specified here, the options set for the parser are used.
Throws an exception if white space doesn't occur at the current position.
raw docstring

ws?clj

(ws? & args)

Similar to ws except that a nil value is returned instead of throwing an exception in case of a match failure.

Similar to ws except that a nil value is returned instead of throwing
an exception in case of a match failure.
raw docstring

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

× close