A basic vector-driven parser generator. This type of parser generator is not intended to be used directly, though you can. It is used as an intermediary format for other formats, such as the string-based and data-based grammars.
A basic vector-driven parser generator. This type of parser generator is not intended to be used directly, though you can. It is used as an intermediary format for other formats, such as the string-based and data-based grammars.
(create-parser tree)
Create a parser based on a vector-driven combinator tree. For example:
{:foobar [:chain [:ref :foo] [:ref :bar]]
:foo [:literal "foo"]
:bar [:with-name :bax
[:choice [:literal "bar"]
[:literal "baz"]]]}
Each vector is expanded into the combinator invocation, referenced
by the first keyword. If the keyword does not have a namespace,
crustimoney.combinators
is assumed. Maps are walked as well,
wrapped in crustimoney.combinators/grammar
. Other data is left
as-is.
Create a parser based on a vector-driven combinator tree. For example: {:foobar [:chain [:ref :foo] [:ref :bar]] :foo [:literal "foo"] :bar [:with-name :bax [:choice [:literal "bar"] [:literal "baz"]]]} Each vector is expanded into the combinator invocation, referenced by the first keyword. If the keyword does not have a namespace, `crustimoney.combinators` is assumed. Maps are walked as well, wrapped in `crustimoney.combinators/grammar`. Other data is left as-is.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close