Skip to content

Support typed BNF grammar #25

Support typed BNF grammar

Support typed BNF grammar #25

Triggered via pull request November 11, 2024 12:01
@Devin-YeungDevin-Yeung
synchronize #5
constraint
Status Cancelled
Total duration 43s
Artifacts

ci.yml

on: pull_request
stable / fmt
7s
stable / fmt
nightly / doc
30s
nightly / doc
ubuntu / stable / coverage
5s
ubuntu / stable / coverage
Spell Check
7s
Spell Check
Matrix: clippy
Matrix: os-check
Matrix: required
Fit to window
Zoom out
Zoom in

Annotations

12 errors and 20 warnings
Spell Check
Process completed with exit code 2.
stable / clippy
Canceling since a higher priority waiting request for 'CI-constraint' exists
ubuntu-latest / stable / test
Canceling since a higher priority waiting request for 'CI-constraint' exists
ubuntu-latest / stable / test
The operation was canceled.
nightly / doc
Canceling since a higher priority waiting request for 'CI-constraint' exists
nightly / doc
The operation was canceled.
macos-latest / stable / test
Canceling since a higher priority waiting request for 'CI-constraint' exists
macos-latest / stable / test
The operation was canceled.
ubuntu / stable / test
Canceling since a higher priority waiting request for 'CI-constraint' exists
ubuntu / stable / test
The operation was canceled.
macos-14 / stable / test
Canceling since a higher priority waiting request for 'CI-constraint' exists
macos-14 / stable / test
The operation was canceled.
Spell Check: src/snapshots/bnfgen__generator__test__typed_set_algebra.snap#L62
"fo" should be "of" or "for" or "do" or "go" or "to".
Spell Check: src/snapshots/bnfgen__generator__test__typed_set_algebra.snap#L72
"ot" should be "to" or "of" or "or" or "not".
Spell Check: src/snapshots/bnfgen__generator__test__typed_set_algebra.snap#L72
"laf" should be "kaf" or "kaph" or "lac" or "lad" or "lag" or "laugh" or "leaf" or "loaf".
Spell Check: src/snapshots/bnfgen__generator__test__typed_set_algebra.snap#L98
"hten" should be "then" or "hen" or "the".
match expression looks like `matches!` macro: src/grammar/symbol.rs#L128
warning: match expression looks like `matches!` macro --> src/grammar/symbol.rs:128:9 | 128 | / match self { 129 | | SymbolKind::Terminal(_) | SymbolKind::Regex(_) => true, 130 | | _ => false, 131 | | } | |_________^ help: try: `matches!(self, SymbolKind::Terminal(_) | SymbolKind::Regex(_))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro
writing `&Vec` instead of `&[_]` involves a new object where a slice will do: src/grammar/graph.rs#L66
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> src/grammar/graph.rs:66:33 | 66 | fn is_trap_loop(&self, scc: &Vec<NodeIndex>) -> bool { | ^^^^^^^^^^^^^^^ help: change this to: `&[NodeIndex]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default
match expression looks like `matches!` macro: src/grammar/alt.rs#L52
warning: match expression looks like `matches!` macro --> src/grammar/alt.rs:52:9 | 52 | / match self.invoke_limit { 53 | | Limit::Unlimited => false, 54 | | _ => true, 55 | | } | |_________^ help: try: `!matches!(self.invoke_limit, Limit::Unlimited)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro = note: `#[warn(clippy::match_like_matches_macro)]` on by default
associated function `new` is never used: src/regex.rs#L20
warning: associated function `new` is never used --> src/regex.rs:20:8 | 19 | impl Regex { | ---------- associated function in this implementation 20 | fn new(input: &str) -> Self { | ^^^
method `children_len` is never used: src/parse_tree/tree.rs#L21
warning: method `children_len` is never used --> src/parse_tree/tree.rs:21:19 | 12 | impl<T> ParseTree<T> { | -------------------- method in this implementation ... 21 | pub(crate) fn children_len(&self) -> usize { | ^^^^^^^^^^^^
method `name` is never used: src/grammar/symbol.rs#L112
warning: method `name` is never used --> src/grammar/symbol.rs:112:12 | 108 | impl SymbolKind { | --------------- method in this implementation ... 112 | pub fn name(&self) -> Option<&str> { | ^^^^ | = note: `#[warn(dead_code)]` on by default
type `grammar::symbol::SymbolKind` is more private than the item `grammar::checked::ReduceOutput::NonTerminal::syms`: src/grammar/checked.rs#L19
warning: type `grammar::symbol::SymbolKind` is more private than the item `grammar::checked::ReduceOutput::NonTerminal::syms` --> src/grammar/checked.rs:19:9 | 19 | syms: Vec<SymbolKind>, | ^^^^^^^^^^^^^^^^^^^^^ field `grammar::checked::ReduceOutput::NonTerminal::syms` is reachable at visibility `pub` | note: but type `grammar::symbol::SymbolKind` is only usable at visibility `pub(crate)` --> src/grammar/symbol.rs:92:1 | 92 | pub(crate) enum SymbolKind { | ^^^^^^^^^^^^^^^^^^^^^^^^^^
type `grammar::symbol::SymbolKind` is more private than the item `generator::TreeGenerator::generate`: src/generator.rs#L44
warning: type `grammar::symbol::SymbolKind` is more private than the item `generator::TreeGenerator::generate` --> src/generator.rs:44:5 | 44 | / pub fn generate<R: Rng, S: Into<String>>( 45 | | &self, 46 | | start: S, 47 | | rng: &mut R, 48 | | ) -> ParseTree<SymbolKind> { | |______________________________^ method `generator::TreeGenerator::generate` is reachable at visibility `pub` | note: but type `grammar::symbol::SymbolKind` is only usable at visibility `pub(crate)` --> src/grammar/symbol.rs:92:1 | 92 | pub(crate) enum SymbolKind { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: `#[warn(private_interfaces)]` on by default
unused variable: `comma`: /home/runner/work/bnfgen/bnfgen/target/debug/build/bnfgen-425e20e80eb4f7df/out/parser.rs#L1791
warning: unused variable: `comma` --> /home/runner/work/bnfgen/bnfgen/target/debug/build/bnfgen-425e20e80eb4f7df/out/parser.rs:1791:9 | 1791 | (_, comma, _): (usize, Option<Token>, usize), | ^^^^^ help: if this is intentional, prefix it with an underscore: `_comma` | = note: `#[warn(unused_variables)]` on by default
unused import: `std::borrow::Borrow`: src/grammar/symbol.rs#L3
warning: unused import: `std::borrow::Borrow` --> src/grammar/symbol.rs:3:5 | 3 | use std::borrow::Borrow; | ^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default