scala / scala/scala-parser-combinators

Fork with completion support

Open
#91 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
679
Forks
131
Avg merge
8h 25m
Merged PRs (30d)
3

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed fork at https://github.com/jchapuis/scala-parser-combinators.git and its completion-support changes. Assess the combinator implementations, tagging and ranking operators, and available tests before determining whether the feature fits the core library. Done requires an agreed scope and a defined testing plan for completion behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.