Skip to content

Fork with completion support #91

Open
@jchapuis

Description

@jchapuis

Hi all,

I've created a fork which adds completion support to the library, which allows providing as-you-type autocomplete or TAB-completion experiences: https://github.com/jchapuis/scala-parser-combinators.git

In a nutshell, additions are:

  • def completions(in: Input): Completions method which allows querying the list of possible completions for a certain input. This returns a structured type which can contain tagged and ranked completions.
  • implementations of this method for all the combinators
  • a new set of operators which allows tagging and ranking elements of the grammar

I have also implemented fuzzy matching completion parsers which are not present in the fork right now but that I could potentially integrate.

Would you consider this as a possible PR? It's of course extending the "traditional" functionality of parser combinators, so it add extra complexity and testing requirements that are maybe not desirable for the core library. At any rate I'm creating this issue also to to point out that building completion experiences using parser-combinators is feasible and actually works well with the functional nature of these grammars.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions