1 unstable release

Uses old Rust 2015

0.12.0 Mar 5, 2017

#21 in #removing

Download history 24/week @ 2023-12-04 40/week @ 2023-12-11 79/week @ 2023-12-18 29/week @ 2023-12-25 18/week @ 2024-01-01 79/week @ 2024-01-08 78/week @ 2024-01-15 91/week @ 2024-01-22 77/week @ 2024-01-29 39/week @ 2024-02-05 136/week @ 2024-02-12 162/week @ 2024-02-19 159/week @ 2024-02-26 98/week @ 2024-03-04 168/week @ 2024-03-11 122/week @ 2024-03-18

550 downloads per month
Used in 11 crates (2 directly)

MIT/Apache

53KB
720 lines

Adapted from nom by removing the IResult::Incomplete variant which:

  • we don't need,
  • is an unintuitive footgun when working with non-streaming use cases, and
  • more than doubles compilation time.

Whitespace handling strategy

As (sy)nom is a parser combinator library, the parsers provided here and that you implement yourself are all made up of successively more primitive parsers, eventually culminating in a small number of fundamental parsers that are implemented in Rust. Among these are punct! and keyword!.

All synom fundamental parsers (those not combined out of other parsers) should be written to skip over leading whitespace in their input. This way, as long as every parser eventually boils down to some combination of fundamental parsers, we get correct whitespace handling at all levels for free.

For our use case, this strategy is a huge improvement in usability, correctness, and compile time over nom's ws! strategy.

Dependencies

~60KB