PackageTrack
Sign in Get early access

nom8

A byte-oriented, zero-copy, parser combinators library (fork for proposals for v8)

0.2.0 6.1M downloads/mo #4096 most downloaded on crates.io epage/nom-experimental

What this package is like to depend on

Last release 4 years ago

no release in 18 months

Too new to tell

only 2 dated releases

Nearly every release is documented

notes for 2 of 2 stable releases

Nothing withdrawn

no release was ever pulled

4 years old

2 releases · first in 2022

0 releases in the last 12 months

see the full history below

Release timeline

2 releases · Dec 2022 to Dec 2022
2023 2024 2025 2026
Release Pre-release

Releases

latest 2
  1. 0.2.0 27 Dec 2022
    Release notes

    works with rustc 1.0.0-dev (81e2396c7 2015-03-19) (built 2015-03-19)

    Thanks

    • Ryman for the AsBytes implementation
    • jag426 and jaredly for documentation fixes
    • eternaleye on #rust IRC for his help on the new macro syntax

    Changed

    • the AsBytes trait improves readability, no more b"...", but "..." instead
    • Incomplete will now hold either Needed;;Unknown, or Needed::Size(u32). Matching on Incomplete without caring for the value is done with Incomplete(_), but if more granularity is mandatory, Needed can be matched too
    • alt! can pass the result of the parser to a closure
    • the take_* macros changed behaviour, the default case is now not to consume the separator. The macros have been renamed as follows: take_until! -> take_until_and_consume!, take_until_and_leave! -> take_until!, take_until_either_and_leave! -> take_until_either!, take_until_either! -> take_until_either_and_consume!

    Added

    • peek! macro: matches the future input but does not consume it
    • length_value! macro: the first argument is a parser returning a n that can cast to usize, then applies the second parser n times. The macro has a variant with a third argument indicating the expected input size for the second parser
    • benchmarks are available at https://github.com/Geal/nom_benchmarks
    • more documentation
    • Unnamed parser syntax: warning, this is a breaking change. With this new syntax, the macro combinators do not generate functions anymore, they create blocks. That way, they can be nested, for better readability. The named! macro is provided to create functions from parsers. Please be aware that nesting parsers comes with a small cost of compilation time, negligible in most cases, but can quickly get to the minutes scale if not careful. If this happens, separate your parsers in multiple subfunctions.
    • named!, closure! and call! macros used to support the unnamed syntax
    • map!, map_opt! and map_res! to combine a parser with a normal function, transforming the input directly, or returning an Option or Result

    Fixed

    • is_a! is now working properly

    Removed

    • the o! macro does less than chain!, so it has been removed
    • the fold0! and fold1! macros were too complex and awkward to use, the many* combinators will be useful for most uses for now
    Open source →
    Release notes

    Breaking Changes

    From nom8

    • Removed pub use bits::*; into root namespace (epage/nom-experiment#52)
    • Removed error::error_to_u32 (epage/nom-experiment#54)a

    From 0.1.0

    • Removed nom::character::char in favor of nom::bytes::one_of (epage/nom-experiment#45)
    • Changed IntoOutput to allow reconstructing state (epage/nom-experiment#57)

    Deprecations

    • Deprecated ParseError::from_char in favor of ContextError (epage/nom-experiment#45)
    • Deprecated error::make_error and error::append_error (epage/nom-experiment#55)

    Feature

    • nom::input::Stateful for attaching state to the input type (epage/nom-experiment#58)
    • nom::input::Located for tracking the input's location, along with Parser::span and Parser::with_span to capture it (epage/nom-experiment#58)

    Fixes

    From 0.1.0

    • Generalize InputTakeAtPosition for Streaming
    Open source →
  2. 0.1.0 23 Dec 2022
    Release notes

    Breaking Changes

    • Moved input traits from nom to nom::input (epage/nom-experiment#13)
    • Renamed InputTakeAtPosition functions to be explicit about complete vs streaming policy
    • Removed impl ExtendInto for char (epage/nom-experiment#19)
    • Combinator structs returned by Parser were moved to combinator module (epage/nom-experiment#4)
    • Tweaks were made to what input traits are needed for various types

    Deprecations

    • character::is_* functions in favor of AsChar (epage/nom-experiment#25)
    • *::complete::* and *::streaming::* parsers in favor of merged ones (epage/nom-experiment#28)
    • Freestanding map, flat_map, map_parser in favor of Parser functions (epage/nom-experiment#37)
    • Freestanding map_res, map_opt, complete, verify, value, recognize_with_value, context, dbg_dmp in favor of Parser methods (epage/nom-experiment#40)
    • Freestanding into in favor of Parser::output_into and Parser::err_into (epage/nom-experiment#37, epage/nom-experiment#48)
    • is_a with take_while1 thanks to new FindToken impls (epage/nom-experiment#44)
    • is_not with take_till1 thanks to new FindToken impls (epage/nom-experiment#44)
    • satisfy with one_of thanks to new FindToken impls (epage/nom-experiment#44)
    • Parser::and, Parser::or in favor of impl Parser for <tuples> and alt (epage/nom-experiment#37)
    • tuple, pair parser in favor of using tuples (epage/nom-experiment#42, epage/nom-experiment#46)

    Features

    • Merged streaming/complete parsers, opting in to streaming with the Streaming<I> input type (epage/nom-experiment#28)
      • Merged ASCII float parsers moved to character and renamed to their rust types (epage/nom-experiment#38)
      • Moved one_of, none_of from character to bytes as they are more general (epage/nom-experiment#44)
      • Moved character::anychar to bytes::any with a more generic return type (epage/nom-experiment#44)
    • Allow generic context in errors (epage/nom-experiment#49)
    • Parser::by_ref to allow using &mut impl Parser as a Parser (epage/nom-experiment#34, epage/nom-experiment#41)
    • impl Parser for <tuples> as an alternative to tuple(()) (epage/nom-experiment#42)
    • impl Parser for (char|u8|&str|&[u8]) as an alternative to one_of, char, and tag (epage/nom-experiment#47, epage/nom-experiment#50)
    • Add Parser::map_res, Parser::map_opt, Parser::complete, Parser::verify, Parser::value, Parser::with_recognized, Parser::context, Parser::dbg_err (epage/nom-experiment#40)
    • Allow u8 / char / ranges of the prior, functions, and tuples of the prior whereever FindToken is accepted (epage/nom-experiment#44)
    • Generalize take_while, take_till with FindToken trait (epage/nom-experiment#44)
    • Add character::is_* functions to AsChar that were missing (epage/nom-experiment#2)

    Fixes

    • Change fill, iterator, bits::bits, and bits::byutes from taking a function to taking a Parser (epage/nom-experiment#10, epage/nom-experiment#11, epage/nom-experiment#120)
    • Allow byte arrays of any size (epage/nom-experiment#14)
    • length_data and length_value now auto-detect complete/streaming, before were streaming only (epage/nom-experiment#28)
    • hex_u32 is now generic over input (epage/nom-experiment#32)
    • Clamp allocations in many_m_n, count (Geal/nom#1545)

    Documentation

    • Pulled loose markdown into rustdoc (epage/nom-experiment#1)
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive