Liking cljdoc? Tell your friends :D

clj-antlr.coerce


sexprclj

(sexpr t p g opts)
source

tokens->sexprclj

(tokens->sexpr parser tokens)

Takes a Parser and a CommonTokenStream and emits a lazy sequence of (:SOME_TYPE "str") pairs for the tokens in the stream.

Takes a Parser and a CommonTokenStream and emits a lazy sequence of
(:SOME_TYPE "str") pairs for the tokens in the stream.
sourceraw docstring

tree->sexprclj

(tree->sexpr m)

Takes a map with a :tree node, a :parser (required for interpreting the indices of rule nodes as rule names), and a :grammar (required for interpreting alternate production names), and returns a lazily evaluated tree, where each tree is either a string, or a sequence composed of a rule name followed by that rule's child trees. For instance:

(:json (:object "{" (:pair "age" ":" (:value "53"))))

Takes a map with a :tree node, a :parser (required for interpreting the
indices of rule nodes as rule names), and a :grammar (required for interpreting
alternate production names), and returns a lazily evaluated tree,
where each tree is either a string, or a sequence composed of a rule name
followed by that rule's child trees. For instance:

(:json (:object "{" (:pair "age" ":" (:value "53"))))
sourceraw docstring

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

× close