Refactor state quantification into nfa::model::Input
for transitions
#56
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
Annotations
25 warnings
associated function `new` is never used:
src/regex/tokenizer.rs#L110
warning: associated function `new` is never used
--> src/regex/tokenizer.rs:110:19
|
109 | impl<'a> Tokenizer<'a> {
| ---------------------- associated function in this implementation
110 | pub(super) fn new(input: &'a str) -> Self {
| ^^^
|
multiple associated items are never used:
src/regex/parser.rs#L38
warning: multiple associated items are never used
--> src/regex/parser.rs:38:19
|
37 | impl<'a> Parser<'a> {
| ------------------- associated items in this implementation
38 | pub(crate) fn new(input: &'a str) -> Self {
| ^^^
...
45 | pub(crate) fn parse(&mut self) -> ParseResult<ast::Ast> {
| ^^^^^
...
60 | fn expression(&mut self) -> ParseResult<ast::ExprKind> {
| ^^^^^^^^^^
...
84 | fn sub_expression(&mut self) -> ParseResult<Vec<ast::ExprKind>> {
| ^^^^^^^^^^^^^^
...
108 | fn sub_expression_item(&mut self) -> ParseResult<ast::ExprKind> {
| ^^^^^^^^^^^^^^^^^^^
...
120 | fn group(&mut self) -> ParseResult<ast::ExprKind> {
| ^^^^^
...
168 | fn match_(&mut self) -> ParseResult<ast::ExprKind> {
| ^^^^^^
...
186 | fn match_item(&mut self) -> ParseResult<ast::LiteralKind> {
| ^^^^^^^^^^
...
219 | fn character_group(&mut self) -> ParseResult<ast::LiteralKind> {
| ^^^^^^^^^^^^^^^
...
276 | fn character_group_item(&mut self) -> ParseResult<ast::GroupedLiteralKind> {
| ^^^^^^^^^^^^^^^^^^^^
...
326 | fn get_current_token_position(&mut self) -> (usize, usize) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
type alias `ParseResult` is never used:
src/regex/parser.rs#L19
warning: type alias `ParseResult` is never used
--> src/regex/parser.rs:19:17
|
19 | pub(crate) type ParseResult<T> = core::result::Result<T, Vec<ParseError>>;
| ^^^^^^^^^^^
|
struct `Parser` is never constructed:
src/regex/parser.rs#L13
warning: struct `Parser` is never constructed
--> src/regex/parser.rs:13:19
|
13 | pub(crate) struct Parser<'a> {
| ^^^^^^
|
variants `Match`, `Class`, and `Range` are never constructed:
src/regex/ast.rs#L54
warning: variants `Match`, `Class`, and `Range` are never constructed
--> src/regex/ast.rs:54:5
|
52 | pub(crate) enum GroupedLiteralKind {
| ------------------ variants in this enum
53 | /// A single token (unicode character constructs can consist multiple characters).
54 | Match(char),
| ^^^^^
55 | /// A shorthand for character groups (e.g., `\w`, `\D`, `.`).
56 | Class(tokenizer::ClassKind),
| ^^^^^
57 | /// A character range (e.g., `0-1`, `a-z`).
58 | Range(char, char),
| ^^^^^
|
= note: `GroupedLiteralKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
|
variants `Match`, `Class`, and `Group` are never constructed:
src/regex/ast.rs#L40
warning: variants `Match`, `Class`, and `Group` are never constructed
--> src/regex/ast.rs:40:5
|
38 | pub(crate) enum LiteralKind {
| ----------- variants in this enum
39 | /// A single token (unicode character constructs can consist multiple characters).
40 | Match(char),
| ^^^^^
41 | /// A shorthand for character groups (e.g., `\w`, `\D`, `.`).
42 | Class(tokenizer::ClassKind),
| ^^^^^
43 | /// A group of characters (e.g. `[^a-cl47i]`).
44 | Group {
| ^^^^^
|
= note: `LiteralKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
|
variants `Concat`, `Empty`, `Alt`, `Lit`, and `Group` are never constructed:
src/regex/ast.rs#L25
warning: variants `Concat`, `Empty`, `Alt`, `Lit`, and `Group` are never constructed
--> src/regex/ast.rs:25:5
|
23 | pub(crate) enum ExprKind {
| -------- variants in this enum
24 | /// Concatenation of regular expressions.
25 | Concat(Vec<ExprKind>),
| ^^^^^^
26 | /// An empty regex expresion.
27 | Empty,
| ^^^^^
28 | /// An alternative expression (e.g., `<expression> | <expression>`).
29 | Alt(Box<ExprKind>, Box<ExprKind>),
| ^^^
30 | /// A literal (e.g., `a`, `[^ca]`, `[a-z]`, `[0-1]*`).
31 | Lit(LiteralKind, Option<tokenizer::QuantifierKind>),
| ^^^
32 | /// A grouped expression (e.g., `([a-z] | foo)`, `(ab[ac]){3,}`).
33 | Group(Box<ExprKind>, Option<tokenizer::QuantifierKind>),
| ^^^^^
|
= note: `ExprKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
|
associated function `new` is never used:
src/fsm/nfa/sim.rs#L40
warning: associated function `new` is never used
--> src/fsm/nfa/sim.rs:40:8
|
39 | impl<'a> NfaSimulator<'a> {
| ------------------------- associated function in this implementation
40 | fn new(nfa: &'a Nfa) -> Self {
| ^^^
|
associated function `new` is never used:
src/fsm/nfa/sim.rs#L22
warning: associated function `new` is never used
--> src/fsm/nfa/sim.rs:22:8
|
21 | impl<'a> Run<'a> {
| ---------------- associated function in this implementation
22 | fn new(state: &'a State) -> Self {
| ^^^
|
methods `with_transition` and `get_state` are never used:
src/fsm/nfa/model.rs#L192
warning: methods `with_transition` and `get_state` are never used
--> src/fsm/nfa/model.rs:192:19
|
144 | impl NfaBuilder {
| --------------- methods in this implementation
...
192 | pub(super) fn with_transition(mut self, start: StateId, end: StateId, input: Input) -> Self {
| ^^^^^^^^^^^^^^^
...
228 | pub(super) fn get_state(&self, state_id: StateId) -> &State {
| ^^^^^^^^^
|
field `start_state` is never read:
src/fsm/nfa/model.rs#L13
warning: field `start_state` is never read
--> src/fsm/nfa/model.rs:13:16
|
12 | pub(super) struct Nfa {
| --- field in this struct
13 | pub(super) start_state: StateId,
| ^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `Input`:
src/fsm/nfa/dot.rs#L1
warning: unused import: `Input`
--> src/fsm/nfa/dot.rs:1:20
|
1 | use super::model::{Input, Nfa, State, StateId};
| ^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
associated function `new` is never used:
src/regex/tokenizer.rs#L110
warning: associated function `new` is never used
--> src/regex/tokenizer.rs:110:19
|
109 | impl<'a> Tokenizer<'a> {
| ---------------------- associated function in this implementation
110 | pub(super) fn new(input: &'a str) -> Self {
| ^^^
|
multiple associated items are never used:
src/regex/parser.rs#L38
warning: multiple associated items are never used
--> src/regex/parser.rs:38:19
|
37 | impl<'a> Parser<'a> {
| ------------------- associated items in this implementation
38 | pub(crate) fn new(input: &'a str) -> Self {
| ^^^
...
45 | pub(crate) fn parse(&mut self) -> ParseResult<ast::Ast> {
| ^^^^^
...
60 | fn expression(&mut self) -> ParseResult<ast::ExprKind> {
| ^^^^^^^^^^
...
84 | fn sub_expression(&mut self) -> ParseResult<Vec<ast::ExprKind>> {
| ^^^^^^^^^^^^^^
...
108 | fn sub_expression_item(&mut self) -> ParseResult<ast::ExprKind> {
| ^^^^^^^^^^^^^^^^^^^
...
120 | fn group(&mut self) -> ParseResult<ast::ExprKind> {
| ^^^^^
...
168 | fn match_(&mut self) -> ParseResult<ast::ExprKind> {
| ^^^^^^
...
186 | fn match_item(&mut self) -> ParseResult<ast::LiteralKind> {
| ^^^^^^^^^^
...
219 | fn character_group(&mut self) -> ParseResult<ast::LiteralKind> {
| ^^^^^^^^^^^^^^^
...
276 | fn character_group_item(&mut self) -> ParseResult<ast::GroupedLiteralKind> {
| ^^^^^^^^^^^^^^^^^^^^
...
326 | fn get_current_token_position(&mut self) -> (usize, usize) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
type alias `ParseResult` is never used:
src/regex/parser.rs#L19
warning: type alias `ParseResult` is never used
--> src/regex/parser.rs:19:17
|
19 | pub(crate) type ParseResult<T> = core::result::Result<T, Vec<ParseError>>;
| ^^^^^^^^^^^
|
struct `Parser` is never constructed:
src/regex/parser.rs#L13
warning: struct `Parser` is never constructed
--> src/regex/parser.rs:13:19
|
13 | pub(crate) struct Parser<'a> {
| ^^^^^^
|
variants `Match`, `Class`, and `Range` are never constructed:
src/regex/ast.rs#L54
warning: variants `Match`, `Class`, and `Range` are never constructed
--> src/regex/ast.rs:54:5
|
52 | pub(crate) enum GroupedLiteralKind {
| ------------------ variants in this enum
53 | /// A single token (unicode character constructs can consist multiple characters).
54 | Match(char),
| ^^^^^
55 | /// A shorthand for character groups (e.g., `\w`, `\D`, `.`).
56 | Class(tokenizer::ClassKind),
| ^^^^^
57 | /// A character range (e.g., `0-1`, `a-z`).
58 | Range(char, char),
| ^^^^^
|
= note: `GroupedLiteralKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
|
variants `Match`, `Class`, and `Group` are never constructed:
src/regex/ast.rs#L40
warning: variants `Match`, `Class`, and `Group` are never constructed
--> src/regex/ast.rs:40:5
|
38 | pub(crate) enum LiteralKind {
| ----------- variants in this enum
39 | /// A single token (unicode character constructs can consist multiple characters).
40 | Match(char),
| ^^^^^
41 | /// A shorthand for character groups (e.g., `\w`, `\D`, `.`).
42 | Class(tokenizer::ClassKind),
| ^^^^^
43 | /// A group of characters (e.g. `[^a-cl47i]`).
44 | Group {
| ^^^^^
|
= note: `LiteralKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
|
variants `Concat`, `Empty`, `Alt`, `Lit`, and `Group` are never constructed:
src/regex/ast.rs#L25
warning: variants `Concat`, `Empty`, `Alt`, `Lit`, and `Group` are never constructed
--> src/regex/ast.rs:25:5
|
23 | pub(crate) enum ExprKind {
| -------- variants in this enum
24 | /// Concatenation of regular expressions.
25 | Concat(Vec<ExprKind>),
| ^^^^^^
26 | /// An empty regex expresion.
27 | Empty,
| ^^^^^
28 | /// An alternative expression (e.g., `<expression> | <expression>`).
29 | Alt(Box<ExprKind>, Box<ExprKind>),
| ^^^
30 | /// A literal (e.g., `a`, `[^ca]`, `[a-z]`, `[0-1]*`).
31 | Lit(LiteralKind, Option<tokenizer::QuantifierKind>),
| ^^^
32 | /// A grouped expression (e.g., `([a-z] | foo)`, `(ab[ac]){3,}`).
33 | Group(Box<ExprKind>, Option<tokenizer::QuantifierKind>),
| ^^^^^
|
= note: `ExprKind` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis
|
associated function `new` is never used:
src/fsm/nfa/sim.rs#L40
warning: associated function `new` is never used
--> src/fsm/nfa/sim.rs:40:8
|
39 | impl<'a> NfaSimulator<'a> {
| ------------------------- associated function in this implementation
40 | fn new(nfa: &'a Nfa) -> Self {
| ^^^
|
associated function `new` is never used:
src/fsm/nfa/sim.rs#L22
warning: associated function `new` is never used
--> src/fsm/nfa/sim.rs:22:8
|
21 | impl<'a> Run<'a> {
| ---------------- associated function in this implementation
22 | fn new(state: &'a State) -> Self {
| ^^^
|
methods `with_transition` and `get_state` are never used:
src/fsm/nfa/model.rs#L192
warning: methods `with_transition` and `get_state` are never used
--> src/fsm/nfa/model.rs:192:19
|
144 | impl NfaBuilder {
| --------------- methods in this implementation
...
192 | pub(super) fn with_transition(mut self, start: StateId, end: StateId, input: Input) -> Self {
| ^^^^^^^^^^^^^^^
...
228 | pub(super) fn get_state(&self, state_id: StateId) -> &State {
| ^^^^^^^^^
|
field `start_state` is never read:
src/fsm/nfa/model.rs#L13
warning: field `start_state` is never read
--> src/fsm/nfa/model.rs:13:16
|
12 | pub(super) struct Nfa {
| --- field in this struct
13 | pub(super) start_state: StateId,
| ^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused import: `Input`:
src/fsm/nfa/dot.rs#L1
warning: unused import: `Input`
--> src/fsm/nfa/dot.rs:1:20
|
1 | use super::model::{Input, Nfa, State, StateId};
| ^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|