(collect-atoms tokens)
Collects all options, commands, and arguments referred to in usage patterns
Collects all options, commands, and arguments referred to in usage patterns
(compile-long-options-re long-options pattern-parsing?)
Generates regexes to unambiguously capture long options, for usage pattern parsing or for argv matching.
Generates regexes to unambiguously capture long options, for usage pattern parsing or for argv matching.
(compile-short-options-re short-options pattern-parsing?)
Generates regexes to unambiguously capture short options, for usage pattern parsing or for argv matching.
Generates regexes to unambiguously capture short options, for usage pattern parsing or for argv matching.
(end-group stack [choice & more-choices :as choices])
Updates stack with a fully-formed group.
Updates stack with a fully-formed group.
Adds line number to usage token, and replaces option name(s) with option object(s).
Adds line number to usage token, and replaces option name(s) with option object(s).
(find-option name-key name arg lnum options)
Returns the corresponding option object in the 'options' sequence, or generates a new one.
Returns the corresponding option object in the 'options' sequence, or generates a new one.
(make-choices group-type children)
Generates the children of a ::choice node, where 'group-type' is either ::optional or ::required.
Generates the children of a ::choice node, where 'group-type' is either ::optional or ::required.
Generates syntax tree node from token and adds it to stack.
Generates syntax tree node from token and adds it to stack.
Counts occurences of a particular element in a syntax subtree (none, one, or several).
Counts occurences of a particular element in a syntax subtree (none, one, or several).
(parse usage-lines options)
Parses usage block, with a sequence of options from the options block to resolve pattern ambiguities.
Parses usage block, with a sequence of options from the options block to resolve pattern ambiguities.
(partial-long-re-str names re-str [c & more-c])
Creates partial match pattern for long option name.
Creates partial match pattern for long option name.
(syntax-tree tokens)
Generates syntax tree from token sequence.
Generates syntax tree from token sequence.
(tokenize-pattern string shorts-re longs-re)
Extracts all tokens from usage pattern specification string; 'shorts/longs-re' are used to appropriately tokenize all possibly ambiguous options.
Extracts all tokens from usage pattern specification string; 'shorts/longs-re' are used to appropriately tokenize all possibly ambiguous options.
(tokenize-pattern-lines lines options)
Helper function for 'tokenize-patterns'.
Helper function for 'tokenize-patterns'.
(tokenize-patterns lines options-block-options)
Generates a sequence of tokens for a sequence of usage specification lines joined by ' | '.
Generates a sequence of tokens for a sequence of usage specification lines joined by ' | '.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close