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

usability: address changes introduced with Complete* and many* combinators #839

Open
Geal opened this Issue Oct 6, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@Geal
Owner

Geal commented Oct 6, 2018

references:

  • #764 nom4: issues with slices and many0/many1/fold_many
  • #766 nom4: take_while broken ?
  • #768 Update breaks 11-bit parser- always Incomplete
  • #790 many0 returns Incomplete in weird cases
  • #795 CompleteByteSlice/CompleteStr are invasive and make parsers not reusable

There are especially issues around transforming to and from the Complete* types, when reusing parsers or passing the results through flat_map! and other combinators.

There's also the problem of making sure basic parser functions work with all types. As an example, the hex_u32, be_* and le_* only work on &[u8], not CompleteByteSlice

@zaphar

This comment has been minimized.

zaphar commented Oct 10, 2018

Just want to say that this particular issue is a blocker for my moving a project over to nom4. I was really excited to see the improvements in error handling in nom4 but this change and the invasiveness of the fix are giving me pause to finishing the conversion.

Most of the other changes are pretty mechanical and easy to do. This one does not fall in that category though.

@Geal

This comment has been minimized.

Owner

Geal commented Oct 13, 2018

@zaphar can you provide examples of code that is affected by the changes? This will help me think about the issue

@leshow

This comment has been minimized.

leshow commented Oct 14, 2018

Since my issue is mentioned, I'll add I'm blocked form upgrading from nom 2 as well. @khernyo appears to have written a PR to fix my particular problem (referenced in the issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment