nom
A byte-oriented, zero-copy, parser combinators library
8.0.0
672M downloads/mo
#131 most downloaded on crates.io
rust-bakery/nom
What this package is like to depend on
Last release 2 years ago
no release in 18 months
Release timing varies
gaps range from 1 weeks to 12 months
Most releases are documented
notes for 62 of 70 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
98 releases · first in 2015
0 releases in the last 12 months
see the full history below
Release timeline
98 releases · Jan 2015 to Jan 2025Releases
latest 60 of 98-
8.0.026 Jan 2025Release notes
Open source →This version represents a significant refactoring of nom to reduce the amount of code generated by parsers, and reduce the API surface. As such, it comes with some breaking changes, mostly around the move from closure based combinators to trait based ones. In practice, it means that instead of writing
combinator(arg)(input), we now writecombinator(arg).parse(input).This release also marks the introduction of the nom-language crate, which will hold tools more focused on language parsing than the rest of nom, like the
VerboseErrortype and the newly added precedence parsing combinators.Thanks
- @cky
- @5c077m4n
- @epage
- @Fumon
- @jtracey
- @OliveIsAWord
- @Xiretza
- @flier
- @cenodis
- @Shadow53
- @@jmmaa
- @terror
- @zanedp
- @atouchet
- @CMDJojo
- @ackxolotl
- @xmakro
- @tfpk
- @WhyNotHugo
- @brollb
- @smheidrich
- @glittershark
- @GuillaumeGomez
- @LeoDog896
- @fmiras
- @ttsugriy
- @McDostone
- @superboum
- @rruppy
- @thssuck
- @Chasing1020
- @thatmarkenglishguy
- @ambiso
- @boxdot
- @krtab
- @code10129
- @manunio
- @stuarth
- @mindeng
- @JonathanPlasse
- @nabilwadih
- @phoenixr-codes
- @gdennie
- @art049
- @kstrohbeck
Added
Parser::map_resParser::map_optmanyandfoldcombinators using rangesmanycan collect into other types thanVecErrorandVerboseErrorcan be converted to owned versions
Removed
nom::bits::*is no longer re-exported at the crate root. This export caused frequent confusion, since e.g.nom::complete::tagreferred tonom::bits::complete::taginstead of the much more commonly usednom::bytes::complete::tag. To migrate, change any imports ofnom::{complete::*, streaming::*, bits, bytes}tonom::bits::[...].parsecombinatorInputIter,InputTakeAtPosition,InputLength,InputTakeandSliceare now merged in theInputtrait
Changed
Parser::mapandParser::flat_mapnow take aFnMutas argument
Release notes
Open source →This versions represents a significant refactoring of nom to reduce the amount of code generated by prsers, and reduce the API surface. As such, it comes with some breaking changes, mostly around the move from closure based combinators to trait based ones. In practice, it means that instead of writing
combinator(arg)(input), we now writecombinator(arg).parse(input).This release also marks th introduction of the nom-language crate, which will hold tools more focused on language parsing than the rest of nom, like the
VerboseErrortype and the newly added precedence parsing combinators.Thanks
- @cky
- @5c077m4n
- @epage
- @Fumon
- @jtracey
- @OliveIsAWord
- @Xiretza
- @flier
- @cenodis
- @Shadow53
- @@jmmaa
- @terror
- @zanedp
- @atouchet
- @CMDJojo
- @ackxolotl
- @xmakro
- @tfpk
- @WhyNotHugo
- @brollb
- @smheidrich
- @glittershark
- @GuillaumeGomez
- @LeoDog896
- @fmiras
- @ttsugriy
- @McDostone
- @superboum
- @rruppy
- @thssuck
- @Chasing1020
- @thatmarkenglishguy
- @ambiso
- @boxdot
- @krtab
- @code10129
- @manunio
- @stuarth
- @mindeng
- @JonathanPlasse
- @nabilwadih
- @phoenixr-codes
- @gdennie
- @art049
- @kstrohbeck
Added
Parser::map_resParser::map_optmanyandfoldcombinators using rangesmanycan collect into other types thanVecErrorandVerboseErrorcan be converted to owned versions
Removed
nom::bits::*is no longer re-exported at the crate root. This export caused frequent confusion, since e.g.nom::complete::tagreferred tonom::bits::complete::taginstead of the much more commonly usednom::bytes::complete::tag. To migrate, change any imports ofnom::{complete::*, streaming::*, bits, bytes}tonom::bits::[...].parsecombinatorInputIter,InputTakeAtPosition,InputLength,InputTakeandSliceare now merged in theInputtrait
Changed
Parser::mapandParser::flat_mapnow take aFnMutas argument
-
8.0.0-beta.108 Dec 2024 pre-releaseNothing published for this version
-
8.0.0-alpha205 May 2024 pre-release -
8.0.0-alpha125 Apr 2024 pre-releaseNothing published for this version
-
7.1.315 Jan 2023Nothing published for this version
-
7.1.201 Jan 2023Release notes
Open source →Thanks
- @joubs
- @Fyko
- @LoganDark
- @darnuria
- @jkugelman
- @barower
- @puzzlewolf
- @epage
- @cky
- @wolthom
- @w1ll-i-code
Changed
- documentation fixes
- tests fixes
- limit the initial capacity of the result vector of
many_m_nto 64kiB - bits parser now accept
Parserimplementors instead of only functions
Added
- implement
Tupleparsing for the unit type as a special case - implement
ErrorConverton the unit type to make it usable as error type for bits parsers - bool parser for bits input
-
7.1.114 Mar 2022Release notes
Open source →Thanks
- @ThomasdenH
- @@SphinxKnight
- @irevoire
- @doehyunbaek
- @pxeger
- @punkeel
- @max-sixty
- @Xiretza
- @5c077m4n
- @erihsu
- @TheNeikos
- @LoganDark
- @nickelc
- @chotchki
- @ctrlcctrlv
Changed
- documentation fixes
- more examples
-
7.1.004 Nov 2021Release notes
Open source →Thanks
- @nickelc
- @Stargateur
- @NilsIrl
- @clonejo
- @Strytyp
- @schubart
- @jihchi
- @nipunn1313
- @Gungy2
- @Drumato
- @Alexhuszagh
- @Aehmlo
- @homersimpsons
- @dne
- @epage
- @saiintbrisson
- @pymongo
Changed
- documentation fixes
- Ci fixes
- the move to minimal-lexical for float parsing introduced bugs that cannot be resolved right now, so this version moves back to using the standard lib' parser. This is a performance regression*. If you have specific requirements around float parsing, you are strongly encouraged to use recognize_float and another library to convert to a f32 or f64
Added
- alt now works with 1 elment tuples
-
7.0.021 Aug 2021Release notes
Open source →This release fixes dependency compilation issues and strengthen the minimum supported Rust version (MSRV) policy. This is also the first release without the macros that were used since nom's beginning.
Thanks
- @djc
- @homersimpsons
- @lo48576
- @myrrlyn
- @RalXYZ
- @nickelc
- @cenodis
Added
take_until1combinator- more
to_ownedimplementations fail: a parser that always fail, useful as default condition in other combinators- text to number parsers: in the
character::streamingandcharacter::completemodules, there are parsers namedi8, u16, u32, u64, u128andu8 ,u16, u32, u64, u128that recognize decimal digits and directly convert to a number in the target size (checking for max int size)
Removed
- now that function combinators are the main way to write parsers, the old macro combinators are confusing newcomers. THey have been removed
- the
BitSliceinput type from bitvec has been moved into the nom-bitvec crate. nom does not depend on bitvec now - regex parsers have been moved into the nom-regex crate. nom does not depend on regex now
ErrorKind::PArseTowas not needed anymore
Changed
- relax trait bounds
- some performance fixes
split_at_position*functions should now be guaranteed panic free- the
lexical-corecrate used for float parsing has now been replaced withminimal-lexical: the new crate is faster to compile, faster to parse, and has no dependencies
Fixed
- infinite loop in
escapedcombinator many_m_nnow fails if min > max
-
7.0.0-alpha318 Aug 2021 pre-releaseNothing published for this version
-
7.0.0-alpha206 Aug 2021 pre-releaseNothing published for this version
-
7.0.0-alpha124 Jun 2021 pre-releaseNothing published for this version
-
6.2.226 Apr 2023Nothing published for this version
-
6.2.123 Jun 2021Release notes
Open source →Thanks
This release was done thanks to the hard work of (by order of appearance in the commit list):
- @homersimpsons
Fixed
- fix documentation building
-
6.2.019 Jun 2021Release notes
Open source →Thanks
This release was done thanks to the hard work of (by order of appearance in the commit list):
- @DavidKorczynski
- @homersimpsons
- @kornelski
- @lf-
- @lewisbelcher
- @ronan-d
- @weirane
- @heymind
- @marcianx
- @Nukesor
Added
- nom is now regularly fuzzed through the OSSFuzz project
Changed
- lots of documentation fixes
- relax trait bounds
- workarounds for dependency issues with bitvec and memchr
-
6.1.215 Feb 2021 -
6.1.115 Feb 2021Release notes
Open source →Thanks
This release was done thanks to the hard work of (by order of appearance in the commit list):
- @nickelc
Changed
- Fix dependenciy incompatibilities: Restrict the bitvec->funty dependency to <=1.1
-
6.1.023 Jan 2021Release notes
Open source →Thanks
This release was done thanks to the hard work of (by order of appearance in the commit list):
- @sachaarbonel
- @vallentin
- @Lucretiel
- @meiomorphism
- @jufajardini
- @neithernut
- @drwilco
Changed
- readme and documentation fixes
- rewrite of fold_many_m_n
- relax trait bounds on some parsers
- implement
std::error::ErroronVerboseError
-
6.0.124 Nov 2020Release notes
Open source →Thanks
This release was done thanks to the hard work of (by order of appearance in the commit list):
- @Leonqn
- @nickelc
- @toshokan
- @juchiast
- @shssoichiro
- @jlkiri
- @chifflier
- @fkloiber
- @Kaoet
- @Matthew Plant
Added
ErrorConvertimplementation forVerboseError
Changed
- CI fixes
fold_many*now acceptFnMutfor the accumulation function- relaxed input bounds on
length_count
Fixed
- documentation fixes
- the
#[deprecated]attribute was removed from traits because it does not compile anymore on nightly - bits and bytes combinators from the bits modules are now converted to use
FnMut
-
6.0.031 Oct 2020Release notes
Open source →Thanks
This release was done thanks to the hard work of (by order of appearance in the commit list):
- @chifflier
- @shepmaster
- @amerelo
- @razican
- @Palladinium
- @0ndorio
- Sebastian Zivota
- @keruspe
- @devonhollowood
- @parasyte
- @nnt0
- @AntoineCezar
- @GuillaumeGomez
- @eijebong
- @stadelmanma
- @sphynx
- @snawaz
- @fosskers
- @JamesHarrison
- @calebsander
- @jthornber
- @ahmedcharles
- @rljacobson
- @benkay86
- @georgeclaghorn
- @TianyiShi2001
- @shnewto
- @alfriadox
- @resistor
- @myrrlyn
- @chipsenkbeil
- @ruza-net
- @fanf2
- @jameysharp
- @FallenWarrior2k
- @jmg-duarte
- @ericseppanen
- @hbina
- Andreas Molzer
- @nickelc
- @bgourlie
-
6.0.0-beta531 Oct 2020 pre-releaseNothing published for this version
-
6.0.0-beta431 Oct 2020 pre-releaseNothing published for this version
-
6.0.0-beta325 Oct 2020 pre-releaseNothing published for this version
-
6.0.0-beta224 Oct 2020 pre-releaseNothing published for this version
-
6.0.0-beta117 Oct 2020 pre-releaseNothing published for this version
-
6.0.0-alpha304 Oct 2020 pre-releaseNothing published for this version
-
6.0.0-alpha226 Sep 2020 pre-releaseNothing published for this version
-
6.0.0-alpha110 Apr 2020 pre-releaseNothing published for this version
-
5.1.326 Apr 2023Nothing published for this version
-
5.1.212 Jun 2020Nothing published for this version
-
5.1.124 Feb 2020Release notes
Open source →Thanks
- @Alexhuszagh for float fixes
- @AlexanderEkdahl, @JoshOrndorff, @akitsu-sanae for docs fixes
- @ignatenkobrain: dependency update
- @derekdreery:
mapimplementation for errors - @Lucretiel for docs fixes and compilation fixes
- adytzu2007: warning fixes
- @lo48576: error management fixes
Fixed
- C symbols compilation errors due to old lexical-core version
Added
Errnow has amapfunction
Changed
- Make
error::context()available withoutallocfeature
-
5.1.007 Jan 2020Release notes
Open source →Thanks
- @Hywan, @nickmooney, @jplatte, @ngortheone, @ejmg, @SirWindfield, @demurgos, @spazm, @nyarly, @guedou, @adamnemecek, for docs fixes
- @Alxandr for error management bugfixes
- @Lucretiel for example fixes and optimizations
- @adytzu2007 for optimizations
- @audunhalland for utf8 fixes
Fixed
- panic in
convert_error compile_errormacro usage
Added
std::error::Error,std::fmt::Display,Eq,ToOwnedimplementations for errors- inline attribute for
ToUsize
Changed
convert_erroroptimizationaltoptimization
-
5.0.122 Aug 2019Release notes
Open source →Thanks
- @waywardmonkeys, @phaazon, @dalance for docs fixes
- @kali for
many0_m_nfixes - @ia0 for macros fixes
Fixed
many0_m_nnow supports the n=1 case- relaxed trait requirements in
cut peek!macro reimplementation- type inference in
value!
-
5.0.024 Jun 2019Release notes
Open source →This version comes with a complete rewrite of nom internals to use functions as a base for parsers, instead of macros. Macros have been updated to use functions under the hood, so that most existing parsers will work directly or require minimal changes.
The
CompleteByteSliceandCompleteStrinput types were removed. To get different behaviour related to streaming or complete input, there are different versions of some parsers in different submodules, likenom::character::streaming::alpha0andnom::character::complete::alpha0.The
verbose-errorsfeature is gone, now the error type is decided through a generic bound. To get equivalent behaviour toverbose-errors, check outnom::error::VerboseErrorThanks
- @lowenheim helped in refactoring and error management
- @Keruspe helped in refactoring and fixing tests
- @pingiun, @Songbird0, @jeremystucki, @BeatButton, @NamsooCho, @Waelwindows, @rbtcollins, @MarkMcCaskey for a lot of help in rewriting the documentation and adding code examples
- @GuillaumeGomez for documentation rewriting and checking
- @iosmanthus for bug fixes
- @lo48576 for error management fixes
- @vaffeine for macros visibility fixes
- @webholik and @Havvy for
escapedandescaped_transformfixes - @proman21 for help on porting bits parsers
Added
- the
VerboseErrortype accumulates position info and error codes, and can generate a trace with span information - the
lexical-corecrate is now used by default (through thelexicalcompilation feature) to parse floats from text - documentation and code examples for all functions and macros
Changed
- nom now uses functions instead of macros to generate parsers
- macros now use the functions under the hood
- the minimal Rust version is now 1.31
- the verify combinator's condition function now takes its argument by reference
condwill now return the error of the parser instead of Nonealpha*,digit*,hex_digit*,alphanumeric*now recognize only ASCII characters
Removed
- deprecated string parsers (with the
_ssuffix), the normal version can be used instead verbose-errorsis not needed anymore, now the error type can be decided when writing the parsers, and parsers provided by nom are generic over the error typeAtEof,CompleteByteSliceandCompleteStrare gone, instead some parsers are specialized to work on streaming or complete input, and provided in different modules- character parsers that were aliases to their
*1version: eol, alpha, digit, hex_digit, oct_digit, alphanumeric, space, multispace count_fixedmacrowhitespace::spcan be replaced bycharacter::complete::multispace0- method combinators are now in the nom-methods crate
take_until_either,take_until_either1,take_until_either_and_consumeandtake_until_either_and_consume1: they can be replaced withis_not(possibly combined with something else)take_until_and_consume,take_until_and_consume1: they can be replaced withtake_untilcombined withtakesized_bufferandlength_bytes!: they can be replaced with thelength_datafunctionnon_empty,beginandrest_sfunctioncond_reduce!,cond_with_error!,closure!,apply,map_res_err!,expr_opt!,expr_res!alt_complete,separated_list_complete,separated_nonempty_list_complete
-
5.0.0-beta322 Jun 2019 pre-releaseNothing published for this version
-
5.0.0-beta227 May 2019 pre-releaseNothing published for this version
-
5.0.0-beta109 May 2019 pre-releaseNothing published for this version
-
5.0.0-alpha228 Apr 2019 pre-releaseNothing published for this version
-
5.0.0-alpha117 Apr 2019 pre-releaseNothing published for this version
-
4.2.323 Mar 2019Release notes
Open source →Fixed
- add missing
build.rsfile to the package - fix code comparison links in changelog
- add missing
-
4.2.204 Mar 2019 -
4.2.127 Feb 2019Release notes
Open source →Fixed
- macro expansion error in
do_parsedue tocompile_errormacro usage
- macro expansion error in
-
4.2.029 Jan 2019Release notes
Open source →Thanks
- @JoshMcguigan for unit test fixes
- @oza for documentation fixes
- @wackywendell for better error conversion
- @Zebradil for documentation fixes
- @tsraom for new combinators
- @hcpl for minimum Rust version tests
- @KellerFuchs for removing some unsafe uses in float parsing
Changed
- macro import in edition 2018 code should work without importing internal macros now
- the regex parsers do not require the calling code to have imported the regex crate anymore
- error conversions are more ergonomic
- method combinators are now deprecated. They might be moved to a separate crate
- nom now specifies Rust 1.24.1 as minimum version. This was already the case before, now it is made explicit
Added
many0_countandmany1_countto count applications of a parser instead of accumulating its results in aVec
Fixed
- overflow in the byte wrapper for bit level parsers
f64parsing does not usetransmuteanymore
-
4.1.114 Oct 2018 -
4.1.006 Oct 2018Release notes
Open source →Thanks
- @xfix for fixing warnings, simplifying examples and performance fixes
- @dvberkel for documentation fixes
- @chifflier for fixing warnings
- @myrrlyn for dead code elimination
- @petrochenkov for removing redundant test macros
- @tbelaire for documentation fixes
- @khernyo for fixing warnings
- @linkmauve for documentation fixes
- @ProgVal for documentation fixes, warning fixes and error management
- @Nemo157 for compilation fixes
- @RReverser for documentation fixes
- @xpayn for fixing warnings
- Blas Rodriguez Irizar for documentation fixes
- @badboy for documentation fixes
- @kyrias for compilation fixes
- @kurnevsky for the
rest_lenparser - @hjr3 for new documentation examples
- @fengalin for error management
- @ithinuel for the pcap example project
- @phaazon for documentation fixes
- @juchiast for documentation fixes
- @jrakow for the
u128andi128parsers - @smarnach for documentation fixes
- @derekdreery for
pub(crate)support - @YaLTeR for
map_res_err!
Added
rest_lenparser, returns the length of the remaining inputparse_tohas its own error code nowu128andi128parsers in big and little endian modes- support for
pub(crate)syntax map_res_err!combinator that appends the error of its argument function in verbose errors mode
Fixed
- lots of unused imports warnings were removed
- the
bytescombinator was not compiling in some cases - the big and little endian combinators now work without external imports
- CI is now faster and uses less cache
- in
add_return_error, the provided error code is now evaluated only once
Changed
fold_many1will now transmit aFailureinstead of transforming it to anErrorfloatanddoublenow work on all of nom's input types (&[u8],&str,CompleteByteSlice,CompleteStrand any type that implements the required traits).float_sanddouble_sgot the same modification, but are now deprecatedCompleteByteSliceandCompleteStrget a small optimization by inlining some functions
-
4.0.014 May 2018Release notes
Open source →Thanks
- @jsgf for the new
AtEoftrait - @tmccombs for fixes on
escaped*combinators - @s3bk for fixes around non Copy input types and documentation help
- @kamarkiewicz for fixes to no_std and CI
- @bheisler for documentation and examples
- @target-san for simplifying the
InputItertrait for&[u8] - @willmurphyscode for documentation and examples
- @Chaitanya1416 for typo fixes
- @fflorent for
input_len()usage fixes - @dbrgn for typo fixes
- @iBelieve for no_std fixes
- @kpp for warning fixes and clippy fixes
- @keruspe for fixes on FindToken
- @dtrebbien for fixes on take_until_and_consume1
- @Henning-K for typo fixes
- @vthriller for documentation fixes
- @federicomenaquintero and @veprbl for their help fixing the float parsers
- @vmchale for new named_args versions
- @hywan for documentation fixes
- @fbenkstein for typo fixes
- @CAD97 for catching missing trait implementations
- @goldenlentils for &str optimizations
- @passy for typo fixes
- @ayrat555 for typo fixes
- @GuillaumeGomez for documentation fixes
- @jrakow for documentation fixes and fixes for
switch! - @phlosioneer for documentation fixes
- @creativcoder for typo fixes
- @derekdreery for typo fixes
- @lucasem for implementing
DerefonCompleteStrandCompleteByteSlice - @lowenheim for
parse_to!fixes - @myrrlyn for trait fixes around
CompleteStrandCompleteByteSlice - @NotBad4U for fixing code coverage analysis
- @murarth for code formatting
- @glandium for fixing build in no_std
- @csharad for regex compatibility with
CompleteStr - @FauxFaux for implementing
AsRef<str>onCompleteStr - @jaje for implementing
std::Erroronnom:Err - @fengalin for warning fixes
- @@khernyo for doc formatting
Special thanks to @corkami for the logo :)
Breaking changes
- the
IResulttype now becomes aResultfrom the standard library Incompletenow returns the additional data size needed, not the total data size needed- verbose-errors is now a superset of basic errors
- all the errors now include the related input slice
- the arguments from
error_positionand other such macros were swapped to be more consistent with the rest of nom - automatic error conversion: to fix error type inference issues, a custom error type must now implement
std::convert::From<u32> - the
not!combinator returns unit() - FindToken's calling convention was swapped
- the
take_*combinators are now more coherent and stricter, see commit 484f6724ea3ccb for more information many0and other related parsers will now returnIncompleteif the reach the end of input without an error of the child parser. They will also returnIncompleteon an empty input- the
sep!combinator for whitespace only consumes whitespace in the prefix, while thews!combinator takes care of consuming the remaining whitespace
Added
- the
AtEoftrait for input type: indicate if we can get more input data later (related to streaming parsers andIncompletehandling) - the
escaped*parsers now support the&strinput type - the
Failureerror variant represents an unrecoverable error, for whichaltand other combinators will not try other branches. This error means we got in the right part of the code (like, a prefix was checked correctly), but there was an error in the following parts - the
CompleteByteSliceandCompleteStrinput types consider there will be no more refill of the input. They fixed theIncompleterelated issues when we have all of the data - the
exact!()combinator will fail if we did not consume the whole input - the
take_while_m_n!combinator will match a specified number of characters ErrorKind::TakeUntilAndConsume1- the
recognize_floatparser will match a float number's characters, but will not transform to af32orf64 alphaand other basic parsers are now much stricter about partial inputs. We also introduce the*0and*1versions of those parsersnamed_argscan now specify the input type as wellHexDisplayis now implemented for&strallocfeature- the
InputTakeAtpositiontrait allows specialized implementations of parsers liketake_while!
Removed
- the producers and consumers were removed
- the
error_codeanderror_nodemacros are not used anymore
Fixed
anychar!now works correctly with multibyte characterstake_until_and_consume1!no longer results in "no method named `find_substring`" and "no method named `slice`" compilation errorstake_until_and_consume1!returns the correct Incomplete(Needed) amountno_stdcompiles properly, and nom can work withalloctooparse_to!now consumes its input
Changed
altand other combinators will now clone the input if necessary. If the input is alreadyCopythere is no performance impact- the
restparser now works on various input types InputIter::Itemfor&[u8]is now au8directly, not a reference- we now use the
compile_errormacro to return a compile time error if there was a syntax issue - the permutation combinator now supports optional child parsers
- the float numbers parsers have been refactored to use one common implementation that is nearly 2 times faster than the previous one
- the float number parsers now accept more variants
- @jsgf for the new
-
4.0.0-beta314 Apr 2018 pre-releaseNothing published for this version
-
4.0.0-beta212 Mar 2018 pre-releaseNothing published for this version
-
4.0.0-beta117 Feb 2018 pre-releaseNothing published for this version
-
4.0.0-alpha216 Jan 2018 pre-releaseNothing published for this version
-
4.0.0-alpha126 Nov 2017 pre-releaseNothing published for this version
-
3.2.127 Oct 2017Release notes
Open source →Thanks
- @ordian for
alt_completefixes - @friedm for documentation fixes
- @kali for improving error management
Fixed
- there were cases where
alt_completecould returnIncomplete
Added
- an
into_error_kindmethod can be used to transform any error to a common value. This helps when the library is included multiple times as dependency with different feature sets
- @ordian for
-
3.2.024 Jul 2017Release notes
Open source →Thanks
- @jedireza for documentation fixes
- @gmorenz for the
bytescombinator - @meh for character combinator fixes for UTF-8
- @jethrogb for avoiding move issues in
separated_list
Changed
- new layout for the main page of documentation
anycharcan now work on any input typelength_bytesis now an alias forlength_data
Fixed
one_of,none_ofandcharwill now index correctly UTF-8 characters- the
compiler_errormacro is now correctly exported
Added
- the
bytescombinator transforms a bit stream back to a byte slice for child parsers
-
3.1.016 Jun 2017Release notes
Open source →Thanks
- @sdroege: implementing be_i24 and le_i24
- @Hywan: integrating faster substring search using memchr
- @nizox: fixing type issues in bit stream parsing
- @grissiom: documentation fixes
- @doomrobo: implementing separated_list_complete and separated_nonempty_list_complete
- @CWood1: fixing memchr integration in no_std
- @lu_zero: integrating the compiler_error crate
- @dtolnay: helping debug a type inference issue in map
Changed
- memchr is used for substring search if possible
- if building on nightly, some common syntax errors will display a specific error message. If building no stable, display the documentation to activate those messages
countno longer preallocates its vector
Fixed
- better type inference in alt_complete
altshould now work with whitespace parsingmapshould not make type inference errors anymore
Added
- be_i24 and le_i24, parsing big endian and little endian signed 24 bit integers
separated_list_completeandseparated_nonempty_list_completewill treat incomplete from sub parsers as error
-
3.0.012 May 2017Release notes
Open source →Thanks
- Chris Pick for some
Incompleterelated refactors - @dbrgn for documentation fixes
- @valarauca for adding
be_u24 - @ithinuel for usability fixes
- @evuez for README readability fixes and improvements to
IResult - @s3bk for allowing non-
Copytypes as input - @keruspe for documentation fixes
- @0xd34d10cc for trait fixes on
InputIter - @sdleffler for lifetime shenanigans on
named_args - @chengsun for type inference fixes in
alt - @iBelieve for adding str to no_std
- @Hywan for simplifying code in input traits
- @azerupi for extensive documentation of
altandalt_complete
Breaking Changes
escaped,separated_listandseparated_nonempty_listcan now returnIncompletewhen necessaryInputIterdoes not requireAsCharon itsItemtype anymore- the
corefeature that was putting nom inno_stdmode has been removed. There is now astdfeature, activated by default. If it is not activated, nom is inno_std - in
verbose-errorsmode, the error list is now stored in aVecinstead of a box based linked list chain!has finally been removed
Changed
Endiannessnow implementsDebug,PartialEq,Eq,CloneandCopy- custom input types can now be cloned if they're not
Copy - the infamous 'Cannot infer type for E' error should happen less often now
stris now available inno_stdmode
Fixed
FileProducerwill be marked asEofon full buffernamed_args!now has lifetimes that cannot conflict with the lifetimes from other arguments
Added
be_u24: big endian 24 bit unsigned integer parsingIResultnow has aunwrap_ormethod
- Chris Pick for some
-
2.2.103 Apr 2017Release notes
Open source →Thanks
- @Victor-Savu for formatting fixes in the README
- @chifflier for detecting and fixing integer overflows
- @utkarshkukreti for some performance improvements in benchmarks
Changed
- when calculating how much data is needed in
IResult::Incomplete, the addition could overflow (it is stored as a usize). This would apparently not result in any security vulnerability on release code
-
2.2.020 Mar 2017Release notes
Open source →Thanks
- @seppo0010 for fixing
named_args - @keruspe for implementing or() on
IResult, adding the option of default cases inswitch!, adding support forcargo-travis - @timlyo for documentation fixes
- @JayKickliter for extending
hex_u32 - @1011X for fixing regex integration
- @Kerollmops for actually marking
chain!as deprecated - @joliss for documentation fixes
- @utkarshkukreti for tests refactoring and performance improvement
- @tmccombs for documentation fixes
Added
IResultgets anor()methodtake_until1,take_until_and_consume1,take_till1!andtake_till1_s!require at least 1 character
Changed
hex_u32accepts uppercase digits as well- the character based combinators leverage the input traits
- the whitespace parsers now work on &str and other types
take_while1returnsIncompleteon empty inputswitch!can now take a default case
Fixed
named_args!now importsIResultdirectly- the upgrade to regex 0.2 broke the regex combinators, they work now
- @seppo0010 for fixing
-
2.1.027 Jan 2017Release notes
Open source →Thanks
- @nickbabcock for documentation fixes
- @derekdreery for documentation fixes
- @DirkyJerky for documentation fixes
- @saschagrunert for documentation fixes
- @lucab for documentation fixes
- @hyone for documentation fixes
- @tstorch for factoring
Slice - @shepmaster for adding crate categories
- @antoyo for adding
named_args!
Added
verify!uses a first parser, then applies a function to check that its result satisfies some conditionsnamed_args!creates a parser function that can accept other arguments along with the inputparse_to!will use theparsemethod fromFromStrto parse a value. It will automatically translate the input to a string if necessaryfloat,float_s,double,double_scan recognize floating point numbers in text
Changed
escaped!will now returnIncompleteif neededpermutation!supports up to 20 child parsers
-
2.0.110 Dec 2016Release notes
Open source →Bugfix release
Warning: there is a small breaking change,
add_error!is renamed toadd_return_error!. This was planned for the 2.0 release but was forgotten. This is a small change in a feature that not many people use, for a release that is not yet widely in use, so there will be no 3.0 release for that change.Thanks
- @nickbabcock for catching and fixing the
add_error!mixup - @lucab for documentation fixes
- @jtdowney for noticing that
tag_no_case!was not working at all for byte slices
Fixed
add_error!has been renamed toadd_return_error!- the
not!combinator now accepts functions tag_no_case!is now working as accepted (before, it accepted everything)
- @nickbabcock for catching and fixing the
-
2.0.025 Nov 2016Nothing published for this version