#nom #utilities #collection

nom-supreme

A collection of excellent utilities for nom

19 releases (7 breaking)

0.8.0 Apr 21, 2022
0.7.0 Mar 5, 2022
0.6.0 Aug 24, 2021
0.4.4 Jun 8, 2021
0.4.1 Dec 23, 2020

#234 in Parser implementations

Download history 40085/week @ 2024-07-21 32516/week @ 2024-07-28 27923/week @ 2024-08-04 22433/week @ 2024-08-11 24987/week @ 2024-08-18 27261/week @ 2024-08-25 25255/week @ 2024-09-01 23497/week @ 2024-09-08 25158/week @ 2024-09-15 32278/week @ 2024-09-22 24539/week @ 2024-09-29 30807/week @ 2024-10-06 30085/week @ 2024-10-13 35566/week @ 2024-10-20 28882/week @ 2024-10-27 38166/week @ 2024-11-03

133,465 downloads per month
Used in 89 crates (34 directly)

MPL-2.0 license

125KB
1.5K SLoC

nom-supreme

A collection of utilities for a superior nom experience. See docs.rs for details.


lib.rs:

A collection of excellent utilities for nom, including:

  • ParserExt, a trait which makes available many common nom parser combinators as postfix methods, to complement those already available on nom::Parser.
  • ErrorTree, a nom error which retains as much information and context as possible about the details of the failed parse, with an excellent indenting formatter for printing these failures. Integrates with the extra error features of nom-supreme.
  • Improved [tag] parsers, which attach the mismatched the error in the event of a parse failure, similar to char.
  • parse_separated_terminated, the perfected folding parser for building parse loops.
  • final_parser, which serves as a bridge between nom-style IResult parsers and more typical rust results. It decorates a nom parser, requiring it to parse all of its input, not return Incomplete. It also uses an ExtractContext trait to convert the error locations in nom errors, which are usually just suffixes of the input, into more useful locations, such as a line and column number.

Dependencies

~2MB
~42K SLoC