Skip to content

Commit

Permalink
Merge branch 'main' into epage-aschar
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal authored May 5, 2024
2 parents 8663071 + cea6595 commit 6303c74
Show file tree
Hide file tree
Showing 77 changed files with 9,981 additions and 4,227 deletions.
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Please provide the following information with this pull request:
- related issue number (I need some context to understand a PR with a lot of
code, except for documentation typos)
- a test case reproducing the issue. You can write it in [issues.rs](https://github.com/Geal/nom/blob/main/tests/issues.rs)
- a test case reproducing the issue. You can write it in [issues.rs](https://github.com/rust-bakery/nom/blob/main/tests/issues.rs)
- if adding a new combinator, please add code documentation and some unit tests
in the same file. Also, please update the [combinator list](https://github.com/Geal/nom/blob/main/doc/choosing_a_combinator.md)
in the same file. Also, please update the [combinator list](https://github.com/rust-bakery/nom/blob/main/doc/choosing_a_combinator.md)
## Code style
This project follows a [code style](https://github.com/Geal/nom/blob/main/rustfmt.toml)
checked by [rustfmt][https://github.com/rust-lang-nursery/rustfmt].
This project follows a [code style](https://github.com/rust-bakery/nom/blob/main/rustfmt.toml)
checked by [rustfmt](https://github.com/rust-lang/rustfmt).
Please avoid cosmetic fixes unrelated to the pull request. Keeping the changes
as small as possible increase your chances of getting this merged quickly.
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push, pull_request]

env:
RUST_MINVERSION: 1.41.1
RUST_MINVERSION: 1.65.0
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10

Expand All @@ -18,7 +18,7 @@ jobs:
- stable
- beta
- nightly
- 1.48.0
- 1.65.0

features:
- ''
Expand Down Expand Up @@ -190,9 +190,10 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: tarpaulin
args: --output-dir coverage --out Lcov
args: --output-dir coverage --out xml --workspace --exclude benchmarks

- name: Publish to Coveralls
uses: coverallsapp/github-action@master
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
slug: rust-bakery/nom
32 changes: 32 additions & 0 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: codspeed-benchmarks

on:
push:
branches:
- "main"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:

jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup rust toolchain, cache and cargo-codspeed binary
uses: moonrepo/setup-rust@v0
with:
channel: stable
cache-target: release
bins: cargo-codspeed

- name: Build the benchmark target(s)
run: cargo codspeed build -p benchmarks

- name: Run the benchmarks
uses: CodSpeedHQ/action@v2
with:
run: cargo codspeed run -p benchmarks
token: ${{ secrets.CODSPEED_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ realworld/
src/generator.rs
.DS_Store
private-docs/
.idea/
182 changes: 120 additions & 62 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,61 @@

### Changed

## 7.1.2 - 2023-01-01

### 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_n` to 64kiB
- bits parser now accept `Parser` implementors instead of only functions

### Added

- implement `Tuple` parsing for the unit type as a special case
- implement `ErrorConvert` on the unit type to make it usable as error type for bits parsers
- bool parser for bits input

## 7.1.1 - 2022-03-14

### Thanks

- @ThomasdenH
- @@SphinxKnight
- @irevoire
- @doehyunbaek
- @pxeger
- @punkeel
- @max-sixty
- @Xiretza
- @5c077m4n
- @erihsu
- @TheNeikos
- @LoganDark
- @nickelc
- @chotchki
- @ctrlcctrlv


### Changed

- documentation fixes
- more examples

## 7.1.0 - 2021-11-04

### Thanks
Expand Down Expand Up @@ -851,7 +906,7 @@ Bugfix release

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](https://github.com/Geal/nom/blob/main/doc/upgrading_to_nom_2.md) 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.
Since this version introduces a few breaking changes, an [upgrade documentation](https://github.com/rust-bakery/nom/blob/main/doc/archive/upgrading_to_nom_2.md) 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.

Expand Down Expand Up @@ -1366,7 +1421,7 @@ Considering the number of changes since the last release, this version can conta
### Added
- `peek!` macro: matches the future input but does not consume it
- `length_value!` macro: the first argument is a parser returning a `n` that can cast to usize, then applies the second parser `n` times. The macro has a variant with a third argument indicating the expected input size for the second parser
- benchmarks are available at https://github.com/Geal/nom_benchmarks
- benchmarks are available at https://github.com/rust-bakery/parser_benchmarks
- more documentation
- **Unnamed parser syntax**: warning, this is a breaking change. With this new syntax, the macro combinators do not generate functions anymore, they create blocks. That way, they can be nested, for better readability. The `named!` macro is provided to create functions from parsers. Please be aware that nesting parsers comes with a small cost of compilation time, negligible in most cases, but can quickly get to the minutes scale if not careful. If this happens, separate your parsers in multiple subfunctions.
- `named!`, `closure!` and `call!` macros used to support the unnamed syntax
Expand Down Expand Up @@ -1420,63 +1475,66 @@ Considering the number of changes since the last release, this version can conta

## Compare code

* [unreleased](https://github.com/Geal/nom/compare/7.0.0...HEAD)
* [7.0.0](https://github.com/Geal/nom/compare/6.2.1...7.0.0)
* [6.2.1](https://github.com/Geal/nom/compare/6.2.0...6.2.1)
* [6.2.0](https://github.com/Geal/nom/compare/6.1.2...6.2.0)
* [6.1.2](https://github.com/Geal/nom/compare/6.1.1...6.1.2)
* [6.1.1](https://github.com/Geal/nom/compare/6.1.0...6.1.1)
* [6.1.0](https://github.com/Geal/nom/compare/6.0.1...6.1.0)
* [6.0.1](https://github.com/Geal/nom/compare/6.0.0...6.0.1)
* [6.0.0](https://github.com/Geal/nom/compare/5.1.1...6.0.0)
* [5.1.1](https://github.com/Geal/nom/compare/5.1.0...5.1.1)
* [5.1.0](https://github.com/Geal/nom/compare/5.0.1...5.1.0)
* [5.0.1](https://github.com/Geal/nom/compare/5.0.0...5.0.1)
* [5.0.0](https://github.com/Geal/nom/compare/4.2.3...5.0.0)
* [4.2.3](https://github.com/Geal/nom/compare/4.2.2...4.2.3)
* [4.2.2](https://github.com/Geal/nom/compare/4.2.1...4.2.2)
* [4.2.1](https://github.com/Geal/nom/compare/4.2.0...4.2.1)
* [4.2.0](https://github.com/Geal/nom/compare/4.1.1...4.2.0)
* [4.1.1](https://github.com/Geal/nom/compare/4.1.0...4.1.1)
* [4.1.0](https://github.com/Geal/nom/compare/4.0.0...4.1.0)
* [4.0.0](https://github.com/Geal/nom/compare/3.2.1...4.0.0)
* [3.2.1](https://github.com/Geal/nom/compare/3.2.0...3.2.1)
* [3.2.0](https://github.com/Geal/nom/compare/3.1.0...3.2.0)
* [3.1.0](https://github.com/Geal/nom/compare/3.0.0...3.1.0)
* [3.0.0](https://github.com/Geal/nom/compare/2.2.1...3.0.0)
* [2.2.1](https://github.com/Geal/nom/compare/2.2.0...2.2.1)
* [2.2.0](https://github.com/Geal/nom/compare/2.1.0...2.2.0)
* [2.1.0](https://github.com/Geal/nom/compare/2.0.1...2.1.0)
* [2.0.1](https://github.com/Geal/nom/compare/2.0.0...2.0.1)
* [2.0.0](https://github.com/Geal/nom/compare/1.2.4...2.0.0)
* [1.2.4](https://github.com/Geal/nom/compare/1.2.3...1.2.4)
* [1.2.3](https://github.com/Geal/nom/compare/1.2.2...1.2.3)
* [1.2.2](https://github.com/Geal/nom/compare/1.2.1...1.2.2)
* [1.2.1](https://github.com/Geal/nom/compare/1.2.0...1.2.1)
* [1.2.0](https://github.com/Geal/nom/compare/1.1.0...1.2.0)
* [1.1.0](https://github.com/Geal/nom/compare/1.0.1...1.1.0)
* [1.0.1](https://github.com/Geal/nom/compare/1.0.0...1.0.1)
* [1.0.0](https://github.com/Geal/nom/compare/0.5.0...1.0.0)
* [0.5.0](https://github.com/geal/nom/compare/0.4.0...0.5.0)
* [0.4.0](https://github.com/geal/nom/compare/0.3.11...0.4.0)
* [0.3.11](https://github.com/geal/nom/compare/0.3.10...0.3.11)
* [0.3.10](https://github.com/geal/nom/compare/0.3.9...0.3.10)
* [0.3.9](https://github.com/geal/nom/compare/0.3.8...0.3.9)
* [0.3.8](https://github.com/Geal/nom/compare/0.3.7...0.3.8)
* [0.3.7](https://github.com/Geal/nom/compare/0.3.6...0.3.7)
* [0.3.6](https://github.com/Geal/nom/compare/0.3.5...0.3.6)
* [0.3.5](https://github.com/Geal/nom/compare/0.3.4...0.3.5)
* [0.3.4](https://github.com/Geal/nom/compare/0.3.3...0.3.4)
* [0.3.3](https://github.com/Geal/nom/compare/0.3.2...0.3.3)
* [0.3.2](https://github.com/Geal/nom/compare/0.3.1...0.3.2)
* [0.3.1](https://github.com/Geal/nom/compare/0.3.0...0.3.1)
* [0.3.0](https://github.com/Geal/nom/compare/0.2.2...0.3.0)
* [0.2.2](https://github.com/Geal/nom/compare/0.2.1...0.2.2)
* [0.2.1](https://github.com/Geal/nom/compare/0.2.0...0.2.1)
* [0.2.0](https://github.com/Geal/nom/compare/0.1.6...0.2.0)
* [0.1.6](https://github.com/Geal/nom/compare/0.1.5...0.1.6)
* [0.1.5](https://github.com/Geal/nom/compare/0.1.4...0.1.5)
* [0.1.4](https://github.com/Geal/nom/compare/0.1.3...0.1.4)
* [0.1.3](https://github.com/Geal/nom/compare/0.1.2...0.1.3)
* [0.1.2](https://github.com/Geal/nom/compare/0.1.1...0.1.2)
* [0.1.1](https://github.com/Geal/nom/compare/0.1.0...0.1.1)
* [unreleased](https://github.com/rust-bakery/nom/compare/7.1.2...HEAD)
* [7.1.2](https://github.com/rust-bakery/nom/compare/7.1.1...7.1.2)
* [7.1.1](https://github.com/rust-bakery/nom/compare/7.1.0...7.1.1)
* [7.1.0](https://github.com/rust-bakery/nom/compare/7.0.0...7.1.0)
* [7.0.0](https://github.com/rust-bakery/nom/compare/6.2.1...7.0.0)
* [6.2.1](https://github.com/rust-bakery/nom/compare/6.2.0...6.2.1)
* [6.2.0](https://github.com/rust-bakery/nom/compare/6.1.2...6.2.0)
* [6.1.2](https://github.com/rust-bakery/nom/compare/6.1.1...6.1.2)
* [6.1.1](https://github.com/rust-bakery/nom/compare/6.1.0...6.1.1)
* [6.1.0](https://github.com/rust-bakery/nom/compare/6.0.1...6.1.0)
* [6.0.1](https://github.com/rust-bakery/nom/compare/6.0.0...6.0.1)
* [6.0.0](https://github.com/rust-bakery/nom/compare/5.1.1...6.0.0)
* [5.1.1](https://github.com/rust-bakery/nom/compare/5.1.0...5.1.1)
* [5.1.0](https://github.com/rust-bakery/nom/compare/5.0.1...5.1.0)
* [5.0.1](https://github.com/rust-bakery/nom/compare/5.0.0...5.0.1)
* [5.0.0](https://github.com/rust-bakery/nom/compare/4.2.3...5.0.0)
* [4.2.3](https://github.com/rust-bakery/nom/compare/4.2.2...4.2.3)
* [4.2.2](https://github.com/rust-bakery/nom/compare/4.2.1...4.2.2)
* [4.2.1](https://github.com/rust-bakery/nom/compare/4.2.0...4.2.1)
* [4.2.0](https://github.com/rust-bakery/nom/compare/4.1.1...4.2.0)
* [4.1.1](https://github.com/rust-bakery/nom/compare/4.1.0...4.1.1)
* [4.1.0](https://github.com/rust-bakery/nom/compare/4.0.0...4.1.0)
* [4.0.0](https://github.com/rust-bakery/nom/compare/3.2.1...4.0.0)
* [3.2.1](https://github.com/rust-bakery/nom/compare/3.2.0...3.2.1)
* [3.2.0](https://github.com/rust-bakery/nom/compare/3.1.0...3.2.0)
* [3.1.0](https://github.com/rust-bakery/nom/compare/3.0.0...3.1.0)
* [3.0.0](https://github.com/rust-bakery/nom/compare/2.2.1...3.0.0)
* [2.2.1](https://github.com/rust-bakery/nom/compare/2.2.0...2.2.1)
* [2.2.0](https://github.com/rust-bakery/nom/compare/2.1.0...2.2.0)
* [2.1.0](https://github.com/rust-bakery/nom/compare/2.0.1...2.1.0)
* [2.0.1](https://github.com/rust-bakery/nom/compare/2.0.0...2.0.1)
* [2.0.0](https://github.com/rust-bakery/nom/compare/1.2.4...2.0.0)
* [1.2.4](https://github.com/rust-bakery/nom/compare/1.2.3...1.2.4)
* [1.2.3](https://github.com/rust-bakery/nom/compare/1.2.2...1.2.3)
* [1.2.2](https://github.com/rust-bakery/nom/compare/1.2.1...1.2.2)
* [1.2.1](https://github.com/rust-bakery/nom/compare/1.2.0...1.2.1)
* [1.2.0](https://github.com/rust-bakery/nom/compare/1.1.0...1.2.0)
* [1.1.0](https://github.com/rust-bakery/nom/compare/1.0.1...1.1.0)
* [1.0.1](https://github.com/rust-bakery/nom/compare/1.0.0...1.0.1)
* [1.0.0](https://github.com/rust-bakery/nom/compare/0.5.0...1.0.0)
* [0.5.0](https://github.com/rust-bakery/nom/compare/0.4.0...0.5.0)
* [0.4.0](https://github.com/rust-bakery/nom/compare/0.3.11...0.4.0)
* [0.3.11](https://github.com/rust-bakery/nom/compare/0.3.10...0.3.11)
* [0.3.10](https://github.com/rust-bakery/nom/compare/0.3.9...0.3.10)
* [0.3.9](https://github.com/rust-bakery/nom/compare/0.3.8...0.3.9)
* [0.3.8](https://github.com/rust-bakery/nom/compare/0.3.7...0.3.8)
* [0.3.7](https://github.com/rust-bakery/nom/compare/0.3.6...0.3.7)
* [0.3.6](https://github.com/rust-bakery/nom/compare/0.3.5...0.3.6)
* [0.3.5](https://github.com/rust-bakery/nom/compare/0.3.4...0.3.5)
* [0.3.4](https://github.com/rust-bakery/nom/compare/0.3.3...0.3.4)
* [0.3.3](https://github.com/rust-bakery/nom/compare/0.3.2...0.3.3)
* [0.3.2](https://github.com/rust-bakery/nom/compare/0.3.1...0.3.2)
* [0.3.1](https://github.com/rust-bakery/nom/compare/0.3.0...0.3.1)
* [0.3.0](https://github.com/rust-bakery/nom/compare/0.2.2...0.3.0)
* [0.2.2](https://github.com/rust-bakery/nom/compare/0.2.1...0.2.2)
* [0.2.1](https://github.com/rust-bakery/nom/compare/0.2.0...0.2.1)
* [0.2.0](https://github.com/rust-bakery/nom/compare/0.1.6...0.2.0)
* [0.1.6](https://github.com/rust-bakery/nom/compare/0.1.5...0.1.6)
* [0.1.5](https://github.com/rust-bakery/nom/compare/0.1.4...0.1.5)
* [0.1.4](https://github.com/rust-bakery/nom/compare/0.1.3...0.1.4)
* [0.1.3](https://github.com/rust-bakery/nom/compare/0.1.2...0.1.3)
* [0.1.2](https://github.com/rust-bakery/nom/compare/0.1.1...0.1.2)
* [0.1.1](https://github.com/rust-bakery/nom/compare/0.1.0...0.1.1)
15 changes: 8 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following is a set of guidelines for contributing to [nom][1].

**Since the project is young**: consider those best practices prone to change. Please suggest improvements!

[1]: https://github.com/geal/nom
[1]: https://github.com/rust-bakery/nom

## Basics

Expand All @@ -15,7 +15,7 @@ The following is a set of guidelines for contributing to [nom][1].
The project uses the [MIT][l1] license. By contributing to this project you agree to license
your changes under this license.

[l1]: https://opensource.org/licenses/MIT
[l1]: https://opensource.org/license/mit/


## What to do
Expand All @@ -25,9 +25,9 @@ your changes under this license.
There is plenty of [features missing][i1] and possibly bugs might be already there. Feel free to add new [issues][i2]
and to wrangle over those already [open][i3] and help fixing them.

[i1]: https://github.com/geal/nom/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement
[i2]: https://github.com/geal/nom/issues
[i3]: https://github.com/geal/nom/issues?q=is%3Aopen+is%3Aissue
[i1]: https://github.com/rust-bakery/nom/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement
[i2]: https://github.com/rust-bakery/nom/issues
[i3]: https://github.com/rust-bakery/nom/issues?q=is%3Aopen+is%3Aissue

### Code

Expand Down Expand Up @@ -61,7 +61,7 @@ If possible provide:
- a backtrace, if it is a crash.
- a sample file, if it is a decoding or encoding issue.

[is1]: https://gist.github.com
[is1]: https://gist.github.com/

### Coding style

Expand All @@ -70,5 +70,6 @@ Readable code is the first step on having good and safe libraries.

To avoid slight differences appearing in nightly versions, please
use the following command to run rustfmt: `cargo +stable fmt`
[cs1]: https://github.com/rust-lang-nursery/rustfmt

[cs1]: https://github.com/rust-lang/rustfmt

Loading

0 comments on commit 6303c74

Please sign in to comment.