-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Add a many_till
combinator
#176
Comments
I may be misunderstanding you, but wouldn't such a combinator be the equivalent of:
You can see this being used in Zesterer's foo implementation. |
I should've explained more clearly. The docs for
I guess the description for the parser you suggested would be: So while the If I'm not mistaken, it looks like the examples in the nom docs and for the foo implementation |
So really, you want something like
i.e: lazily consume |
Yes, exactly 🙂 |
Right. In that case, I'll probably close this in favour of #181 because it contains a little more discussion about these. |
I propose a combinator that repeats the first parser until the second one matches.
nom has an equivalent combinator:
https://docs.rs/nom/7.1.1/nom/multi/fn.many_till.html
The output type would be
(Vec<A>, B)
,A
andB
being the output types of the given parsers.The text was updated successfully, but these errors were encountered: