Liking cljdoc? Tell your friends :D

instacheck.grammar


filter-altsclj

(filter-alts weights)

Remove paths for weights that are not alternations (or ordered alternations). Only alternations (igen/freq) are currently affected by the weights so remove everything else.

Remove paths for weights that are not alternations (or ordered
alternations). Only alternations (igen/freq) are currently
affected by the weights so remove everything else.
raw docstring

grammar-seqclj

(grammar-seq grammar)

Return a map of all grammar paths to grammar nodes.

Return a map of all grammar paths to grammar nodes.
raw docstring

load-grammarclj

(load-grammar ebnf)

Takes an EBNF grammar test string and returns an instacheck grammar (via parser->grammar).

Takes an EBNF grammar test string and returns an instacheck
grammar (via parser->grammar).
raw docstring

parse-grammar-commentsclj

(parse-grammar-comments grammar & [tx])

Takes a grammar, reads edn maps from comments in the grammar and returns a map of grammar paths to parsed comment data. Multiple comments with edn maps at the same path will be merged into a single map. If the optional tx function is provided it will be applied to the merge maps values.

This requires a patched version of instaparse to retain the comments in the grammar on :comments keys.

Takes a grammar, reads edn maps from comments in the grammar and
returns a map of grammar paths to parsed comment data. Multiple
comments with edn maps at the same path will be merged into a single
map. If the optional tx function is provided it will be applied to
the merge maps values.

This requires a patched version of instaparse to retain the comments
in the grammar on :comments keys.
raw docstring

parser->grammarclj

(parser->grammar parser)

Takes a instaparse parser and returns an instacheck grammar: the :grammar value from the parser with a metadata map containing the start rule (:start).

Takes a instaparse parser and returns an instacheck grammar: the
:grammar value from the parser with a metadata map containing the
start rule (:start).
raw docstring

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

× close