instaparse

If you're not trampolining your parser, why bother getting up in the morning?
Empperi 2017-12-15T09:10:03.000190Z

is there some way in instaparse to ask for all possible grammar elements at certain point of the parse tree?

Empperi 2017-12-15T09:10:37.000187Z

meaning, I have parse result, I take a specific point in that parse tree and the would get a list of parse elements that could go there

Empperi 2017-12-15T09:10:59.000451Z

I could theoretically write an EBNF analyzer to do just this but don’t feel like it unless I have to

Empperi 2017-12-15T09:11:12.000215Z

since I think instaparse already does this somewhere under the hood and has the necessary information

Empperi 2017-12-15T09:19:54.000105Z

hmm, there is instaparse.cfg/ebnf, need look at it and if it would provide the necessary information

Empperi 2017-12-15T09:21:44.000088Z

actually it looks like it just might

aengelberg 2017-12-15T16:59:38.000066Z

@niklas.collin not sure what you're asking. what would be an example of using this functionality?

Empperi 2017-12-15T17:01:11.000107Z

Autocomplete suggestions for code editor

Empperi 2017-12-15T17:01:54.000298Z

And the result from cfg/ebnf looks ok usable

aengelberg 2017-12-15T21:06:13.000379Z

There have been a few discussions about generating data for a parser, or listing possible inputs to a parser

aengelberg 2017-12-15T21:06:19.000069Z

Not sure the best path to exposing that

aengelberg 2017-12-15T21:07:01.000480Z

are you sure ebnf is what you want? That just creates a combinator based on an EBNF spec, it doesn't generate a list of things that could go there