instaparse icon indicating copy to clipboard operation
instaparse copied to clipboard

[Feature Request] Partial parses return set of expected tokens

Open mtnygard opened this issue 6 years ago • 1 comments

I'm using Instaparse for an interactive command line REPL. I never really know when the user is done with a whole command, thanks to the ability to nest values (e.g., maplike inputs that contain the same terminator character that the command ends with.)

So I can read characters from input and build up a string but I'm not sure when to pass it to Instaparse unless I duplicate the nesting semantic outside the grammar in my reading code.

Partial parses are ideal, since I can see if any of the partials are my root production rule. As I'm doing that, I was thinking how nice it would be to offer the user a set of hints for the next allowed input.

mtnygard avatar Aug 11 '19 23:08 mtnygard

What facilities would you need in the library to make that possible?

Engelberg avatar Aug 16 '19 04:08 Engelberg