Skip to content
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

[Feature Request] Partial parses return set of expected tokens #195

Open
mtnygard opened this issue Aug 11, 2019 · 1 comment
Open

[Feature Request] Partial parses return set of expected tokens #195

mtnygard opened this issue Aug 11, 2019 · 1 comment

Comments

@mtnygard
Copy link

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.

@Engelberg
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants