Skip to content

Commit a2ab885

Browse files
committed
prep releasing v0.6
1 parent 7cd8788 commit a2ab885

File tree

8 files changed

+24
-74
lines changed

8 files changed

+24
-74
lines changed

Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
[package]
22
name = "bnf"
33
# don't manually edit this version unless you're sure you want to circumvent the process documented in RELEASE.md
4-
version = "0.5.0"
4+
version = "0.6.0"
55
edition = "2024"
66
authors = ["@shnewto", "@CrockAgile"]
77

88
description = "A library for parsing Backus–Naur form context-free grammars"
99
readme = "README.md"
1010
keywords = ["bnf", "earley", "parser"]
11+
categories = ["parser-implementations", "parsing", "development-tools"]
1112
exclude = [".github", "tests", "*.snap", "*.bnf"]
1213

1314
homepage = "https://github.com/shnewto/bnf"
1415
repository = "https://github.com/shnewto/bnf"
16+
documentation = "https://docs.rs/bnf"
1517

1618
license = "MIT"
1719

@@ -51,9 +53,6 @@ hashbrown = "0.16.1"
5153
[dependencies.rand]
5254
version = "0.9.2"
5355

54-
[dependencies.mutants]
55-
version = "0.0.4"
56-
5756
[dependencies.nom]
5857
version = "^8.0.0"
5958

@@ -69,6 +68,7 @@ optional = true
6968
[dev-dependencies]
7069
divan = "0.1.21"
7170
insta = { version = "1.46.1", default-features = false }
71+
mutants = "0.0.4"
7272

7373
[dev-dependencies.quickcheck]
7474
version = "1.0.3"
@@ -80,6 +80,9 @@ serde = ["dep:serde", "dep:serde_json"]
8080
unstable = []
8181
tracing = ["dep:tracing", "dep:tracing-subscriber", "dep:tracing-flame"]
8282

83+
[package.metadata.docs.rs]
84+
all-features = true
85+
8386
[[bench]]
8487
name = "divan"
8588
harness = false

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@
44
[![coveralls](https://coveralls.io/repos/github/shnewto/bnf/badge.svg?branch=main)](https://coveralls.io/github/shnewto/bnf?branch=main)
55
[![Crates.io Version](https://img.shields.io/crates/v/bnf.svg)](https://crates.io/crates/bnf)
66
[![Crates.io](https://img.shields.io/crates/d/bnf.svg)](https://crates.io/crates/bnf)
7+
[![Documentation](https://docs.rs/bnf/badge.svg)](https://docs.rs/bnf)
78
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/shnewto/bnf/blob/main/LICENSE)
89

910
A library for parsing Backus–Naur form context-free grammars.
1011

12+
## Installation
13+
14+
Add to your `Cargo.toml`:
15+
16+
```toml
17+
[dependencies]
18+
bnf = "0.6"
19+
```
20+
1121
## What does a parsable BNF grammar look like?
1222

1323
The following grammar from the

src/earley/grammar.rs

Lines changed: 0 additions & 63 deletions
This file was deleted.

src/earley/input_range.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl<'gram> InputRange<'gram> {
3939
},
4040
}
4141
}
42-
#[mutants::skip]
42+
#[cfg_attr(test, mutants::skip)]
4343
pub fn advance_by(&self, step: usize) -> Self {
4444
let InputRangeOffset { start, len } = self.offset;
4545
let max_len = self.input.len() - start;

src/earley/traversal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl<'gram> TraversalTree<'gram> {
224224
mod tests {
225225
use super::*;
226226
use crate::Grammar;
227-
use crate::earley::ParseGrammar;
227+
use crate::parser::grammar::ParseGrammar;
228228

229229
fn dna_grammar() -> Grammar {
230230
let grammar: Grammar = "<dna> ::= <base> | <base> <dna>

src/grammar.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ impl str::FromStr for Grammar {
803803
}
804804
}
805805
#[cfg(not(feature = "ABNF"))]
806-
#[mutants::skip]
806+
#[cfg_attr(test, mutants::skip)]
807807
fn from_str(s: &str) -> Result<Self, Self::Err> {
808808
match parsers::grammar_complete::<BNF>(s) {
809809
Ok((_, g)) => Ok(g),

src/parsers/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub fn terminal(input: &str) -> IResult<&str, Term> {
129129
}
130130

131131
/// Skips whitespace and ;-comments in one pass. Never fails.
132-
#[mutants::skip]
132+
#[cfg_attr(test, mutants::skip)]
133133
pub fn whitespace_plus_comments(mut input: &str) -> IResult<&str, char> {
134134
let _span = crate::tracing::span!(DEBUG, "whitespace_plus_comments").entered();
135135
loop {

src/tracing.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mod defs {
1919
pub(crate) use span;
2020

2121
#[allow(dead_code)]
22-
#[mutants::skip]
22+
#[cfg_attr(test, mutants::skip)]
2323
pub fn init_subscriber() {
2424
tracing_subscriber::fmt()
2525
.with_env_filter(tracing_subscriber::EnvFilter::from_default_env())
@@ -43,7 +43,7 @@ mod defs {
4343
pub struct Span {}
4444

4545
impl Span {
46-
#[mutants::skip]
46+
#[cfg_attr(test, mutants::skip)]
4747
pub const fn entered(&self) -> Self {
4848
Self {}
4949
}
@@ -78,7 +78,7 @@ mod defs {
7878
pub(crate) use event;
7979

8080
#[allow(dead_code)]
81-
#[mutants::skip]
81+
#[cfg_attr(test, mutants::skip)]
8282
pub const fn init_subscriber() {}
8383
}
8484

0 commit comments

Comments
 (0)