-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fork with completion support #91
Comments
Wow, that's interesting! Does this have a performance impact for people that don't use the completion support at all? Yes, that would be an interesting PR (for v1.1.0, the object MyParsers extends RegexParsers with CompletionSupport That way it would be opt-in, and not as invasive. |
agree. if that's possible, it would be much better |
Thanks for your feedback, I also agree, this is what I wanted to do initially actually. I'll investigate further along those lines. |
Hi there, I've just created a PR (#101) with the completion aspects now separate from the main code and exposed in a object MyParsers extends RegexParsers with RegexCompletionSupport This Also in the case this can be considered, thanks for letting me know what is required in terms of copyright notice, licensing etc. Thanks! |
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.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.
The text was updated successfully, but these errors were encountered: