All Versions
12
Latest Version
Avg Release Cycle
26 days
Latest Release
3019 days ago

Changelog History
Page 1

  • v0.3.1 Changes

    September 06, 2016

    โž• Added

    • ๐Ÿ“œ combinators::either: Like or but allows different result types from the parsers.

    ๐Ÿ”„ Changes

    • Chomp is now licensed under both MIT and Apache-2.0 licenses.

    ๐Ÿ›  Bugfixes

    • ๐Ÿ”‹ Feature tendril now compiles again.
  • v0.3.0 Changes

    September 01, 2016

    โž• Added

    ๐Ÿ“œ prelude module containing basic types, parsers and combinators.

    ๐Ÿ“ฆ This is supposed to be the equivalent of Attoparsec's main package.

    ๐Ÿ“œ run_parser which executes a parser on any given Input type.

    buffer::InputBuf which contains a slice and an incomplete flag, much as the old Input struct.

    Input<Token=T, Buffer=&[T]> implementation for &[T] where T: Copy + PartialEq.

    Input<Token=char, Buffer=&str> implementation for &str.

    types::Buffer trait which is implemented for all buffers providing common logic to perform the
    ๐Ÿ“œ final parsing on a buffer without knowing the exact buffer implementation.

    types::U8Input trait alias for Input<Token=u8>.

    primitives::Primitives trait providing access to the primitive methods of the Input trait.

    ๐Ÿ— This is used for building fundamental parsers/combinators.

    ๐Ÿ“œ ParseResult::inspect allowing code to observe the success value.

    types::numbering module for creating position-aware Input types.

    ๐Ÿ“œ parsers::skip_while using an efficient way of skipping data if provided, otherwise falls back
    on using take_while and throws the result away.

    ๐Ÿ— chomp::Error now includes a backtrace in test and debug build profiles thanks to the
    debugtrace crate. Backtraces can also be activated
    permanently using the backtrace feature but this will incur the significant cost of allocating
    ๐Ÿš€ backtraces even in the release profile.

    ๐Ÿ”‹ Feature noop_error provides a zero-sized error type for the cases when the expected token is
    ๐ŸŽ unimportant. Provides a small performance boost.

    ๐Ÿ”„ Changes

    Backwards-incompatible: Input is now a trait with associated types Token and Buffer.

    ๐Ÿšš This removes all incomplete logic from the parsers themselves and moves it into the InputBuf
    ๐Ÿ“œ type. This InputBuf is used if a partial buffer is in memory. It also allows the parsers to
    operate directly on slices or use more effective means of storing buffers depending on the
    Input implementation.

    โฌ†๏ธ To upgrade you replace the previous concrete Input type with a generic, use its associated
    ๐Ÿ“œ type if required, and refer to the Buffer associated type to allow for zero-copy parsing::

    -fn http_version(i: Input<u8>) -> U8Result<&[u8]>;
    +fn http_version<I: Input<Token=u8>>(i: I) -> SimpleResult<I, I::Buffer>;
    

    The associated types can be restricted if requried:

    fn request<I: U8Input>(i: I) -> SimpleResult<I, (Request<I::Buffer>, Vec<Header<I::Buffer>>)>
      where I::Buffer: ::std::ops::Deref<Target=[u8]>;
    

    Backwards-incompatible: Moved types into a more logical module structure, prelude now
    exists as a prelude module.

    Backwards-incompatible: chomp::Error is no longer an enum, this is to facillitate the
    ๐Ÿ‘Œ support of backtraces while keeping code compatible between the different build profiles.

    ๐Ÿ‘‰ Use chomp::Error::expected_token to determine if a specific token was expected.

    ๐Ÿ”‹ Feature verbose_error is now default

    โœ‚ Removed

    • Input::incomplete
    • Input::new
    • ๐Ÿ“œ ParseResult::expect
    • ๐Ÿ“œ ParseResult::unwrap_err
    • ๐Ÿ“œ ParseResult::unwrap
    • buffer::IntoStream
    • ๐Ÿ‘ฏ primitives::InputClone
    • primitives::State

    ๐Ÿ›  Bugfixes

    • ๐Ÿ“œ combinators::bounded now have a defined behavior when a Range<usize> has start == end: They will parse exactly start times. This also fixed a few overflows and unreachable code being reachable.
    • ๐Ÿ›  combinators::bounded::many_till got fixed for an overflow happening when 0: usize was used to limit the number of iterations.
  • v0.2.6 Changes

    July 07, 2016

    ๐Ÿ›  Bugfixes

    • Macro expansion is now again compatible with nightly.
    • ๐Ÿ— Now uses std feature of conv dependency, fixing build breakage on rustc 1.2.0.
  • v0.2.5 Changes

    March 08, 2016

    โž• Added

    • combinators::bounded::sep_by: Bounded version of combinators::sep_by and combinators::sep_by1.

    ๐Ÿ”„ Changes

    • ๐Ÿ‘Œ Improved performance of combinators using iterators.
    • โšก๏ธ Updated bitflags dependency
  • v0.2.4 Changes

    January 25, 2016

    ๐Ÿ”„ Changes

    • Backwards-incompatible: combinators::option will now return the default value if the parser reports incomplete and the input is finite.
  • v0.2.3 Changes

    January 21, 2016

    โž• Added

    • ๐Ÿ‘€ buffer::StreamError now implements From<ParseError>

    ๐Ÿ”„ Changes

    • Backwards-incompatible: combinators::or will now retry with the second parser if the first parser reports incomplete and the input is finite.
    • ๐Ÿ‘Œ Improvements to parse! macro to make it more general and to make it easier to write simple parsers as one line. Completely updated grammar and reimplemented the macro to include:

      • Alternation operator (<|>)
      • Skip operator (<*)
      • Then operator (>>)
      • ret and err can now be used inline
      • Backwards-incompatible: ; is no longer allowed to terminate a parse! block.
  • v0.2.2 Changes

    January 18, 2016

    ๐Ÿ”„ Changes

    • ๐Ÿ“œ Input::ret, ParseResult::bind and ParseResult::then no longer have type parameter defaults. This change only affects people on nightly who have type-parameter-defaults enabled. See Rust pull request #30724.
  • v0.2.1 Changes

    December 20, 2015

    ๐Ÿ”„ Changes

    • buffer::GrowingBuffer and buffer::data_source::ReadDataSource now derive Debug.
    • ๐Ÿ“š Rustdoc for public items previously lacking any documentation.
  • v0.2.0 Changes

    December 16, 2015

    โž• Added

    • ๐Ÿ“œ parse_only: Runs a given parser on a finite input.
    • ๐Ÿ“œ combinators::bounded::many: combinator applying a parser within a range bound, storing the data in a T: FromIterator.
    • ๐Ÿ“œ combinators::bounded::skip_many: combinator applying a parser within a range bound, throwing away all produced data.
    • ๐Ÿ“œ combinators::bounded::many_till: combinator applying a parser within a range bound until a second parser succeeds. If the second parser does not succeed within the given range the parsing will fail. The matches from the first parser will be stored in a T: FromIterator.

    ๐Ÿ”„ Changes

    • count, many1, sep_by1 now properly uses Iterator::size_hint
    • Backwards-incompatible: many, many1, sep_by, sep_by1, skip_many, skip_many1 are no longer considered incomplete if they end with a partial match as long as they have managed to satisfy the minimum count of matches.
    • Backwards-incompatible: buffer::ParseError has been renamed to buffer::StreamError to not conflict with the simple ParseError.
    • Slightly improved performance for count, many, many1, sep_by, sep_by1.

    ๐Ÿ—„ Deprecated

    • Input::new

    Use parse_only or buffer::SliceStream to parse a slice instead. For any advanced usage create an Input using primitives::input::new.

    • ๐Ÿ“œ ParseResult::unwrap, ParseResult::unwrap_err, ParseResult::expect

    Use parse_only or the buffer::Stream implementations to obtain a Result instead of acting on the ParseResult directly.

  • v0.1.2 Changes

    December 02, 2015

    โž• Added

    • ascii::digit
    • ascii::is_end_of_line
    • ascii::is_horizontal_space
    • ascii::signed
    • ascii::skip_whitespace
    • combinators::look_ahead
    • combinators::many_till
    • combinators::matched_by
    • combinators::sep_by1
    • combinators::sep_by
    • combinators::skip_many1
    • ๐Ÿ“œ parsers::peek_next
    • ๐Ÿ“œ parsers::run_scanner
    • ๐Ÿ“œ parsers::satisfy_with