Liking cljdoc? Tell your friends :D

blancas.kern.lexer

The Kern Lexer library.

The Kern Lexer library.
raw docstring

anglesclj

(angles p)

Applies parser p skiping over surrounding angle brackets. Calls (trim) after the opening bracket, after p, and after the closing bracket.

Applies parser p skiping over surrounding angle brackets.
Calls (trim) after the opening bracket, after p, and after
the closing bracket.
sourceraw docstring

basic-defclj

The most basic record; for use to build new styles.

The most basic record; for use to build new styles.
sourceraw docstring

bool-litclj

(bool-lit)

Parses a boolean value, true or false, comparing according to :case-sensitive. Calls (trim) afterward.

Parses a boolean value, true or false, comparing according to
:case-sensitive. Calls (trim) afterward.
sourceraw docstring

bracesclj

(braces p)

Applies parser p skiping over surrounding braces. Calls (trim) after the opening brace, after p, and after the closing brace.

Applies parser p skiping over surrounding braces.
Calls (trim) after the opening brace, after p, and after
the closing brace.
sourceraw docstring

bracketsclj

(brackets p)

Applies parser p skiping over surrounding brackets. Calls (trim) after the opening bracket, after p, and after the closing bracket.

Applies parser p skiping over surrounding brackets.
Calls (trim) after the opening bracket, after p, and after
the closing bracket.
sourceraw docstring

c-styleclj

Lexical settings for C-style languages.

Lexical settings for C-style languages.
sourceraw docstring

char-litclj

(char-lit)

Parses a character literal according to the :type setting. The common syntax is a symbol in single quotes with the usual escape codes. Calls (trim) afterwards.

The following styles add escaped characters:

:basic \b \t \n \f \r ' " / :C :basic + \0ooo \0xnn \unnnnnnnn :Haskell :basic + \nnnn \onnnn \xnnnn :Java :basic + \0ooo \unnnn :Shell :basic + \0ooo \0xnn \unnnnnnnn

Parses a character literal according to the :type setting. The
common syntax is a symbol in single quotes with the usual
escape codes. Calls (trim) afterwards.

The following styles add escaped characters:

:basic   \b \t \n \f \r \' \" \/
:C       :basic + \0ooo \0xnn \unnnnnnnn
:Haskell :basic + \nnnn \onnnn \xnnnn
:Java    :basic + \0ooo \unnnn
:Shell   :basic + \0ooo \0xnn \unnnnnnnn
sourceraw docstring

colonclj

(colon)

Parses a single colon; then calls (trim).

Parses a single colon; then calls (trim).
sourceraw docstring

commaclj

(comma)

Parses a single comma; then calls (trim).

Parses a single comma; then calls (trim).
sourceraw docstring

comma-sepclj

(comma-sep)

Applies parser p zero or more times, skiping over separating commas. Calls (trim) after each p and comma.

Applies parser p zero or more times, skiping over separating
commas. Calls (trim) after each p and comma.
sourceraw docstring

comma-sep1clj

(comma-sep1)

Applies parser p one or more times, skiping over separating commas. Calls (trim) after each p and comma.

Applies parser p one or more times, skiping over separating
commas. Calls (trim) after each p and comma.
sourceraw docstring

dec-litclj

(dec-lit)

Parses a decimal number as Long or BigInt depending on the magnitude or if it ends with N. Calls (trim) afterward.

Parses a decimal number as Long or BigInt depending on the
magnitude or if it ends with N. Calls (trim) afterward.
sourceraw docstring

dotclj

(dot)

Parses a single dot; then calls (trim).

Parses a single dot; then calls (trim).
sourceraw docstring

fieldclj

(field cs)

Parses an unquoted text field terminated by any character in cs. Calls (trim) afterwards.

Parses an unquoted text field terminated by any character
in cs. Calls (trim) afterwards.
sourceraw docstring

float-litclj

(float-lit)

Parses a floating-point number as Double or BigDecimal depending on the magnitude or if it ends with M. It cannot start with a period. The first period found must be followed by at least one digit. Calls (trim) afterward.

Parses a floating-point number as Double or BigDecimal depending
on the magnitude or if it ends with M. It cannot start with a
period. The first period found must be followed by at least one
digit. Calls (trim) afterward.
sourceraw docstring

haskell-styleclj

Lexical settings for Haskell-style languages.

Lexical settings for Haskell-style languages.
sourceraw docstring

hex-litclj

(hex-lit)

Parses a hexadecimal number as Long or BigInt depending on the magnitude or if it ends with N. Calls (trim) afterward.

Parses a hexadecimal number as Long or BigInt depending on the
magnitude or if it ends with N. Calls (trim) afterward.
sourceraw docstring

identifierclj

(identifier)

Parses an unquoted string suitable for an identifier or a name. The start of the input is defined by :identifier-start, and subsequent symbols by :identtifier-letter. It will check that the parsed value not be in the list of :reserved-names, if any, comparing according to :case-sensitive. Calls (trim) afterwards.

Parses an unquoted string suitable for an identifier or a name.
The start of the input is defined by :identifier-start, and
subsequent symbols by :identtifier-letter. It will check that
the parsed value not be in the list of :reserved-names, if any,
comparing according to :case-sensitive. Calls (trim) afterwards.
sourceraw docstring

java-styleclj

Lexical settings for Java-style languages.

Lexical settings for Java-style languages.
sourceraw docstring

lexemeclj

(lexeme p)

Applies parser p, then calls (trim).

Applies parser p, then calls (trim).
sourceraw docstring

make-parsersclj

(make-parsers rec)

Returns a function map that corresponds to the customization values of the input record, whose fields are as follows:

:type Identifies the type of settings. :comment-start A string that marks the start of a block comment. :comment-end A string that marks the end of a block comment. :comment-line A string that marks the start of a line comment. :nested-comments Whether the lexer accepts nested comments; a boolean. :identifier-start A parser for the start of an identifier. :identifier-letter A parser for the subsequent characters of an identifier. :reserved-names A list of names that cannot be identifiers. :case-sensitive Whether tokens are case-sensitive; a boolean. :line-continuation A parser for the token that precedes the new line. :trim-newline Treats newline character(s) as whitespace. :leading-sign Whether numbers accept an optional leading sign.

Returns a function map that corresponds to the customization
values of the input record, whose fields are as follows:

:type                Identifies the type of settings.
:comment-start       A string that marks the start of a block comment.
:comment-end         A string that marks the end of a block comment.
:comment-line        A string that marks the start of a line comment.
:nested-comments     Whether the lexer accepts nested comments; a boolean.
:identifier-start    A parser for the start of an identifier.
:identifier-letter   A parser for the subsequent characters of an identifier.
:reserved-names      A list of names that cannot be identifiers.
:case-sensitive      Whether tokens are case-sensitive; a boolean.
:line-continuation   A parser for the token that precedes the new line.
:trim-newline        Treats newline character(s) as whitespace.
:leading-sign        Whether numbers accept an optional leading sign.
sourceraw docstring

new-lineclj

(new-line)

Parses a new line, UNIX or Windows style; then calls (trim).

Parses a new line, UNIX or Windows style; then calls (trim).
sourceraw docstring

nil-litclj

(nil-lit)

Parses a null value, nil or null, comparing according to :case-sensitive. Calls (trim) afterward.

Parses a null value, nil or null, comparing according to
:case-sensitive. Calls (trim) afterward.
sourceraw docstring

none-ofclj

(none-of)

Succeeds if the next character is not in the supplied string. Calls (trim) afterwards.

Succeeds if the next character is not in the supplied string.
Calls (trim) afterwards.
sourceraw docstring

oct-litclj

(oct-lit)

Parses an octal number as Long or BigInt depending on the magnitude or if it ends with N. Calls (trim) afterward.

Parses an octal number as Long or BigInt depending on the
magnitude or if it ends with N. Calls (trim) afterward.
sourceraw docstring

one-ofclj

(one-of cs)

Succeeds if the next character is in the supplied string. Calls (trim) afterwards.

Succeeds if the next character is in the supplied string.
Calls (trim) afterwards.
sourceraw docstring

parensclj

(parens p)

Applies parser p skiping over surrounding parenthesis. Calls (trim) after the opening paren, after p, and after the closing paren.

Applies parser p skiping over surrounding parenthesis.
Calls (trim) after the opening paren, after p, and after
the closing paren.
sourceraw docstring

semiclj

(semi)

Parses a single semicolon; then calls (trim).

Parses a single semicolon; then calls (trim).
sourceraw docstring

semi-sepclj

(semi-sep)

Applies parser p zero or more times, skiping over separating semicolons. Calls (trim) after each p and semicolon.

Applies parser p zero or more times, skiping over separating
semicolons. Calls (trim) after each p and semicolon.
sourceraw docstring

semi-sep1clj

(semi-sep1)

Applies parser p one or more times, skiping over separating semicolons. Calls (trim) after each p and semicolon.

Applies parser p one or more times, skiping over separating
semicolons. Calls (trim) after each p and semicolon.
sourceraw docstring

shell-styleclj

Lexical settings for shell-style languages.

Lexical settings for shell-style languages.
sourceraw docstring

space-asciiclj

source

string-litclj

(string-lit)

Parses a string literal according to the :type setting. The common syntax is any number of symbols in double quotes with the usual escape codes. Calls (trim) afterward.

The following styles add escaped characters:

:basic \b \t \n \f \r ' " / :C :basic + \0ooo \0xnn \unnnnnnnn :Haskell :basic + \nnnn \onnnn \xnnnn :Java :basic + \0ooo \unnnn :Shell :basic + \0ooo \0xnn \unnnnnnnn

Parses a string literal according to the :type setting. The
common syntax is any number of symbols in double quotes
with the usual escape codes. Calls (trim) afterward.

The following styles add escaped characters:

:basic   \b \t \n \f \r \' \" \/
:C       :basic + \0ooo \0xnn \unnnnnnnn
:Haskell :basic + \nnnn \onnnn \xnnnn
:Java    :basic + \0ooo \unnnn
:Shell   :basic + \0ooo \0xnn \unnnnnnnn
sourceraw docstring

symclj

(sym c)

Parses a single character c. Compares according to :case-sensitive. Calls (trim) afterwards.

Parses a single character c. Compares according to
:case-sensitive. Calls (trim) afterwards.
sourceraw docstring

tokenclj

(token cs)
(token cs & more)

Parses a specific string, not necessarily delimited. If more than one are given it will try each choice in turn. Compares according to :case-sensitive. Calls (trim) afterwards.

Parses a specific string, not necessarily delimited. If more
than one are given it will try each choice in turn. Compares
according to :case-sensitive. Calls (trim) afterwards.
sourceraw docstring

trimclj

(trim)

Skips over any whitespace, including comments (if defined), at the start of the input. Whether newline characters are removed as whitespace is configured by :trim-newline. When that setting is true, the setting :line-continuation is activated.

Skips over any whitespace, including comments (if defined), at
the start of the input. Whether newline characters are removed
as whitespace is configured by :trim-newline. When that setting
is true, the setting :line-continuation is activated.
sourceraw docstring

with-parserscljmacro

(with-parsers rec & body)

Binds the parser vars in the kern.lexer namespace to the values in rec.

Binds the parser vars in the kern.lexer namespace to the values in rec.
sourceraw docstring

wordclj

(word cs)
(word cs & more)

Parses a specific string; must be delimited by any character not parsed by :identifier-letter. If more than one are given it will try each choice in turn. Compares according to :case-sensitive. Calls (trim) afterwards.

Parses a specific string; must be delimited by any character not
parsed by :identifier-letter. If more than one are given it will
try each choice in turn. Compares according to :case-sensitive.
Calls (trim) afterwards.
sourceraw docstring

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

× close