[jruby-joni] 241/279: Remove RegexState

Hideki Yamane henrich at moszumanska.debian.org
Mon Nov 16 11:27:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch debian/sid
in repository jruby-joni.

commit b647673ad2b897a090f0c5b6a70e1b0ff7e0b8d6
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date:   Thu Apr 2 19:46:19 2015 +0200

    Remove RegexState
---
 src/org/joni/Analyser.java             |  5 -----
 src/org/joni/Regex.java                |  5 +----
 src/org/joni/constants/RegexState.java | 28 ----------------------------
 3 files changed, 1 insertion(+), 37 deletions(-)

diff --git a/src/org/joni/Analyser.java b/src/org/joni/Analyser.java
index e0a53ab..1cffd9a 100644
--- a/src/org/joni/Analyser.java
+++ b/src/org/joni/Analyser.java
@@ -51,7 +51,6 @@ import org.joni.ast.StringNode;
 import org.joni.constants.AnchorType;
 import org.joni.constants.EncloseType;
 import org.joni.constants.NodeType;
-import org.joni.constants.RegexState;
 import org.joni.constants.StackPopLevel;
 import org.joni.constants.TargetInfo;
 
@@ -62,8 +61,6 @@ final class Analyser extends Parser {
     }
 
     protected final void compile() {
-        regex.state = RegexState.COMPILING;
-
         if (Config.DEBUG) {
             Config.log.println(regex.encStringToString(bytes, getBegin(), getEnd()));
         }
@@ -178,8 +175,6 @@ final class Analyser extends Parser {
             Config.log.println(new ByteCodePrinter(regex).byteCodeListToString());
 
         } // DEBUG_COMPILE
-
-        regex.state = RegexState.NORMAL;
     }
 
     private void noNameDisableMapFor_cosAlt(Node node, int[]map, Ptr counter) {
diff --git a/src/org/joni/Regex.java b/src/org/joni/Regex.java
index 03adf2b..d6fffae 100644
--- a/src/org/joni/Regex.java
+++ b/src/org/joni/Regex.java
@@ -27,17 +27,15 @@ import java.util.IllegalFormatConversionException;
 import java.util.Iterator;
 
 import org.jcodings.Encoding;
-import org.jcodings.EncodingDB;
 import org.jcodings.specific.ASCIIEncoding;
 import org.jcodings.specific.UTF8Encoding;
 import org.jcodings.util.BytesHash;
 import org.joni.constants.AnchorType;
-import org.joni.constants.RegexState;
 import org.joni.exception.ErrorMessages;
 import org.joni.exception.InternalException;
 import org.joni.exception.ValueException;
 
-public final class Regex implements RegexState {
+public final class Regex {
 
     int[] code;             /* compiled pattern */
     int codeLength;
@@ -45,7 +43,6 @@ public final class Regex implements RegexState {
     Object[]operands;       /* e.g. shared CClassNode */
     int operandLength;
 
-    int state;              /* normal, searching, compiling */ // remove
     int numMem;             /* used memory(...) num counted from 1 */
     int numRepeat;          /* OP_REPEAT/OP_REPEAT_NG id-counter */
     int numNullCheck;       /* OP_NULL_CHECK_START/END id counter */
diff --git a/src/org/joni/constants/RegexState.java b/src/org/joni/constants/RegexState.java
deleted file mode 100644
index 72dd3ff..0000000
--- a/src/org/joni/constants/RegexState.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Permission is hereby granted, free of charge, to any person obtaining a copy of
- * this software and associated documentation files (the "Software"), to deal in
- * the Software without restriction, including without limitation the rights to
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
- * of the Software, and to permit persons to whom the Software is furnished to do
- * so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-package org.joni.constants;
-
-// we dont need this ATM
-public interface RegexState {
-    final int NORMAL          = 0;
-    final int SEARCHING       = 1;
-    final int COMPILING       = -1;
-    final int MODIFY          = -2;
-}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git



More information about the pkg-java-commits mailing list