jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r517513 - /jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java
Date Tue, 13 Mar 2007 03:37:10 GMT
Author: vgritsenko
Date: Mon Mar 12 20:37:09 2007
New Revision: 517513

URL: http://svn.apache.org/viewvc?view=rev&rev=517513
Log:
nits

Modified:
    jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java

Modified: jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java
URL: http://svn.apache.org/viewvc/jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java?view=diff&rev=517513&r1=517512&r2=517513
==============================================================================
--- jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java (original)
+++ jakarta/regexp/trunk/src/java/org/apache/regexp/RE.java Mon Mar 12 20:37:09 2007
@@ -811,7 +811,7 @@
         char[] instruction = program.instruction;
         for (int node = firstNode; node < lastNode; )
         {
-            opcode = instruction[node + offsetOpcode];
+            opcode = instruction[node /* + offsetOpcode */];
             next   = node + (short) instruction[node + offsetNext];
             opdata = instruction[node + offsetOpdata];
 
@@ -1120,11 +1120,11 @@
                         }
 
                         // Get length of atom and starting index
-                        int lenAtom = opdata;
+                        // int lenAtom = opdata;
                         int startAtom = node + nodeSize;
 
                         // Give up if not enough input remains to have a match
-                        if (search.isEnd(lenAtom + idx - 1))
+                        if (search.isEnd(opdata + idx - 1))
                         {
                             return -1;
                         }
@@ -1133,7 +1133,7 @@
                         final boolean caseFold =
                             ((matchFlags & MATCH_CASEINDEPENDENT) != 0);
 
-                        for (int i = 0; i < lenAtom; i++)
+                        for (int i = 0; i < opdata; i++)
                         {
                             if (compareChars(search.charAt(idx++), instruction[startAtom
+ i], caseFold) != 0)
                             {
@@ -1321,7 +1321,7 @@
                 case OP_BRANCH:
                 {
                     // Check for choices
-                    if (instruction[next + offsetOpcode] != OP_BRANCH)
+                    if (instruction[next /* + offsetOpcode */] != OP_BRANCH)
                     {
                         // If there aren't any other choices, just evaluate this branch.
                         node += nodeSize;
@@ -1342,7 +1342,7 @@
                         nextBranch = (short) instruction[node + offsetNext];
                         node += nextBranch;
                     }
-                    while (nextBranch != 0 && (instruction[node + offsetOpcode] ==
OP_BRANCH));
+                    while (nextBranch != 0 && (instruction[node /* + offsetOpcode
*/] == OP_BRANCH));
 
                     // Failed to match any branch!
                     return -1;



---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-dev-help@jakarta.apache.org


Mime
View raw message