Liking cljdoc? Tell your friends :D

clj-antlr.interpreted

Interpreter for antlr grammars. Slightly slower, but easier to use than the full antlr compilation process.

Interpreter for antlr grammars. Slightly slower, but easier to use than the
full antlr compilation process.
raw docstring

grammarclj

(grammar grammar-or-filename)

Loads a Grammar from a string filename, or a string containing a grammar inline. If the string contains newlines, interprets as a grammar string; otherwise as a filename.

Loads a Grammar from a string filename, or a string containing a grammar
inline. If the string contains newlines, interprets as a grammar string;
otherwise as a filename.
sourceraw docstring

lexer-interpreterclj

(lexer-interpreter grammar)

Builds a new lexer interpreter around an empty input stream. Used to initialize our parser, which will later reset and re-use this object for speed.

Builds a new lexer interpreter around an empty input stream. Used to
initialize our parser, which will later reset and re-use this object
for speed.
sourceraw docstring

load-string-grammarclj

(load-string-grammar string)

Loads a grammar from a string.

Loads a grammar from a string.
sourceraw docstring

parseclj

(parse grammar opts input)

Given a Grammar, options, and text to parse (a string, reader, or inputstream), returns a map of the :parser, :tree, and :errors for the input.

Given a Grammar, options, and text to parse (a string, reader, or
inputstream), returns a map of the :parser, :tree, and :errors for the
input.
sourceraw docstring

parserclj

(parser filename)
(parser lexer-filename parser-filename)

Construct a new parser.

Construct a new parser.
sourceraw docstring

parser-interpreterclj

(parser-interpreter grammar lexer)

Builds a new parser interpreter around a given grammar and lexer.

Builds a new parser interpreter around a given grammar and lexer.
sourceraw docstring

reset-lexer-interpreter!clj

(reset-lexer-interpreter! lexer error-listener input-stream)

Prepares a lexer interpreter for a new run.

Prepares a lexer interpreter for a new run.
sourceraw docstring

reset-parser-interpreter!clj

(reset-parser-interpreter! parser error-listener token-stream)

Prepares a parser interpreter for a new run.

Prepares a parser interpreter for a new run.
sourceraw docstring

rule-indexclj

(rule-index grammar rule-name)

Finds the index of the given rule in a grammar. Throws if the rule is not present in the given grammar. Example

(rule-index my-grammar :address)

Finds the index of the given rule in a grammar. Throws if the rule is not
present in the given grammar. Example

(rule-index my-grammar :address)
sourceraw docstring

singlethreaded-parserclj

(singlethreaded-parser lexer-grammar grammar)

Creates a new single-threaded parser for a grammar.

Creates a new single-threaded parser for a grammar.
sourceraw docstring

toolclj

(tool)

Construct a new ANTLR tool

Construct a new ANTLR tool
sourceraw docstring

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

× close