aboutsummaryrefslogtreecommitdiff
path: root/src/regex.rs
diff options
context:
space:
mode:
authoromagdy7 <omar.professional8777@gmail.com>2023-12-02 01:40:49 +0200
committeromagdy7 <omar.professional8777@gmail.com>2023-12-02 01:40:49 +0200
commitef3ef65e3c6d1cb1b799b8d65847e6f4f228ca3c (patch)
tree0cd0e710e3a3dd6990f44137fffd0dde92555db3 /src/regex.rs
parentd66f8a4749cdc2bfe51527c50b846eef87be4e17 (diff)
downloadrex-ef3ef65e3c6d1cb1b799b8d65847e6f4f228ca3c.tar.xz
rex-ef3ef65e3c6d1cb1b799b8d65847e6f4f228ca3c.zip
NFA implementation with support for kleene*, union and simple concatination using thomposon's construction with simulation function that matches a given regex
Diffstat (limited to 'src/regex.rs')
-rw-r--r--src/regex.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/regex.rs b/src/regex.rs
index 66214c0..c2465aa 100644
--- a/src/regex.rs
+++ b/src/regex.rs
@@ -1,4 +1,4 @@
-#![allow(dead_code, unused_variables, unused_mut)]
+#![allow(dead_code, unused_variables, unused_macros, unused_mut)]
macro_rules! Sym {
($c:expr) => {
@@ -134,6 +134,7 @@ impl Regex {
_ => {
let right = Self::parse_token(chars);
if let RegexToken::None = right {
+ // do nothing
} else {
*left = RegexToken::Concat((Box::new(left.clone()), Box::new(right)));
}