Packages

package completion

Type Members

  1. trait CompletionSupport extends Parsers with CompletionTypes

    CompletionSupport adds completion capability to parsers.

    CompletionSupport adds completion capability to parsers.

    When mixed-in, this trait extends the scala.util.parsing.combinator.Parsers.Parser type with the abstract method com.nexthink.utils.parsing.combinator.completion.CompletionSupport.Parser#completions which returns a instance of com.nexthink.utils.parsing.combinator.completion.CompletionTypes.Completions for a certain input.

    Combinators are overloaded to cover the additional completion aspect, so that no change is required in the grammar.

    Note that the derived trait com.nexthink.utils.parsing.combinator.completion.RegexCompletionSupport can be mixed-in with RegexParsers to automatically obtain completion behavior for string literals.

    A set of additional operators allow defining completions and specifying structural properties of completions (tag, score, meta, etc.) for a Parser.

  2. trait CompletionTypes extends AnyRef

    Collection of data types allowing definition of structured parser completions.

    Collection of data types allowing definition of structured parser completions. A Completions instance can contain multiple CompletionSets instances. A CompletionSet provides a set of Completion entries and is tagged with a CompletionTag.

    Sets allow structuring the completion entries into groups, each group tagged with a label (plus optional description and meta, the latter allowing e.g. encoding visual attributes for the set). Sets also feature a score, which defines the order between sets within the Completions instance.

    Each Completion entry within a set has a value, a score and a meta: the score allows ordering the entries within a set, and the meta can e.g. be used to assign a representation style for a particular completion entry.

    Note that specifying tags and sets is optional: if no tag is specified upon creation, Completions instances create a unique default set with an empty tag.

Ungrouped