NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #4321 most downloaded on crates.io
A byte-oriented, zero-copy, parser combinators library (fork for proposals for v8)
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
One column per quarter.
Unnamed parser syntax: warning, this is a breaking change. With this new syntax, the macro combinators do not generate functions anymore, they create…
works with rustc 1.0.0-dev (81e2396c7 2015-03-19) (built 2015-03-19)
Incomplete(_), but if more granularity is mandatory, Needed can be matched tooalt! can pass the result of the parser to a closuretake_* 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!peek! macro: matches the future input but does not consume itlength_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 parsernamed! 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 syntaxmap!, map_opt! and map_res! to combine a parser with a normal function, transforming the input directly, or returning an Option or Resultis_a! is now working properlyo! macro does less than chain!, so it has been removedfold0! and fold1! macros were too complex and awkward to use, the many* combinators will be useful for most uses for nowFrom nom8
pub use bits::*; into root namespace (epage/nom-experiment#52)error::error_to_u32 (epage/nom-experiment#54)aFrom 0.1.0
nom::character::char in favor of nom::bytes::one_of (epage/nom-experiment#45)IntoOutput to allow reconstructing state (epage/nom-experiment#57)ParseError::from_char in favor of ContextError (epage/nom-experiment#45)error::make_error and error::append_error (epage/nom-experiment#55)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)From 0.1.0
InputTakeAtPosition for StreamingMoved input traits from nom to nom::input (epage/nom-experiment#13)
nom to nom::input (epage/nom-experiment#13)InputTakeAtPosition functions to be explicit about complete vs streaming policyimpl ExtendInto for char (epage/nom-experiment#19)Parser were moved to combinator module (epage/nom-experiment#4)character::is_* functions in favor of AsChar (epage/nom-experiment#25)*::complete::* and *::streaming::* parsers in favor of merged ones (epage/nom-experiment#28)map, flat_map, map_parser in favor of Parser functions (epage/nom-experiment#37)map_res, map_opt, complete, verify, value, recognize_with_value, context, dbg_dmp in favor of Parser methods (epage/nom-experiment#40)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)Streaming<I> input type (epage/nom-experiment#28)
character and renamed to their rust types (epage/nom-experiment#38)one_of, none_of from character to bytes as they are more general (epage/nom-experiment#44)character::anychar to bytes::any with a more generic return type (epage/nom-experiment#44)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)Parser::map_res, Parser::map_opt, Parser::complete, Parser::verify, Parser::value, Parser::with_recognized, Parser::context, Parser::dbg_err (epage/nom-experiment#40)u8 / char / ranges of the prior, functions, and tuples of the prior whereever FindToken is accepted (epage/nom-experiment#44)take_while, take_till with FindToken trait (epage/nom-experiment#44)character::is_* functions to AsChar that were missing (epage/nom-experiment#2)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)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)many_m_n, count (Geal/nom#1545)Your coding agent can read these notes before it upgrades. Set up the MCP server →