Fork me on GitHub
#instaparse
<
2021-02-02
>
Vincent Cantin05:02:40

Was there any attempt to use Instaparse to propose auto-completion at the end of a string which is only matching the beginning side of a grammar? Does Instaparse have any support for this kind of use case?

Vincent Cantin06:02:30

For example, assuming that we have the grammar:

my-grammar = 'he' | 'helsinky' | 'hello'
and we have the string "he", that matches the grammar already. It would be nice if Instaparse could say that the next characters for a grammar match could also be "lsinky" or "llo" .

Vincent Cantin06:02:07

I am using Instaparse heavily in the project https://github.com/green-coder/girouette

Vincent Cantin06:02:05

Maybe a new "suggestion" mode could be added in Instaparse, where the resulting parse tree could contain some special nodes where we could query some suggestions of letter insertion.