commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
d308b19674962ef6edae596d43f85e7c761ef67d
Markus Westerlind
2019-12-01T22:21:56
Update some mentions to consume/empty
diff --git a/src/error.rs b/src/error.rs index ee28755..8dd9b4d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -234,8 +234,8 @@ impl<T> AsRef<T> for Commit<T> { } impl<T> Commit<T> { - /// Returns true if `self` is empty. - pub fn is_empty(&self) -> bool { + /// Returns true if `self` is peek. + pub fn...
2
10
10
0314245b86aa45a3d6dd8109a648be2ee5d6a928
Markus Westerlind
2019-12-01T22:17:20
Explain Peek/Commit in ParseResult
diff --git a/src/error.rs b/src/error.rs index 43d35b3..ee28755 100644 --- a/src/error.rs +++ b/src/error.rs @@ -206,12 +206,14 @@ where /// /// This is used by parsers such as `or` and `choice` to determine if they should try to parse /// with another parser as they will only be able to provide good error reporting...
1
11
3
c9b6c83454a230b7c7af32b24a428ac6c3ef94c0
Markus Westerlind
2019-11-30T22:04:31
FIx no-default-features
diff --git a/src/error.rs b/src/error.rs index 7c77bc5..43d35b3 100644 --- a/src/error.rs +++ b/src/error.rs @@ -525,12 +525,19 @@ pub enum UnexpectedParse { impl fmt::Display for UnexpectedParse { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.description()) + w...
1
18
4
83e2f778b01fe4acd2f0508b2061a8ea87c89397
Markus Westerlind
2019-11-30T21:40:27
tokio-dep -> tokio-02-dep
diff --git a/Cargo.toml b/Cargo.toml index 6ef5144..0a7f1c2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,7 @@ criterion = { version = "0.3", default-features = false } once_cell = "1.0" futures = "0.1" -tokio-dep = { version = "0.2", features = ["fs", "io-driver", "io-util", "macros"], package = "tokio" } ...
2
4
4
a40ab13ca0e26cb2733d346232a2fb6c61a1847d
Markus Westerlind
2019-11-30T20:47:09
Rename the tokio feature to tokio-02 Since it is likely that 0.3 etc will release before combine 5.x
diff --git a/Cargo.toml b/Cargo.toml index 5058fc0..6ef5144 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ futures_03 = { version = "0.3", package = "futures", optional = true } regex = { version = "1", optional = true } memchr = { version = "2.2", default-features = false } pin-project = { version = "0....
2
7
7
b4e23207f9c3e47111c69865389853d89b8ce12d
Markus Westerlind
2019-11-30T20:44:42
feat: Remove deprecated re-exports BREAKING CHANGE Search through the docs for the new location in the `combine::parser::*` submodules
diff --git a/examples/async.rs b/examples/async.rs index dfe875b..8958815 100644 --- a/examples/async.rs +++ b/examples/async.rs @@ -13,10 +13,10 @@ use std::{cell::Cell, io::Cursor, rc::Rc, str}; use { bytes::BytesMut, combine::{ - combinator::{any_partial_state, AnyPartialState}, error::{Pa...
12
68
142
96515b1b2c9813ee8a6f00b59ddd56690732ef89
Markus Westerlind
2019-11-30T19:51:32
Add some missing docs
diff --git a/src/parser/choice.rs b/src/parser/choice.rs index 5cb105c..20e53c3 100644 --- a/src/parser/choice.rs +++ b/src/parser/choice.rs @@ -710,6 +710,7 @@ macro_rules! parse_mode_dispatch { } #[macro_export] +#[doc(hidden)] macro_rules! dispatch_parser_impl { ($parser_name: ident [$first_ident: ident $(...
2
25
18
7ec1765f8562c23c27595cb1122e9e564d9d3c39
Markus Westerlind
2019-11-30T19:38:32
Add docsrs feature attribute
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 9f9c2e5..8890d74 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -1290,6 +1290,7 @@ use std::io::{self, BufRead}; /// Used together with the `decode!` macro #[cfg(feature = "std")] +#[cfg_attr(docsrs, doc(cfg(feature = "std")))] #[cfg_attr(feature ...
1
7
0
162eff349ed27be25c66fbfc5d3a103d436052d8
Markus Westerlind
2019-11-30T19:27:22
decode! -> decode_buf!
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 9c11153..9f9c2e5 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -1288,6 +1288,7 @@ use crate::stream::position::IndexPositioner; #[cfg(feature = "std")] use std::io::{self, BufRead}; +/// Used together with the `decode!` macro #[cfg(feature = "std...
1
72
64
4d38f7c25cb0cde10cdc869955c0a98079b5fa08
Markus Westerlind
2019-11-30T19:06:14
feat: Add decode_tokio_buf_read! to parse tokio::io::BufRead
diff --git a/Cargo.lock b/Cargo.lock index 87af8c0..1d8f1dd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,6 +65,11 @@ dependencies = [ "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bytes" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.i...
3
463
33
dbe23ce90803d409c591b02aaeb7005d0f58622a
Markus Westerlind
2019-11-30T18:11:32
feat: Add `decode_buf_read!` to parse `BufRead` without ... reading it fully into memory
diff --git a/src/stream/easy.rs b/src/stream/easy.rs index cfa8476..814c688 100644 --- a/src/stream/easy.rs +++ b/src/stream/easy.rs @@ -80,9 +80,7 @@ //! ``` //! //! [`Parser::easy_parse`]: ../../parser/trait.Parser.html#method.easy_parse -use std::error::Error as StdError; - -use std::fmt; +use std::{error::Error ...
3
283
97
281e0d30276cd8d2b730680fb24117bb1b72b198
Markus Westerlind
2019-11-30T13:00:05
fix: Handle partial parsing in sep_end_by
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index fadbae8..ef6ea82 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -855,6 +855,7 @@ where ctry!(self .parser .parse_mode(mode, input, &mut child_state.B.state)); + ...
2
24
6
6e2f1121203c54b1623f9f5a8b35907867c83874
Markus Westerlind
2019-11-30T12:34:26
feat: Add a macro to incrementally decode std::io::BufRead
diff --git a/src/error.rs b/src/error.rs index f786ce4..7c77bc5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -525,16 +525,17 @@ pub enum UnexpectedParse { impl fmt::Display for UnexpectedParse { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - use self::UnexpectedParse::*; + write!(...
4
228
28
129046e3a555318c3e60f658988f1be8fe83a2fd
Markus Westerlind
2019-11-29T09:59:12
feat: Rename Consumed to Commit and Empty to Peek This more accurately explains what these cases mean. Either a parser has committed to its parse, so if it fails it should not attempt other parsers or it just `peek` on its parse and it is ok to attempt another one. `Consumed` and `Empty` were only accurate in what th...
diff --git a/benches/json.rs b/benches/json.rs index f1e6a24..b0d2aec 100644 --- a/benches/json.rs +++ b/benches/json.rs @@ -11,7 +11,7 @@ use std::{collections::HashMap, fs::File, io::Read, path::Path}; use { combine::{ - error::{Consumed, ParseError}, + error::{Commit, ParseError}, pars...
8
106
107
0f3bf7069792f2030539f63c37fa12b5cb2245e4
Markus Westerlind
2019-11-23T23:04:22
refactor: Move ReadStream to the read sub module and name it Stream BREAKING CHANGE Rename `ReadStream` imports to `read::Stream`
diff --git a/src/parser/byte.rs b/src/parser/byte.rs index d7895a0..3dcd034 100644 --- a/src/parser/byte.rs +++ b/src/parser/byte.rs @@ -689,7 +689,7 @@ pub mod num { #[cfg(test)] mod tests { - use crate::stream::{buffered, position, ReadStream}; + use crate::stream::{buffered, position, read}; use sup...
4
217
204
c3c7da32d063098654e0415bab19bfe043f3f000
William Light
2019-11-06T17:56:14
implement support for SourcePosition to work on u8 streams
diff --git a/src/stream/position.rs b/src/stream/position.rs index fb301dd..1720267 100644 --- a/src/stream/position.rs +++ b/src/stream/position.rs @@ -233,6 +233,24 @@ impl Positioner<char> for SourcePosition { } } +impl Positioner<u8> for SourcePosition { + type Position = SourcePosition; + + #[inline]...
1
18
0
9f81b223b228571cc35272b7e709139ef09d0492
William Light
2019-11-23T23:24:10
change wildcard "*" to "?" and add small test
diff --git a/src/parser/choice.rs b/src/parser/choice.rs index 97cf7ba..7fea3d8 100644 --- a/src/parser/choice.rs +++ b/src/parser/choice.rs @@ -775,8 +775,8 @@ macro_rules! dispatch_parser_impl { #[macro_export] macro_rules! dispatch_inner { - ($expr_ident: ident [$first_ident: ident $($id: ident)*] [$($collect...
1
8
7
37bbd84383ecaa632df537322426407be7712748
Markus Westerlind
2019-11-23T22:56:19
feat: Add a dedicated error for ReadStream
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index ce92a0f..0cd45bd 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -14,10 +14,7 @@ use crate::lib::{cmp::Ordering, fmt, marker::PhantomData, mem, str::Chars}; #[cfg(feature = "std")] -use std::io::{Bytes, Read}; - -#[cfg(feature = "std")] -use crate::...
1
143
7
2d7dc9b0aae15820dd4aed759053a0dbed503418
William Light
2019-11-23T22:26:08
extend dispatch! macro to work with match guards
diff --git a/src/parser/choice.rs b/src/parser/choice.rs index 9822650..97cf7ba 100644 --- a/src/parser/choice.rs +++ b/src/parser/choice.rs @@ -775,8 +775,8 @@ macro_rules! dispatch_parser_impl { #[macro_export] macro_rules! dispatch_inner { - ($expr_ident: ident [$first_ident: ident $($id: ident)*] [$($collect...
1
6
6
5b89f1913d7932b20c37e6a11bebd347a5942df1
Markus Westerlind
2019-11-02T21:32:21
Remove unnnecessary inline annotations
diff --git a/src/parser/byte.rs b/src/parser/byte.rs index db6c780..d7895a0 100644 --- a/src/parser/byte.rs +++ b/src/parser/byte.rs @@ -28,7 +28,6 @@ use self::ascii::AsciiChar; /// assert!(byte(b'A').parse(&b""[..]).is_err()); /// assert!(byte(b'A').parse(&b"!"[..]).is_err()); /// ``` -#[inline] pub fn byte<Input...
11
0
94
ba4e208a242962f8d72c64f3531cc8e4a3314aa9
Markus Westerlind
2019-10-08T21:36:00
Update lock file
diff --git a/Cargo.lock b/Cargo.lock index f02e558..87af8c0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -87,7 +87,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.0.0-alpha.2" +version = "4.0.0-beta.1" dependencies = [ "ascii 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "byte...
1
1
1
c8e01b4d814dcedf7b7918b614a48c327cd58bc7
Markus Westerlind
2019-10-08T20:43:29
refactor: Merge use statements with userp
diff --git a/benches/http.rs b/benches/http.rs index fa839d6..f3b7bae 100644 --- a/benches/http.rs +++ b/benches/http.rs @@ -3,13 +3,17 @@ extern crate criterion; #[macro_use] extern crate combine; -use criterion::{black_box, Bencher, Criterion}; - use std::fmt; -use combine::range::{range, take_while1}; -use co...
29
365
243
c160a971b47c29a0c8d37fbca6f77cd4a6c85831
Markus Westerlind
2019-10-08T19:10:31
feat: Merge FullRangeStream into RangeStreamOnce BREAKING CHANGE Implement `fn range` in `RangeStreamOnce` instead and replace `FullRangeStream` with `RangeStream`
diff --git a/src/error.rs b/src/error.rs index 25f111f..84b5682 100644 --- a/src/error.rs +++ b/src/error.rs @@ -954,7 +954,7 @@ mod tests_std { #[test] fn parse_clone_but_not_copy() { - // This verifies we can parse slice references with an item type that is Clone but not Copy. + // This veri...
14
66
798
224c00d3df97134397a6153ec22e25f6475ea54c
Stéphane Campinas
2019-10-01T09:55:58
fix links in documentation
diff --git a/src/parser/choice.rs b/src/parser/choice.rs index a44b269..ff4e722 100644 --- a/src/parser/choice.rs +++ b/src/parser/choice.rs @@ -611,8 +611,8 @@ where /// # } /// ``` /// -/// [`choice!`]: ../macro.choice.html -/// [`p1.or(p2)`]: ../parser/trait.Parser.html#method.or +/// [`choice!`]: ../../macro.cho...
6
19
21
2727335fd1025bec4c5144e2d43e204a52b65ef5
Markus Westerlind
2019-08-30T20:36:25
refactor: user_state under the stream module
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 3818201..eb2f5a0 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -48,13 +48,15 @@ macro_rules! clone_resetable { } #[cfg(feature = "std")] +/// Stream wrapper which provides a `ResetStream` impl for `StreamOnce` impls which do not have +/// one. pu...
2
4
2
e83699a1fba710849f97aaaac388cdedeca7d517
Markus Westerlind
2019-08-30T20:09:26
refactor: Unify stream naming Renames the `state` module to `position` and renames all stream impl types to just `Stream` if they have their own module: BREAKING CHANGE
diff --git a/benches/json.rs b/benches/json.rs index 7624b73..6987965 100644 --- a/benches/json.rs +++ b/benches/json.rs @@ -25,7 +25,7 @@ use combine::parser::item::{any, satisfy, satisfy_map}; use combine::parser::repeat::{many, many1, sep_by}; use combine::parser::sequence::between; -use combine::stream::state::...
15
176
131
b99b50ba1515c7728c53b3ce0bfcd34ae16dc3ef
Markus Westerlind
2019-08-29T19:05:40
refactor: Use impl Parser in char and byte parsers
diff --git a/src/lib.rs b/src/lib.rs index 1a90cfa..c4dd320 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -218,33 +218,6 @@ pub use crate::parser::combinator::from_str; #[doc(inline)] pub use crate::parser::item::tokens_cmp; -macro_rules! static_fn { - (($($arg: pat, $arg_ty: ty),*) -> $ret: ty { $body: expr }) =>...
3
45
160
8518f3bf3a20b14352864f437720ec32bfa58758
Markus Westerlind
2019-08-29T07:20:57
Remove redundant error methods
diff --git a/src/error.rs b/src/error.rs index 0ef9db5..18a3fac 100644 --- a/src/error.rs +++ b/src/error.rs @@ -371,13 +371,7 @@ pub trait StreamError<Item, Range>: Sized { where E: for<'s> ErrorInfo<'s, Item, Range>, { - Self::unexpected_info(info.into_info()) - } - fn unexpected_info<...
2
6
30
d638adf50766d51cea0cd6fbd1ca7b0e8c0f6072
Markus Westerlind
2019-08-29T07:16:36
Allow any `Info` enum be used as ErrorInfo Requires explicit use of the newtypes elsewhere however.
diff --git a/src/error.rs b/src/error.rs index ed8d027..0ef9db5 100644 --- a/src/error.rs +++ b/src/error.rs @@ -39,6 +39,10 @@ macro_rules! ctry { }; } +/// Trait for types which can be used to construct error information. +/// +/// To call functions expecting this trait, use the wrappar types defined in this ...
6
44
38
0aab1ac70de1763d0a5a865ca0c6f48812f01b3c
Markus Westerlind
2019-08-29T06:13:17
refactor: Rename Info::Borrowed to Info::Static BREAKING CHANGE
diff --git a/src/error.rs b/src/error.rs index 9ce12ae..ed8d027 100644 --- a/src/error.rs +++ b/src/error.rs @@ -58,7 +58,7 @@ where pub enum Info<T, R, F = &'static str> { Token(T), Range(R), - Borrowed(&'static str), + Static(&'static str), Format(F), } @@ -88,14 +88,14 @@ impl<'s, R> ErrorIn...
2
42
22
aff29aedee18ac08338b59186a09a8bb196909be
Markus Westerlind
2019-08-29T06:09:31
refactor: Rename StreamError::*_message to *_format Makes it consistent with the `Info` struct
diff --git a/src/error.rs b/src/error.rs index 58bc087..9ce12ae 100644 --- a/src/error.rs +++ b/src/error.rs @@ -334,7 +334,7 @@ pub type StdParseResult2<O, E> = Result<(O, Consumed<()>), Consumed<Tracked<E>>> pub trait StreamError<Item, Range>: Sized { fn unexpected_token(token: Item) -> Self; fn unexpected...
5
30
30
82796d4ae5ea23290920ae4e1586b20535285d49
Markus Westerlind
2019-08-28T07:07:56
feat: Allow fmt::Display be used to specify errors in combinators Fixes #255
diff --git a/benches/json.rs b/benches/json.rs index bda9a94..7624b73 100644 --- a/benches/json.rs +++ b/benches/json.rs @@ -107,7 +107,7 @@ where Input::Error: ParseError<Input::Item, Input::Range, Input::Position>, { parser(|input: &mut Input| { - let (c, consumed) = r#try!(any().parse_lazy(input).i...
8
216
46
b1e8398a80f6dd67b363e9f71c05db28b8690ab4
Markus Westerlind
2019-08-26T18:58:08
Remove non-working decoder
diff --git a/Cargo.toml b/Cargo.toml index 93901b6..d3a1c78 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,9 +31,6 @@ unreachable = "1.0.0" regex = { version = "1", optional = true } memchr = { version = "2.2", default-features = false } -tokio-codec-0-1 = { package = "tokio-codec", version = "0.1", optional = tru...
2
0
79
4659e4096b918c0f59e427c04062a639ffd3603f
Markus Westerlind
2019-08-26T18:57:24
Fix warnings
diff --git a/src/stream/buffered.rs b/src/stream/buffered.rs index a57a47f..02d0200 100644 --- a/src/stream/buffered.rs +++ b/src/stream/buffered.rs @@ -111,7 +111,7 @@ where fn uncons(&mut self) -> Result<Input::Item, StreamErrorFor<Self>> { if self.offset >= self.buffer_offset { let positio...
3
7
7
2ee2ba4b4a7756dd49741340438b3b402609f877
Markus Westerlind
2019-08-26T16:58:22
cargo fix
diff --git a/benches/http.rs b/benches/http.rs index fd4f609..10bb940 100644 --- a/benches/http.rs +++ b/benches/http.rs @@ -26,8 +26,8 @@ struct Header<'a> { fn is_token(c: u8) -> bool { match c { - 128...255 - | 0...31 + 128..=255 + | 0..=31 | b'(' | b')' ...
5
11
11
e46f6fd70723337c388583193d2ee9ea3077a11d
Markus Westerlind
2019-08-26T16:47:45
Input argument
diff --git a/benches/http.rs b/benches/http.rs index 0a789b9..fd4f609 100644 --- a/benches/http.rs +++ b/benches/http.rs @@ -63,7 +63,7 @@ fn is_http_version(c: u8) -> bool { c >= b'0' && c <= b'9' || c == b'.' } -fn end_of_line<'a, Input>() -> impl Parser<Output = u8, Input = Input> +fn end_of_line<'a, Input>(...
3
18
14
e154dbc2f2ca3288e6733f29c85f4b1efcd689c7
Markus Westerlind
2019-08-26T07:43:22
feat: Only require `&mut I` in decode BREAKING CHANGE Pass `&mut` instead of moving in `decode`
diff --git a/examples/async.rs b/examples/async.rs index 70e6c70..dd1acd8 100644 --- a/examples/async.rs +++ b/examples/async.rs @@ -96,7 +96,7 @@ impl Decoder for LanguageServerDecoder { // (the same error messages that combine has had since its inception) // PartialStream lets the parser kno...
4
12
24
5698c0a04dce080b617fd4157f7156e8aa492e04
Markus Westerlind
2019-08-25T07:12:26
Remove inline(always)
diff --git a/benches/json.rs b/benches/json.rs index c7f3198..02524e6 100644 --- a/benches/json.rs +++ b/benches/json.rs @@ -149,7 +149,7 @@ where .expected("object") } -#[inline(always)] +#[inline] fn json_value<Input>() -> impl Parser< Input, Output = Value> where Input: Stream<Item = char>, @@ -16...
18
165
165
47764c7feb8becefd1d4c376fc11492ed3f3cd6a
Markus Westerlind
2019-08-24T18:12:06
fix: Handle partial parsing in the num parsers
diff --git a/src/error.rs b/src/error.rs index 88f43fe..722d4fc 100644 --- a/src/error.rs +++ b/src/error.rs @@ -676,6 +676,12 @@ impl<T, E> ParseResult<T, E> { ConsumedErr(_) | EmptyErr(_) => false, } } + + #[inline] + pub fn is_err(&self) -> bool { + !self.is_ok() + } + ...
3
109
12
7f4a310f8edaebe7d3bd450aca7a2823fcf2e5d6
Markus Westerlind
2019-08-24T16:35:15
feat: Add RepeatUntil
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index 05f9989..fb253c6 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -1217,6 +1217,120 @@ parser! { } } +#[derive(Copy, Clone)] +pub struct RepeatUntil<F, P, E> { + parser: P, + end: E, + _marker: PhantomData<fn() -> F>, +} +imp...
2
222
1
618c69e09afc383dadc9af305394ca82948801c3
Markus Westerlind
2019-07-04T20:52:49
fix: Don't bind the input lifetime to the parser with expected/message
diff --git a/src/parser/byte.rs b/src/parser/byte.rs index 252c4b4..2c2b37e 100644 --- a/src/parser/byte.rs +++ b/src/parser/byte.rs @@ -33,7 +33,7 @@ where token(c) } -impl_token_parser! { Digit(), u8, Expected<Satisfy<Input, fn (u8) -> bool>, Input::Item, Input::Range> } +impl_token_parser! { Digit(), u8, Exp...
7
57
49
19b1a73ed3516d14b392aefeba0363d01937be22
Markus Westerlind
2019-07-03T18:43:46
feat: Generalize factory to take the Input BREAKING CHANGE The function that `factory` takes now takes 1 parameter
diff --git a/src/parser/combinator.rs b/src/parser/combinator.rs index e8b584a..6d68620 100644 --- a/src/parser/combinator.rs +++ b/src/parser/combinator.rs @@ -987,15 +987,15 @@ where #[derive(Copy, Clone)] pub struct Factory<P, R>(P, Option<R>); -impl<P, R> Factory<P, R> -where - P: FnMut() -> R, -{ - fn pa...
1
18
14
f75b1a1a37a86ed2ac156fd27da7108a27f2e713
Markus Westerlind
2019-07-01T22:01:18
then_input
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index 68b51cf..1065531 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -1338,7 +1338,7 @@ pub struct Iterate<F, I, P> { } impl<'s, 'a, P, Q, I, J, F> Parser<I> for Iterate<F, J, P> where - P: FnMut(&J::Item) -> Q, + P: FnMut(&J::Item, &mu...
1
4
4
894b8a3177459abc818dc0cdf9ebadb815d93c9c
Markus Westerlind
2019-07-01T21:54:56
refactor: Simplify the parser! macro
diff --git a/src/lib.rs b/src/lib.rs index 6b483ee..b31aa69 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -334,209 +334,77 @@ macro_rules! impl_token_parser { #[macro_export] macro_rules! parser { ( + type PartialState = $partial_state: ty; $(#[$attr:meta])* - pub fn $name: ident [$($type_pa...
1
29
163
342a45b484240ace2e313138b2818c95cbec3427
Markus Westerlind
2019-06-28T22:46:33
feat: Add the iterate parser
diff --git a/src/parser/combinator.rs b/src/parser/combinator.rs index 796e4a9..e8b584a 100644 --- a/src/parser/combinator.rs +++ b/src/parser/combinator.rs @@ -1312,16 +1312,16 @@ pub struct InputConverter<InputInner, P, C> where InputInner: Stream, { - parser: P, - converter: C, - _marker: PhantomData...
2
127
22
3fb74be5a3fda771a8c67a783b23759d64b946f5
Markus Westerlind
2019-06-25T21:20:10
converter
diff --git a/src/parser/combinator.rs b/src/parser/combinator.rs index 2f44856..796e4a9 100644 --- a/src/parser/combinator.rs +++ b/src/parser/combinator.rs @@ -1308,21 +1308,20 @@ macro_rules! opaque { }; } -pub struct InputConverter<Input, InputInner, P> +pub struct InputConverter<InputInner, P, C> where - ...
1
48
17
5cbbc3a696cb754632494f7bd8f147f840c856f5
Markus Westerlind
2019-06-25T21:02:35
Fix tests
diff --git a/src/lib.rs b/src/lib.rs index 4bccc33..6b483ee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,7 +20,7 @@ //! //! ```rust //! extern crate combine; -//! use combine::Parser; +//! use combine::{Parser, EasyParser}; //! use combine::stream::state::State; //! use combine::parser::char::{digit, letter}; ...
7
20
17
5a213e089c7656b4bb01156bc85e3301bb84a002
Markus Westerlind
2019-06-21T11:00:37
Fix is_partial
diff --git a/src/stream/user_state.rs b/src/stream/user_state.rs index ade83df..cf8737e 100644 --- a/src/stream/user_state.rs +++ b/src/stream/user_state.rs @@ -53,7 +53,7 @@ where } fn is_partial(&self) -> bool { - true + self.stream.is_partial() } }
1
1
1
0a4a10652fc44a05a6f5b44d58ff0dd4052729ab
Markus Westerlind
2019-08-11T09:15:03
test: Check that backtrack errors are reported
diff --git a/src/stream/easy.rs b/src/stream/easy.rs index d6ea953..25f62bb 100644 --- a/src/stream/easy.rs +++ b/src/stream/easy.rs @@ -737,7 +737,7 @@ impl<T: fmt::Display, R: fmt::Display> fmt::Display for Error<T, R> { } } -#[derive(Copy, Clone, Debug)] +#[derive(PartialEq, Eq, Copy, Clone, Debug)] pub str...
2
21
3
00ef9b72ab1cc8c46dd0a2bf65c653a3261d6bb2
Matt Taylor
2019-07-30T20:24:13
use core instead of std
diff --git a/src/parser/sequence.rs b/src/parser/sequence.rs index a4d82b0..5351cad 100644 --- a/src/parser/sequence.rs +++ b/src/parser/sequence.rs @@ -49,7 +49,7 @@ where unsafe fn unwrap_value(&mut self) -> T { match self.value.take() { Some(t) => t, - None => std::hint::unreach...
1
1
1
c3009f21ef3b6112b7c0565d4cd9a51e93723793
Matt Taylor
2019-07-30T19:06:53
Replace unreachable crate with intrinsic
diff --git a/Cargo.lock b/Cargo.lock index a992a48..814a324 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -124,7 +124,6 @@ dependencies = [ "regex 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.7 (registry+ht...
4
1
19
66d963a80bbd39c6115629d05227dbfaa3e8ebed
Markus Westerlind
2019-04-09T17:48:14
refactor: Remove impl_parser!
diff --git a/src/parser/mod.rs b/src/parser/mod.rs index a93f38b..067d245 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -17,24 +17,6 @@ use crate::ErrorOffset; use self::choice::{or, Or}; use self::sequence::{skip, with, Skip, With}; -/// Internal API. May break without a semver bump -#[macro_export] -#...
3
27
36
0740ce0fd2ade2bd19981261dfeb89cae1f63120
Markus Westerlind
2019-06-18T22:09:31
feat: Add dispatch!
diff --git a/src/parser/choice.rs b/src/parser/choice.rs index 569c45f..e49f238 100644 --- a/src/parser/choice.rs +++ b/src/parser/choice.rs @@ -685,13 +685,152 @@ where Optional(parser) } +#[macro_export] +#[doc(hidden)] +macro_rules! parse_mode_dispatch { + () => { + fn parse_partial( + &...
1
140
1
68c5d8e59bf5ef65c797deb585cc93db357d8f24
Markus Westerlind
2019-06-17T18:23:25
Version 4.0.0-alpha.2
diff --git a/Cargo.lock b/Cargo.lock index 71f7963..a992a48 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -108,7 +108,7 @@ dependencies = [ [[package]] name = "combine" -version = "4.0.0-alpha.1" +version = "4.0.0-alpha.2" dependencies = [ "ascii 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "b...
2
2
2
386556fdd6fa8be4c7b604ccdc9d2ef2b5608fe0
Markus Westerlind
2019-06-17T06:49:48
chore: No need for html reports from criterion (-7 deps)
diff --git a/Cargo.lock b/Cargo.lock index a4dd9af..71f7963 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -134,12 +134,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.33.0 (registry+https://github.c...
2
1
82
51e7e2b736f3b3ab8d9ec9877e2afa8fc31f5207
Markus Westerlind
2019-06-17T06:30:39
feat: impl Stream* for &mut T
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 0a4ceeb..2392071 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -372,6 +372,126 @@ pub trait Range { } } +impl<'a, I> StreamOnce for &'a mut I +where + I: StreamOnce + ?Sized, +{ + type Item = I::Item; + + type Range = I::Range; + + ...
1
120
26
8f695cc62268a855c3c3847661f6ffe8308b745e
Markus Westerlind
2019-06-17T06:30:21
feat: Add From<S> for easy::Stream<S>
diff --git a/src/stream/easy.rs b/src/stream/easy.rs index 418e8a8..d6ea953 100644 --- a/src/stream/easy.rs +++ b/src/stream/easy.rs @@ -84,7 +84,7 @@ use std::error::Error as StdError; use std::fmt; -use crate::error::{ParseResult, Info as PrimitiveInfo, StreamError, Tracked}; +use crate::error::{Info as Primitive...
1
7
1
6b62a857f441ab930e2f595aff3e87f992c769b8
Markus Westerlind
2019-05-14T21:09:33
feat: Allow ReadStream parsers to use &[u8] in errors Fixes #249
diff --git a/src/parser/byte.rs b/src/parser/byte.rs index 620f99c..fddc056 100644 --- a/src/parser/byte.rs +++ b/src/parser/byte.rs @@ -718,6 +718,8 @@ pub mod num { #[cfg(test)] mod tests { use super::*; + use crate::stream::{buffered, state::State, ReadStream}; + #[test] fn memslice_basic() { ...
2
14
2
bf6aeb06494abe2f1890c5bf90db86ac01ec9772
Markus Westerlind
2019-05-07T17:41:49
feat: Drop support for regex 0.2 Fixes #247 BREAKING CHANGE Use regex-1.0 instead
diff --git a/Cargo.lock b/Cargo.lock index 58945f0..4bd399d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -113,7 +113,6 @@ dependencies = [ "ascii 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.11 (registry+https:...
3
26
147
3dadbb4f2adb0447c883ea56bdbfcfd53c58d384
Markus Westerlind
2019-05-06T21:20:15
feat: Rename tokens2 to tokens and tokens to tokens_cmp Fixes #166 BREAKING CHANGE Rename tokens2 to tokens and tokens to tokens_cmp
diff --git a/src/lib.rs b/src/lib.rs index 5a7b23a..3e7972a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -213,7 +213,7 @@ pub use crate::parser::choice::choice; #[doc(inline)] pub use crate::parser::combinator::from_str; #[doc(inline)] -pub use crate::parser::item::tokens2; +pub use crate::parser::item::tokens_cmp; ...
4
31
226
6ec094efd2eecefeb2281fb99687143e7a5580e8
Markus Westerlind
2019-05-06T20:32:17
feat: Remove the std::result::Result returning parse functions Fixes #244 BREAKING CHANGE Call `into_result` on the custom, combine result type to convert back to std errors.
diff --git a/src/error.rs b/src/error.rs index bb5f3cb..86f053b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -156,7 +156,7 @@ impl<T> Consumed<T> { /// where I: Stream<Item = char>, /// I::Error: ParseError<I::Item, I::Range, I::Position>, /// { - /// let (c, consumed) = satisfy(|...
6
70
66
72e4c70fda2f283e1feadfd926ed9bb0d384cb59
Markus Westerlind
2019-05-06T20:05:50
fix: Don't require macro_use when using parser! in rust 2018 Fixes #241
diff --git a/src/lib.rs b/src/lib.rs index f583e43..4d7ed67 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -364,7 +364,7 @@ macro_rules! parser { where [$($where_clause: tt)*] $parser: block ) => { - combine_parser_impl!{ + $crate::combine_parser_impl!{ (pub) ...
2
34
37
5f6d65b30679d39c4c8a41ef0877bca8dc199095
Markus Westerlind
2019-05-06T19:59:47
fix: Make PointerOffset easier to understand and use Fixes #238 BREAKING CHANGE PointerOffset now takes a type argument to brand it to the stream type. This prevents accidentally passing `&&[T]` to `translate_position`
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 82dd991..5a1a8fd 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -11,8 +11,7 @@ //! aren't combined and the latter is used in parsers such as `or` to try multiple alternative //! parses. -use crate::lib::fmt; -use crate::lib::str::Chars; +use crate:...
2
67
19
68a837c8f750ec4f60b33bb04b4706dad3716dad
Markus Westerlind
2019-05-06T19:38:36
Fix remaining 2018 errors
diff --git a/src/error.rs b/src/error.rs index b5ae390..bb5f3cb 100644 --- a/src/error.rs +++ b/src/error.rs @@ -156,7 +156,7 @@ impl<T> Consumed<T> { /// where I: Stream<Item = char>, /// I::Error: ParseError<I::Item, I::Range, I::Position>, /// { - /// let (c, consumed) = try!(sati...
5
10
40
08ed4b367c179ba3dbaa6af7fb1ac10ddf9556c8
Markus Westerlind
2019-05-06T19:33:20
chore: Update to the 2018 edition of rust
diff --git a/Cargo.toml b/Cargo.toml index 46c7c96..be71ba8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,8 @@ categories = ["parsing", "no-std"] license = "MIT" +edition = "2018" + [lib] name = "combine" path = "src/lib.rs"
1
2
0
2d17ed9963224f103879ea17f78f362220c4617e
Markus Westerlind
2019-05-06T19:25:54
style: cargo fix --edition --all-features
diff --git a/benches/json.rs b/benches/json.rs index 5ac46ca..f9bc51c 100644 --- a/benches/json.rs +++ b/benches/json.rs @@ -15,7 +15,7 @@ use std::path::Path; use criterion::{black_box, Bencher, Criterion}; use combine::error::{Consumed, ParseError}; -use combine::stream::buffered::buffered::Stream; +use combine::...
19
189
189
0282258ec646d62bc1caed12bd420bffde765bc4
Markus Westerlind
2019-05-06T19:22:53
doc: Explain ResetStream and Stream
diff --git a/src/stream/mod.rs b/src/stream/mod.rs index 84fdc42..b9876a9 100644 --- a/src/stream/mod.rs +++ b/src/stream/mod.rs @@ -123,10 +123,14 @@ pub trait StreamOnce { } } +/// A `StreamOnce` which can create checkpoints which the stream can be reset to pub trait ResetStream: StreamOnce { type Check...
1
8
0
3055c810fd4904d2eba3f51ea232ef0232f8fbe7
Markus Westerlind
2019-05-06T17:12:11
feat: Allow reset to return errors Lets `BufferedStream` return an error during reset instead of the next time `uncons` is called. Fixes #231 BREAKING CHANGE Rename `Resetable` to `ResetStream` Add the `Result` type to `reset` definitions and make sure the error is handled at the call site
diff --git a/src/error.rs b/src/error.rs index 3097e09..8613670 100644 --- a/src/error.rs +++ b/src/error.rs @@ -9,6 +9,19 @@ use ErrorOffset; use stream::StreamOnce; +pub(crate) trait ResultExt<E, T> { + fn consumed(self) -> FastResult<E, T>; +} + +impl<E, T> ResultExt<E, T> for Result<E, T> { + fn consumed...
14
146
100
eb50e704e7b3d9e5ed4850193675c9628e5fe61a
pcpthm
2018-11-13T11:40:50
Workaround lifetime inference problem of char::string and byte::bytes
diff --git a/src/parser/byte.rs b/src/parser/byte.rs index cccf9b2..7df189b 100644 --- a/src/parser/byte.rs +++ b/src/parser/byte.rs @@ -284,18 +284,18 @@ where } #[derive(Copy, Clone)] -pub struct Bytes<I>(&'static [u8], PhantomData<I>) +pub struct Bytes<'a, I>(&'static [u8], PhantomData<(&'a [u8], I)>) where ...
3
38
21
24e1087cbff4938d48ae3e5947e2eb0dcbb8cc87
Markus Westerlind
2019-03-12T20:38:05
feat: Remove the PartialEq bound from Item and Range These bounds were only necessary for what is now `easy::Error` so since that is now its own component we can relax these bounds to let custom tokens work without needing `PartialEq`. Fixes #219 BREAKING CHANGE If you relied on these implied bounds, add them in al...
diff --git a/src/error.rs b/src/error.rs index c239524..3097e09 100644 --- a/src/error.rs +++ b/src/error.rs @@ -206,7 +206,7 @@ pub type ParseResult2<O, E> = Result<(O, Consumed<()>), Consumed<Tracked<E>>>; /// /// Usually multiple instances of `StreamError` is composed into a `ParseError` to build the final /// er...
7
41
8
181247c7ff2234fe5ff4c35cacd115c1ce890538
Markus Westerlind
2019-05-06T18:41:17
Use criterions interface
diff --git a/Cargo.lock b/Cargo.lock index 4914bed..58945f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -114,7 +114,7 @@ dependencies = [ "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "combine-regex-1 1.0.0", - "c...
5
36
36
c4f42dbdca4311a415a0c97a29922069e4b6a41d
Markus Westerlind
2019-05-06T18:32:11
chore: Use criterion for benchmarks
diff --git a/Cargo.lock b/Cargo.lock index 4a03a17..4914bed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "aho-corasick" version = "0.6.9" @@ -6,6 +8,14 @@ dependencies = [ "memchr 2.2.0 (regi...
5
426
15
dab460a14be28b367cb9e33792c75bebbd50fca8
Markus Westerlind
2019-04-12T21:46:11
converter
diff --git a/src/parser/combinator.rs b/src/parser/combinator.rs index 57a4803..94dfb53 100644 --- a/src/parser/combinator.rs +++ b/src/parser/combinator.rs @@ -1275,3 +1275,61 @@ macro_rules! opaque { ) }; } + +pub struct InputConverter<Input, InputInner, P> +where + Input: Stream, + InputInner: S...
3
82
15
29f231fa8ac7cba8b7cd9bd72052f03c349e05ce
Markus Westerlind
2019-04-12T20:58:53
Compiling decoder
diff --git a/src/parser/choice.rs b/src/parser/choice.rs index 1c36b29..0d1b288 100644 --- a/src/parser/choice.rs +++ b/src/parser/choice.rs @@ -3,7 +3,6 @@ use error::FastResult::*; use error::{ConsumedResult, ParseError, StreamError, Tracked}; use parser::ParseMode; -use stream::Resetable; use {ErrorOffset, Parse...
7
30
50
215ad265c614fcbad66dbd88a8d82a69c4cb01f4
Markus Westerlind
2019-04-09T17:48:14
refactor: Remove impl_parser!
diff --git a/src/parser/mod.rs b/src/parser/mod.rs index afc1783..45062c0 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -17,24 +17,6 @@ use ErrorOffset; use self::choice::{or, Or}; use self::sequence::{skip, with, Skip, With}; -/// Internal API. May break without a semver bump -#[macro_export] -#[doc(hi...
3
28
37
aa58a7fde6c915dcb366ac6521728d3f81bdb6c1
Markus Westerlind
2019-03-13T20:37:35
(cargo-release) start next development iteration 3.8.2-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index ea6a663..4a03a17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,7 +52,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "combine" -version = "3.8.1-alpha.0" +version = "3.8.2-alpha.0" dependencies = [ "ascii 0.9.1 (registry+https:...
2
2
2
bdbcdfe1aebd6f49d9dfe0bfa0fef78752d26947
Markus Westerlind
2019-03-13T20:37:06
(cargo-release) version 3.8.1
diff --git a/Cargo.toml b/Cargo.toml index 32dc72b..43ea728 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "combine" -version = "3.8.1-alpha.0" +version = "3.8.1" authors = ["Markus Westerlind <marwes91@gmail.com>"] description = "Fast parser combinators on arbitrary streams with zero...
1
1
1
bae1e3bbe476fb3fe7c4ff6cc375e50f3d9cfd45
Markus Westerlind
2019-03-13T15:13:17
fix: Handle partial parsing in `take_fn/take_until*`
diff --git a/src/parser/byte.rs b/src/parser/byte.rs index 69bd29f..cccf9b2 100644 --- a/src/parser/byte.rs +++ b/src/parser/byte.rs @@ -7,7 +7,7 @@ use self::ascii::AsciiChar; use combinator::{satisfy, skip_many, token, tokens, Expected, Satisfy, SkipMany, Token}; use error::{ConsumedResult, Info, ParseError, Trac...
3
102
15
4440bbf5cd1b44f1ec585c9fdd5a604238b2c9c7
Markus Westerlind
2019-03-12T20:23:33
(cargo-release) start next development iteration 3.8.1-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index 9044088..ea6a663 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,7 +52,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "combine" -version = "3.6.8-alpha.0" +version = "3.8.1-alpha.0" dependencies = [ "ascii 0.9.1 (registry+https:...
2
2
2
53f7fa0801b73e17c6558da4db9f77576694d434
Markus Westerlind
2019-03-12T20:23:08
(cargo-release) version 3.8.0
diff --git a/Cargo.toml b/Cargo.toml index bcf8964..eea01a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "combine" -version = "3.7.0" +version = "3.8.0" authors = ["Markus Westerlind <marwes91@gmail.com>"] description = "Fast parser combinators on arbitrary streams with zero-copy su...
1
1
1
ea28478d2e9e55a25753f5b176ec3002b0af520b
Markus Westerlind
2019-03-12T20:22:35
(cargo-release) version 3.7.0
diff --git a/Cargo.toml b/Cargo.toml index 76c36e6..bcf8964 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "combine" -version = "3.6.8-alpha.0" +version = "3.7.0" authors = ["Markus Westerlind <marwes91@gmail.com>"] description = "Fast parser combinators on arbitrary streams with zero...
1
1
1
5f5607806f8e133485c990419a03de8c7531fa14
Markus Westerlind
2019-03-12T15:49:54
feat: Add take_fn and take_until_bytes * `take_fn` simplifies the use of searchers/parsers outside of combine (for example `memchr` or `jetscii`) * `take_until_bytes` builds on `take_fn` and uses `memchr` to quickly find the next instance of a byte string.
diff --git a/Cargo.lock b/Cargo.lock index 7773775..9044088 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,7 +3,7 @@ name = "aho-corasick" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "m...
5
167
98
291f9acde136a93635c23d579ed3dbc846978098
Markus Westerlind
2019-02-13T22:57:59
(cargo-release) start next development iteration 3.6.8-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index 204227a..7773775 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,7 +52,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "combine" -version = "3.6.7-alpha.0" +version = "3.6.8-alpha.0" dependencies = [ "ascii 0.9.1 (registry+https:...
2
2
2
e1b67a25d6ebcd6162234aa88662fced1952c923
Markus Westerlind
2019-02-13T22:57:29
(cargo-release) version 3.6.7
diff --git a/Cargo.toml b/Cargo.toml index fc94f8d..30e9166 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "combine" -version = "3.6.7-alpha.0" +version = "3.6.7" authors = ["Markus Westerlind <marwes91@gmail.com>"] description = "Fast parser combinators on arbitrary streams with zero...
1
1
1
121b39879543c074924185dfe17d6b4f434ce413
Markus Westerlind
2019-02-13T22:37:43
fix: Forward is_partial in all Stream adaptors
diff --git a/src/stream/buffered.rs b/src/stream/buffered.rs index 7f4690d..1ec906e 100644 --- a/src/stream/buffered.rs +++ b/src/stream/buffered.rs @@ -123,4 +123,8 @@ where Ok(value) } } + + fn is_partial(&self) -> bool { + self.iter.is_partial() + } } diff --git a/src/stream/...
3
14
6
d7d857c07145558da19dc2c01b09a495940843e5
Markus Westerlind
2019-01-12T11:11:46
(cargo-release) start next development iteration 3.6.7-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index c12e556..204227a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,7 +52,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "combine" -version = "3.6.6" +version = "3.6.7-alpha.0" dependencies = [ "ascii 0.9.1 (registry+https://github...
2
2
2
173e7835770e3ffeab192da12e01e477c8e8d839
Markus Westerlind
2019-01-12T11:11:16
(cargo-release) version 3.6.6
diff --git a/Cargo.lock b/Cargo.lock index 4ec2af2..c12e556 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,7 +52,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "combine" -version = "3.6.6-alpha.0" +version = "3.6.6" dependencies = [ "ascii 0.9.1 (registry+https://github...
2
2
2
e489bad9cccfd13d3b3b127eae4b25b47d831bab
Phaiax
2019-01-10T20:20:01
FixFix: Compatability with rust 1.20.0
diff --git a/src/error.rs b/src/error.rs index a379b35..c239524 100644 --- a/src/error.rs +++ b/src/error.rs @@ -441,8 +441,8 @@ where #[inline] fn add(&mut self, err: Self::StreamError) { - *self = match (&self, err) { - (&UnexpectedParse::Eoi, _) => UnexpectedParse::Eoi, + *self =...
1
4
4
26ae100f067051a9a48a265f2810edc95b2988db
Phaiax
2019-01-10T19:19:27
Fix two inconsisties regarding EOI 1. - `easy::Errors` is EOI if any of it's added `StreamError`s is EOI while - `UnexpectedParse`/`StringStreamError` is EOI if the last added `StreamError` is EOI 2. - `StringStreamError::into_other()` propagates EOI while `UnexpectedParse` stringifies it.
diff --git a/src/error.rs b/src/error.rs index 32273ff..a379b35 100644 --- a/src/error.rs +++ b/src/error.rs @@ -414,11 +414,10 @@ impl<Item, Range> StreamError<Item, Range> for UnexpectedParse { where T: StreamError<Item, Range>, { - let msg = match self { - UnexpectedParse::Unexpe...
1
12
7
b2d4a46d62fcc4e7cf0fdcf31ab8df7e2c9a0cc5
Markus Westerlind
2019-01-09T21:47:21
(cargo-release) start next development iteration 3.6.6-alpha.0
diff --git a/Cargo.lock b/Cargo.lock index ab3c7e4..4ec2af2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,7 +52,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "combine" -version = "3.6.4-alpha.0" +version = "3.6.6-alpha.0" dependencies = [ "ascii 0.9.1 (registry+https:...
2
2
2
694ed6b373c351704b096b4861f13d0ced3fa8e5
Markus Westerlind
2019-01-09T21:46:52
(cargo-release) version 3.6.5
diff --git a/Cargo.toml b/Cargo.toml index 5153a48..a67c5b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "combine" -version = "3.6.4" +version = "3.6.5" authors = ["Markus Westerlind <marwes91@gmail.com>"] description = "Fast parser combinators on arbitrary streams with zero-copy su...
1
1
1
0fda80a8994edb0abea308c43c72d41ccc6838c0
Markus Westerlind
2019-01-09T21:45:56
(cargo-release) version 3.6.4
diff --git a/Cargo.toml b/Cargo.toml index 514afc7..5153a48 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "combine" -version = "3.6.4-alpha.0" +version = "3.6.4" authors = ["Markus Westerlind <marwes91@gmail.com>"] description = "Fast parser combinators on arbitrary streams with zero...
1
1
1
aa17e7d25532eebdb6c447459c8550a4fb6bbe93
Markus Westerlind
2019-01-08T21:32:55
fix: not_followed_by should fail on empty successful parses
diff --git a/src/parser/combinator.rs b/src/parser/combinator.rs index ab88e72..ff7d6fe 100644 --- a/src/parser/combinator.rs +++ b/src/parser/combinator.rs @@ -6,8 +6,6 @@ use lib::mem; use lib::str; use error::{ConsumedResult, Info, ParseError, StreamError, Tracked}; -use parser::error::unexpected; -use parser::i...
2
63
16
ae8882449ee935f7ffb0dd3ef7f0e2d8d6932409
Markus Westerlind
2019-01-08T21:03:31
fix: Propagate the PartialState through parser! uses Missed a few places where PartialState weren't defined and the state where therefore lost while passing through these parsers. Fixes #223
diff --git a/src/lib.rs b/src/lib.rs index 88bc6c7..3117f1e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -973,7 +973,7 @@ mod std_tests { Times(Box<Expr>, Box<Expr>), } - parser!{ + parser! { fn expr[I]()(I) -> Expr where [I: Stream<Item = char>,] diff --git a/src/par...
6
47
27
3cad96651ae1a29ecafed7f65a987a67a1f9a4d2
Joonas Javanainen
2018-12-20T22:36:44
Byteacters are just bytes
diff --git a/src/parser/byte.rs b/src/parser/byte.rs index bbda743..1f0c146 100644 --- a/src/parser/byte.rs +++ b/src/parser/byte.rs @@ -14,7 +14,7 @@ use Parser; use error::FastResult::*; -/// Parses a byteacter and succeeds if the byteacter is equal to `c`. +/// Parses a byte and succeeds if the byte is equal to...
1
4
4
6d1aa70015f2f458a09be94f49fb0e2e9bd40887
Markus Westerlind
2018-11-16T12:06:07
(cargo-release) start next development iteration 3.6.4-alpha.0
diff --git a/Cargo.toml b/Cargo.toml index 995f347..514afc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "combine" -version = "3.6.3" +version = "3.6.4-alpha.0" authors = ["Markus Westerlind <marwes91@gmail.com>"] description = "Fast parser combinators on arbitrary streams with zero...
1
1
1
6bf9d9558b7365bb98f65323d960f74973e4de01
Markus Westerlind
2018-11-16T12:05:21
(cargo-release) version 3.6.3
diff --git a/Cargo.toml b/Cargo.toml index 9557a17..995f347 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "combine" -version = "3.6.3-alpha.0" +version = "3.6.3" authors = ["Markus Westerlind <marwes91@gmail.com>"] description = "Fast parser combinators on arbitrary streams with zero...
1
1
1
fd6b548a6430e9913cf674f8309d9b20655f15cb
Markus Westerlind
2018-11-15T11:53:16
Implement count in terms of count_min_max Closes #216
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index 0ea2af0..d985546 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -14,50 +14,9 @@ use {ErrorOffset, Parser}; use error::FastResult::*; +parser!{ #[derive(Copy, Clone)] -pub struct Count<F, P> { - parser: P, - count: usize, - _m...
1
8
50
71d3adc9c3794822e0c9b194bf4ffc34ba288632
Markus Westerlind
2018-11-15T10:38:27
Run rustfmt
diff --git a/benches/http.rs b/benches/http.rs index 4abff34..9be42f8 100644 --- a/benches/http.rs +++ b/benches/http.rs @@ -80,7 +80,8 @@ where take_while1(is_horizontal_space), take_while1(|c| c != b'\r' && c != b'\n'), end_of_line(), - ).map(|(_, line, _)| line); + ) + .map(|(...
16
99
89
3c3bb94a7ed8f59b32835046ecec67d6b06f0f39
Blake Smith
2018-11-15T04:26:07
Reset count state after extending the iterator
diff --git a/src/parser/repeat.rs b/src/parser/repeat.rs index 61c600d..01759cb 100644 --- a/src/parser/repeat.rs +++ b/src/parser/repeat.rs @@ -50,6 +50,7 @@ where .inspect(|_| *count += 1), ); + *count = 0; iter.into_result_fast(elements) } diff --git a/tests/parser....
2
24
1