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

How to stop consuming after find reserved word #224

Open
nhan-dang opened this issue Oct 24, 2022 · 0 comments
Open

How to stop consuming after find reserved word #224

nhan-dang opened this issue Oct 24, 2022 · 0 comments

Comments

@nhan-dang
Copy link

I have a question: I have defined a grammar looks like this in general:
value to value:
value = ~r"[\w]+(_? [\w]+)"
to = "to"
So if i parse: "place the shelves to higher place", i will give the IncompleteParseError, because the value also consume the entire string. I want to have it split into 2 values: "place the shelves" and "higher place". Is there any way i can define this? Thank you

@nhan-dang nhan-dang changed the title Stop consuming after find reserved word How to stop consuming after find reserved word Oct 24, 2022
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

1 participant