The heart of the parsing mechanism. Contains the trampoline structure, the parsing dispatch function, the nodes where listeners are stored, the different types of listeners, and the loop for executing the various listeners and parse commands that are on the stack.
The heart of the parsing mechanism. Contains the trampoline structure, the parsing dispatch function, the nodes where listeners are stored, the different types of listeners, and the loop for executing the various listeners and parse commands that are on the stack.
(code-point->chars code-point)
Takes a Unicode code point, and returns a string of one or two chars.
Takes a Unicode code point, and returns a string of one or two chars.
(full-listener-exists? tramp node-key)
Tests whether node already has a listener or full-listener
Tests whether node already has a listener or full-listener
(full-result-exists? tramp node-key)
Tests whether node has a full-result
Tests whether node has a full-result
(listener-exists? tramp node-key)
Tests whether node already has a listener
Tests whether node already has a listener
(make-tramp grammar text)
(make-tramp grammar text segment)
(make-tramp grammar text fail-index node-builder)
(make-tramp grammar text segment fail-index node-builder)
(merge-meta obj metamap)
A variation on with-meta that merges the existing metamap into the new metamap, rather than overwriting the metamap entirely.
A variation on with-meta that merges the existing metamap into the new metamap, rather than overwriting the metamap entirely.
(node-get tramp node-key)
Gets node if already exists, otherwise creates one
Gets node if already exists, otherwise creates one
(parse-total-after-fail grammar start text fail-index partial? node-builder)
(parses-total-after-fail grammar start text fail-index partial? node-builder)
(push-full-listener tramp node-key listener)
Pushes a listener into the trampoline's node. Schedules notification to listener of all existing full results.
Pushes a listener into the trampoline's node. Schedules notification to listener of all existing full results.
(push-listener tramp node-key listener)
Pushes a listener into the trampoline's node. Schedules notification to listener of all existing results. Initiates parse if necessary
Pushes a listener into the trampoline's node. Schedules notification to listener of all existing results. Initiates parse if necessary
(push-message tramp listener result)
Pushes onto stack a message to a given listener about a result
Pushes onto stack a message to a given listener about a result
(push-negative-listener tramp creator negative-listener)
Pushes a thunk onto the trampoline's negative-listener stack.
Pushes a thunk onto the trampoline's negative-listener stack.
(push-result tramp node-key result)
Pushes a result into the trampoline's node. Categorizes as either result or full-result. Schedules notification to all existing listeners of result (Full listeners only get notified about full results)
Pushes a result into the trampoline's node. Categorizes as either result or full-result. Schedules notification to all existing listeners of result (Full listeners only get notified about full results)
(push-stack tramp item)
Pushes an item onto the trampoline's stack
Pushes an item onto the trampoline's stack
(RepFullListener results-so-far
n-results-so-far
parser
m
n
prev-index
node-key
tramp)
(RepListener results-so-far
n-results-so-far
parser
m
n
prev-index
node-key
tramp)
(result-exists? tramp node-key)
Tests whether node has a result or full-result
Tests whether node has a result or full-result
(run tramp)
(run tramp found-result?)
Executes the stack until exhausted
Executes the stack until exhausted
(single-char-code-at text index)
Returns the int value of a single char at the given index, assuming we're looking for up to 0xFFFF (the maximum value for a UTF-16 single char).
Returns the int value of a single char at the given index, assuming we're looking for up to 0xFFFF (the maximum value for a UTF-16 single char).
(step stack)
Executes one thing on the stack (not threadsafe)
Executes one thing on the stack (not threadsafe)
(sub-sequence text start)
(sub-sequence text start end)
Like clojure.core/subs but consumes and returns a CharSequence
Like clojure.core/subs but consumes and returns a CharSequence
(text->segment text)
Converts text to a Segment, which has fast subsequencing
Converts text to a Segment, which has fast subsequencing
(unicode-code-point-at text index)
Returns the unicode code point representing one or two chars at the given index.
Returns the unicode code point representing one or two chars at the given index.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close