All Versions
53
Latest Version
Avg Release Cycle
72 days
Latest Release
146 days ago

Changelog History
Page 3

  • v2.0.1 Changes

    December 10, 2016

    ๐Ÿ›  Bugfix release

    โš  Warning: there is a small breaking change, add_error! is renamed to add_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 to add_return_error!
    • the not! combinator now accepts functions
    • tag_no_case! is now working as accepted (before, it accepted everything)
  • v2.0 Changes

    November 25, 2016

    ๐Ÿš€ The 2.0 release is one of the biggest yet. It was a good opportunity to clean up some badly named combinators and fix invalid behaviours.

    Since this version introduces a few breaking changes, an upgrade documentation is available, detailing the steps to fix the most common migration issues. After testing on a set of 30 crates, most of them will build directly, a large part will just need to activate the "verbose-errors" compilation feature. The remaining fixes are documented.

    ๐Ÿ‘ This version also adds a lot of interesting features, like the permutation combinator or whitespace separated formats support.

    Thanks

    • @lu-zero for license help
    • ๐Ÿ›  @adamgreig for type inference fixes
    • ๐Ÿ“š @keruspe for documentation and example fixes, for the IResult => Result conversion work, making AsChar's method more consistent, and adding many_till!
    • @jdeeny for implementing Offset on &str
    • @vickenty for documentation fixes and his refactoring of length_value! and length_bytes!
    • โ™ป๏ธ @overdrivenpotato for refactoring some combinators
    • ๐Ÿ“š @taralx for documentation fixes
    • ๐Ÿ“š @keeperofdakeys for fixing eol behaviour, writing documentation and adding named_attr!
    • ๐Ÿ“š @jturner314 for writing documentation
    • @bozaro for fixing compilation errors
    • @uniphil for adding a crates.io badge
    • ๐Ÿ“š @badboy for documentation fixes
    • @jugglerchris for fixing take_s!
    • @AndyShiue for implementing Error and Display on ErrorKind and detecting incorrect UTF-8 string indexing

    โž• Added

    • 0๏ธโƒฃ the "simple" error management system does not accumulates errors when backtracking. This is a big perf gain, and is activated by default in nom 2.0
    • nom can now work on any type that implement the traits defined in src/traits.rs: InputLength, InputIter, InputTake, Compare, FindToken, FindSubstring, Slice
    • ๐Ÿ“š the documentation from Github's wiki has been moved to the doc/ directory. They are markdown files that you can build with cargo-external-doc
    • ๐Ÿ“œ whitespace separated format support: with the ws! combinator, you can automatically introduce whitespace parsers between all parsers and combinators
    • ๐Ÿ“œ the permutation! combinator applies its child parsers in any order, as long as they all succeed once, and return a tuple of the results
    • ๐Ÿ—„ do_parse! is a simpler alternative to chain!, which is now deprecated
    • you can now transform an IResult in a std::result::Result
    • ๐Ÿ“œ length_data! parses a length, and returns a subslice of that length
    • tag_no_case! provides case independent comparison. It works nicely, without any allocation, for ASCII strings, but for UTF-8 strings, it defaults to an unsatisfying (and incorrect) comparison by lowercasing both strings
    • ๐Ÿ“š named_attr! creates functions like named! but can add attributes like documentation
    • ๐Ÿ“œ many_till! applies repeatedly its first child parser until the second succeeds

    ๐Ÿ”„ Changed

    • the "verbose" error management that was available in previous versions is now activated by the "verbose-errors" compilation feature
    • ๐Ÿšš code reorganization: most of the parsers were moved in separate files to make the source easier to navigate
    • most of the combinators are now independent from the input type
    • the eof function was replaced with the eof! macro
    • error! and add_error! were replaced with return_error! and add_return_error! to fix the name conflict with the log crate
    • the offset() method is now in the Offset trait
    • length_value! has been renamed to length_count!. The new length_value! selects a slice and applies the second parser once on that slice
    • AsChar::is_0_to_9 is now AsChar::is_dec_digit
    • ๐Ÿ”ง the combinators with configurable endianness now take an enum instead of a boolean as parameter

    ๐Ÿ›  Fixed

    • ๐Ÿ›  the count!, count_fixed! and length_*! combinator calculate incomplete data needs correctly
    • eol, line_ending and not_line_ending now have a consistent behaviour that works correctly with incomplete data
    • take_s! didn't correctly handle the case when the slice is exactly the right length
  • v1.2.4 Changes

    July 20, 2016

    Thanks

    • ๐Ÿ“š @Phlosioneer for documentation fixes
    • @sourrust for fixing offsets in take_bits!
    • @ChrisMacNaughton for the XFS crate
    • @pwoolcoc for rest_s
    • @fitzgen for more IResult methods
    • @gtors for the negative lookahead feature
    • ๐Ÿ“œ @frk1 and @jeandudey for little endian float parsing
    • @jethrogb for fixing input usage in many1
    • @acatton for beating me at nom golf :D

    โž• Added

    • the rest_s method on IResult returns the remaining &str input
    • unwrap_err and unwrap_inc methods on IResult
    • ๐Ÿ“œ not! will peek at the input and return Done if the underlying parser returned Error or Incomplete, without consuming the input

    - le_f32 and le_f64 parse little endian floating point numbers (IEEE 754)

    ๐Ÿ›  Fixed

    • ๐Ÿ“š documentation fixes
    • take_bits! is now more precise
    • many1 inccorectly used the len function instead of input_len
    • ๐Ÿ“œ the INI parser is simpler
    • ๐Ÿšš recognize! had an early return that is removed now
  • v1.2.3 Changes

    May 10, 2016

    Thanks

    • @lu-zero for the contribution guidelines
    • ๐Ÿ“š @GuillaumeGomez for fixes on length_bytes and some documentation
    • ๐Ÿ“š @Hywan for documentation and test fixes
    • @Xirdus for correct trait import issues
    • @mspiegel for the new AST example
    • @cholcombe973 for adding the cond_with_error! combinator
    • โ™ป๏ธ @tstorch for refactoring many0!
    • @panicbit for the folding combinators
    • ๐Ÿ›  @evestera for separated_list! fixes
    • @DanielKeep for correcting some enum imports

    โž• Added

    • Regular expression combinators starting with re_bytes_ work on byte slices
    • ๐Ÿ“œ example parsing arithmetic expressions to an AST
    • cond_with_error! works like cond! but will return None if the condition is false, and Some(value) if the underlying parser succeeded
    • fold_many0!, fold_many1! and fold_many_m_n! will take a parser, an initial value and a combining function, and fold over the successful applications of the parser

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ length_bytes! converts the result of its child parser to usize
    • take_till! now imports InputLength instead of assuming it's in scope
    • separated_list! and separated_nonempty_list! will not consume the separator if there's no following successfully parsed value
    • ๐Ÿ— no more warnings on build

    ๐Ÿ”„ Changed

    • simpler implementation of many0!
  • v1.2.2 Changes

    March 09, 2016

    Thanks

    • @conradev for fixing take_until_s!
    • ๐Ÿ“š @GuillaumeGomez for some documentation fixes
    • ๐Ÿ“š @frewsxcv for some documentation fixes
    • โ™ป๏ธ @tstorch for some test refactorings

    โž• Added

    • nom::Err now implements std::error::Error

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ hex_u32 does not parses more than 8 chars now
    • take_while! and take_while1! will not perturb the behaviour of recognize! anymore
  • v1.2.1 Changes

    February 23, 2016

    Thanks

    • @sourrust for adding methods to IResult
    • โ™ป๏ธ @tstorch for the test refactoring, and for adding methods to IResult and Needed
    • @joelself for fixing the method system

    โž• Added

    • mapping methods over IResult and Needed

    ๐Ÿ”„ Changed

    • apply_rf is renamed to apply_m. This will not warrant a major version, since it is part missing from the methods feture added in the 1.2.0 release
    • the regexp_macros feature that used regex! to precompile regular expressions has been replaced by the normal regex engine combined with lazy_static

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ when a parser or combinator was returning an empty buffer as remaining part, it was generating one from a static empty string. This was messing with buffer offset calculation. Now, that empty slice is taken like this: &input[input.len()..].
    • The regexp_macros and no_std feature build again and are now tested with Travis CI
  • v1.2.0 Changes

    February 08, 2016

    Thanks

    • ๐Ÿ›  @zentner-kyle for type inference fixes
    • ๐Ÿ“œ @joelself for his work on &str parsing and method parsers
    • @GuillaumeGomez for implementing methods on IResult
    • @dirk for the alt_complete! combinator
    • โ™ป๏ธ @tstorch for a lot of refactoring work and unit tests additions
    • ๐Ÿ“œ @jansegre for the hex digit parsers
    • ๐Ÿ“š @belgum for some documentation fixes
    • ๐Ÿ“š @lwandrebeck for some documentation fixes and code fixes in hex_digit

    โž• Added

    • take_until_and_consume_s! for consumption of string data until a tag
    • more function patterns in named!. The error type can now be specified
    • alt_complete! works like the alt! combinator, but tries the next branch if the current one returned Incomplete, instead of returning directly
    • โœ… more unit tests for a lot of combinators
    • ๐Ÿ“œ hexadecimal digit parsers
    • ๐Ÿ“œ the tuple! combinator takes a list of parsers as argument, and applies them serially on the input. If all of them are successful, it willr eturn a tuple accumulating all the values. This combinator will (hopefully) replace most uses of chain!
    • parsers can now be implemented as a method for a struct thanks to the method!, call_m! and apply_rf! combinators

    ๐Ÿ›  Fixed

    • there were type inference issues in a few combinators. They will now be easier to compile
    • peek! compilation with bare functions
    • ๐Ÿ“œ &str parsers were splitting data at the byte level, not at the char level, which can result in inconsistencies in parsing UTF-8 characters. They now use character indexes
    • some method implementations were missing on IResult<I,O,E> (with specified error type instead of implicit)
  • v1.1.0 Changes

    January 01, 2016

    ๐Ÿš€ This release adds a lot of features related to &str parsing. The previous versions ๐Ÿ“œ were focused on &[u8] and bit streams parsing, but there's a need for more text ๐Ÿ“œ parsing with nom. The parsing functions like alpha, digit and others will now accept either a &[u8] or a &str, so there is no breaking change on that part.

    ๐Ÿ“š There are also a few performance improvements and documentation fixes.

    Thanks

    • ๐Ÿ“œ @Binero for pushing the work on &str parsing
    • @meh for fixing Option and Vec imports
    • ๐Ÿ“š @hoodie for a documentation fix
    • ๐Ÿ“š @joelself for some documentation fixes
    • @vberger for his traits magic making nom functions more generic

    โž• Added

    • string related parsers: tag_s!, take_s!, is_a_s!, is_not_s!, take_while_s!, take_while1_s!, take_till_s!
    • ๐Ÿ“œ value! is a combinator that always returns the same value. If a child parser is passed as second argument, that value is returned when the child parser succeeds

    ๐Ÿ”„ Changed

    • tag! will now compare even on partial input. If it expects "abcd" but receives "ef", it will now return an Error instead of Incomplete
    • many0! and others will preallocate a larger vector to avoid some copies and reallocations
    • alpha, digit, alphanumeric, space and multispace now accept as input a &[u8] or a &str. Additionally, they return an error if they receive an empty input
    • take_while!, take_while1!, take_while_s!, take_while1_s! wilreturn an error on empty input

    ๐Ÿ›  Fixed

    • โšก๏ธ if the child parser of many0! or many1! returns Incomplete, it will return Incomplete too, possibly updating the needed size
    • Option, Some, None and Vec are now used with full path imports
  • v1.0.1 Changes

    November 22, 2015

    ๐Ÿš€ This releases makes the 1.0 version compatible with Rust 1.2 and 1.3

    Thanks

    • @steveklabnik for fixing lifetime issues in Producers and Consumers
  • v1.0.0 Changes

    November 16, 2015

    ๐Ÿš€ Stable release for nom. A lot of new features, a few breaking changes

    Thanks

    • ๐Ÿ›  @ahenry for macro fixes
    • ๐Ÿ“š @bluss for fixing documentation
    • @sourrust for cleaning code and debugging the new streaming utilities
    • @meh for inline optimizations
    • @ccmtaylor for fixing function imports
    • @soro for improvements to the streaming utilities
    • โœ๏ธ @breard-r for catching my typos
    • โœ๏ธ @nelsonjchen for catching my typos too
    • ๐Ÿ“œ @divarvel for hex string parsers
    • @mrordinaire for the length_bytes! combinator

    ๐Ÿ’ฅ Breaking changes

    • IResult::Error can now use custom error types, and is generic over the input type
    • ๐Ÿ“œ Producers and consumers have been replaced. The new implementation uses less memory and integrates more with parsers
    • nom::ErrorCode is now nom::ErrorKind
    • filter! has been renamed to take_while!
    • ๐Ÿ“œ chain! will count how much data is consumed and use that number to calculate how much data is needed if a parser returned Incomplete
    • ๐Ÿ“œ alt! returns Incomplete if a child parser returned Incomplete, instead of skipping to the next parser
    • IResult does not require a lifetime tag anymore, yay!

    โž• Added

    • ๐Ÿ“œ complete! will return an error if the child parser returned Incomplete
    • add_error! will wrap an error, but allow backtracking
    • ๐Ÿ“œ hex_u32 parser

    ๐Ÿ›  Fixed

    • ๐Ÿ“œ the behaviour around Incomplete is better for most parsers now