-
Notifications
You must be signed in to change notification settings - Fork 71
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 get terminator of AtLeastOnceUntil without lookahead and parsing twice? #121
Comments
Interesting! The code that you have looks like the best equivalent but I agree it’s ugly. Feels like an API design hole on my part. I was using Changing |
|
oh yeah, it shouldn't be a difficult code tweak - the current code throws away the |
Just gonna throw out In the scenario I'm facing, I could be encountering zero or more. |
Could also go with like |
Any progress on the naming of this API? Might be good to just pick one and stick with it. |
I haven't yet had time to think through the options carefully, sorry! If you're up for it, I'd be very happy to receive a PR with a concrete proposal which we can iterate. Otherwise it'll have to wait until I do have time |
I ended up going with This has shipped in v3.2.0, which is working its way through the Nuget indexing pipeline as I write, should be up in about five mins. Thanks for your interest! |
I'm trying to port a parser written with
nom
in Rust to a C# parser with Pidgin. There are some cases where I need the result of a terminator fromAtLeastOnceUntil
. Withnom
, I can extract both the first result, and the terminator like soSomewhat equivalently I've written up this parser with Pidgin
While both of the terminator parsers have to run O(t) iterations where t is the length of
title
, it doesn't need to re-parse the version in the Rust version. Is it possible to achieve this with Pidgin or is this pretty much the best way to do it?The text was updated successfully, but these errors were encountered: