# HG changeset patch # User Laman # Date 2024-07-09 14:07:29 # Node ID 1e7b35645ea46f5b91a3d11bfab2d76da5f9c73b # Parent ac6c57072747548db1391a4556494a3856fed746 renamed the package to regular-expresso diff --git a/Cargo.lock b/Cargo.lock --- a/Cargo.lock +++ b/Cargo.lock @@ -3,5 +3,5 @@ version = 3 [[package]] -name = "regexp" +name = "regular-expresso" version = "1.0.0" diff --git a/Cargo.toml b/Cargo.toml --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "regexp" +name = "regular-expresso" version = "1.0.0" edition = "2021" license = " GPL-3.0-or-later" diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -16,16 +16,19 @@ Licensed under GNU GPLv3 or newer. The python code supports Python 3.9 and higher. The rust code is written for Rust edition 2021. ``` +# If you want to use Rust, compile it first +cargo build --release + # Match a string against a pattern (returns true or false) -python regexp.py match PATTERN STRING +python regular-expresso.py match PATTERN STRING # or -cargo run match PATTERN STRING +./target/release/regular-expresso match PATTERN STRING # Compare two regexps and return None of they are equivalent, or the shortest string that can distinguish them # That is, it gets accepted by one, but not the other python regexp.py compare PATTERN1 PATTERN2 # or -cargo run compare PATTERN1 PATTERN2 +./target/release/regular-expresso compare PATTERN1 PATTERN2 ``` ## Theory diff --git a/regexp.py b/regular-expresso.py rename from regexp.py rename to regular-expresso.py diff --git a/src/main.rs b/src/main.rs --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,5 @@ use std::env; -use regexp::RegexpDFA; +use regular_expresso::RegexpDFA; fn test() { let tests = ["", "a", "ab", "aabb", "abab", "abcd", "abcbcdbcd"]; diff --git a/tests/test_regexp.rs b/tests/test_regexp.rs --- a/tests/test_regexp.rs +++ b/tests/test_regexp.rs @@ -1,6 +1,4 @@ -use regexp::RegexpNFA; -use regexp::RegexpDFA; -use regexp::ParsingError; +use regular_expresso::{RegexpNFA, RegexpDFA, ParsingError}; #[test] fn test_eval_basic_nfa() {