Liking cljdoc? Tell your friends :D

clj-antlr.common

Common functions for building and using parsers.

Common functions for building and using parsers.
raw docstring

antlr-input-streamclj

(antlr-input-stream s)

Constructs an ANTLRInputStream out of a String, Reader, or InputStream.

Constructs an ANTLRInputStream out of a String, Reader, or InputStream.
sourceraw docstring

case-insensitive-input-streamclj

(case-insensitive-input-stream input)

Constructs an ANTLRInputStream out of a string. Presents all characters to the lexer as lowercase, but getText methods will return the original string. Adapted from https://gist.github.com/sharwell/9424666. Consumes memory proportional to the input string.

Constructs an ANTLRInputStream out of a string. Presents all characters to
the lexer as lowercase, but getText methods will return the original string.
Adapted from https://gist.github.com/sharwell/9424666. Consumes memory
proportional to the input string.
sourceraw docstring

childclj

(child node i)

Get a specific child in a tree.

Get a specific child in a tree.
sourceraw docstring

child-countclj

(child-count node)

How many children does a node have?

How many children does a node have?
sourceraw docstring

childrenclj

(children node)

Returns the children of a RuleNode.

Returns the children of a RuleNode.
sourceraw docstring

error-listenerclj

(error-listener)

A stateful error listener which accretes parse errors in a deref-able structure. Deref returns nil if there are no errors; else a sequence of heterogenous maps, depending on what debugging information is available.

A stateful error listener which accretes parse errors in a deref-able
structure. Deref returns nil if there are no errors; else a sequence of
heterogenous maps, depending on what debugging information is available.
sourceraw docstring

fast-keywordclj

(fast-keyword s)

Like (keyword str), but faster.

Like (keyword str), but faster.
sourceraw docstring

fast-keyword-cacheclj

A map of strings to keywords.

A map of strings to keywords.
sourceraw docstring

first-ruleclj

(first-rule grammar)

The name of the first rule in a grammar.

The name of the first rule in a grammar.
sourceraw docstring

input-streamclj

(input-stream s)
(input-stream s opts)

Constructs an inputstream. With no options, calls antlr-input-stream. With options:

:case-sensitive? true calls antlr-input-stream, false calls case-insensitive-input-stream

Constructs an inputstream. With no options, calls antlr-input-stream. With
options:

:case-sensitive? true calls antlr-input-stream,
                 false calls case-insensitive-input-stream
sourceraw docstring

multi-hinted-letclj/smacro

(multi-hinted-let [name expr classes] & body)

A let expression which expands into multiple type-hinted bodies with runtime type dispatch provided by instanceof. Thanks to amalloy, as usual!

A let expression which expands into multiple type-hinted bodies with runtime
type dispatch provided by instanceof. Thanks to amalloy, as usual!
sourceraw docstring

parentclj

(parent node)

The parent of a node.

The parent of a node.
sourceraw docstring

parse-errorclj

(parse-error errors tree)

Constructs a new ParseError exception with a list of errors.

Constructs a new ParseError exception with a list of errors.
sourceraw docstring

parser-rule-nameclj

(parser-rule-name parser index)

Given a parser and an integer rule index, returns the string name of that rule. Negative indexes map to nil.

Given a parser and an integer rule index, returns the string name of that
rule. Negative indexes map to nil.
sourceraw docstring

recognition-exception->mapclj

(recognition-exception->map e)

Converts a RecognitionException to a nice readable map.

Converts a RecognitionException to a nice readable map.
sourceraw docstring

rule-indexclj

(rule-index grammar rule-name)

Given a grammar and the name of a rule, returns the integer index of that rule.

Given a grammar and the name of a rule, returns the integer index of that
rule.
sourceraw docstring

textclj

(text node)

The text of a node.

The text of a node.
sourceraw docstring

token-nameclj

(token-name parser index)

Given a parser and a token index, returns the string name of that token. Negative indexes map to nil.

Given a parser and a token index, returns the string name of that token.
Negative indexes map to nil.
sourceraw docstring

tokensclj

(tokens lexer)

A token stream taken from a lexer.

A token stream taken from a lexer.
sourceraw docstring

visitclj

(visit visitor node)

Visits a node with a visitor.

Visits a node with a visitor.
sourceraw docstring

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

× close