jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vgritse...@apache.org
Subject svn commit: r368412 - in /jakarta/regexp/trunk: docs/applet.html docs/changes.html docs/index.html src/java/org/apache/regexp/REProgram.java xdocs/changes.xml
Date Thu, 12 Jan 2006 17:13:23 GMT
Author: vgritsenko
Date: Thu Jan 12 09:13:19 2006
New Revision: 368412

URL: http://svn.apache.org/viewcvs?rev=368412&view=rev
Log:
Added accessor for REProgram.prefix

Modified:
    jakarta/regexp/trunk/docs/applet.html
    jakarta/regexp/trunk/docs/changes.html
    jakarta/regexp/trunk/docs/index.html
    jakarta/regexp/trunk/src/java/org/apache/regexp/REProgram.java
    jakarta/regexp/trunk/xdocs/changes.xml

Modified: jakarta/regexp/trunk/docs/applet.html
URL: http://svn.apache.org/viewcvs/jakarta/regexp/trunk/docs/applet.html?rev=368412&r1=368411&r2=368412&view=diff
==============================================================================
--- jakarta/regexp/trunk/docs/applet.html (original)
+++ jakarta/regexp/trunk/docs/applet.html Thu Jan 12 09:13:19 2006
@@ -17,13 +17,7 @@
 <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="The Jakarta Project"
border="0" />
 </a>
 </td>
-<td>
-<div style="width:135px;height:50px;padding:10px;border:1px solid #666666">
-<a href="http://www.apachecon.com/2005/EU/">
-<img alt="Join ApacheCon in Stuttgart!" border="0" src="http://apache.org/images/ac2005eu_135x50.gif"
/>
-</a>
-</div>
-</td>
+<td />
 </tr>
 </table>
 <table border="0" width="100%" cellspacing="4">
@@ -108,9 +102,8 @@
 <tr>
 <td colspan="3">
 <div class="page-footer">
-<em>
-        Copyright &copy; 1999-2005, The Apache Software Foundation. <a href="http://jakarta.apache.org/site/legal.html">Legal
information</a>.
-        </em>
+<em> Copyright &copy; 1999-2005, The Apache
+                  Software Foundation. <a href="http://jakarta.apache.org/site/legal.html">Legal
information</a>. </em>
 </div>
 </td>
 </tr>

Modified: jakarta/regexp/trunk/docs/changes.html
URL: http://svn.apache.org/viewcvs/jakarta/regexp/trunk/docs/changes.html?rev=368412&r1=368411&r2=368412&view=diff
==============================================================================
--- jakarta/regexp/trunk/docs/changes.html (original)
+++ jakarta/regexp/trunk/docs/changes.html Thu Jan 12 09:13:19 2006
@@ -19,13 +19,7 @@
 <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="The Jakarta Project"
border="0" />
 </a>
 </td>
-<td>
-<div style="width:135px;height:50px;padding:10px;border:1px solid #666666">
-<a href="http://www.apachecon.com/2005/EU/">
-<img alt="Join ApacheCon in Stuttgart!" border="0" src="http://apache.org/images/ac2005eu_135x50.gif"
/>
-</a>
-</div>
-</td>
+<td />
 </tr>
 </table>
 <table border="0" width="100%" cellspacing="4">
@@ -90,6 +84,11 @@
         package.
       </p>
 
+<h3>Version 1.5-dev</h3>
+<ul>
+<li>Added accessor for REProgram.prefix (VG)</li>
+</ul>
+
 <h3>Version 1.4</h3>
 <ul>
 <li>Fixed Bug:
@@ -251,9 +250,8 @@
 <tr>
 <td colspan="3">
 <div class="page-footer">
-<em>
-        Copyright &copy; 1999-2005, The Apache Software Foundation. <a href="http://jakarta.apache.org/site/legal.html">Legal
information</a>.
-        </em>
+<em> Copyright &copy; 1999-2005, The Apache
+                  Software Foundation. <a href="http://jakarta.apache.org/site/legal.html">Legal
information</a>. </em>
 </div>
 </td>
 </tr>

Modified: jakarta/regexp/trunk/docs/index.html
URL: http://svn.apache.org/viewcvs/jakarta/regexp/trunk/docs/index.html?rev=368412&r1=368411&r2=368412&view=diff
==============================================================================
--- jakarta/regexp/trunk/docs/index.html (original)
+++ jakarta/regexp/trunk/docs/index.html Thu Jan 12 09:13:19 2006
@@ -17,13 +17,7 @@
 <img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="The Jakarta Project"
border="0" />
 </a>
 </td>
-<td>
-<div style="width:135px;height:50px;padding:10px;border:1px solid #666666">
-<a href="http://www.apachecon.com/2005/EU/">
-<img alt="Join ApacheCon in Stuttgart!" border="0" src="http://apache.org/images/ac2005eu_135x50.gif"
/>
-</a>
-</div>
-</td>
+<td />
 </tr>
 </table>
 <table border="0" width="100%" cellspacing="4">
@@ -152,9 +146,8 @@
 <tr>
 <td colspan="3">
 <div class="page-footer">
-<em>
-        Copyright &copy; 1999-2005, The Apache Software Foundation. <a href="http://jakarta.apache.org/site/legal.html">Legal
information</a>.
-        </em>
+<em> Copyright &copy; 1999-2005, The Apache
+                  Software Foundation. <a href="http://jakarta.apache.org/site/legal.html">Legal
information</a>. </em>
 </div>
 </td>
 </tr>

Modified: jakarta/regexp/trunk/src/java/org/apache/regexp/REProgram.java
URL: http://svn.apache.org/viewcvs/jakarta/regexp/trunk/src/java/org/apache/regexp/REProgram.java?rev=368412&r1=368411&r2=368412&view=diff
==============================================================================
--- jakarta/regexp/trunk/src/java/org/apache/regexp/REProgram.java (original)
+++ jakarta/regexp/trunk/src/java/org/apache/regexp/REProgram.java Thu Jan 12 09:13:19 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
  * for use by the recompile utility (which helps you produce precompiled
  * REProgram objects). You should not otherwise need to work directly with
  * this class.
-*
+ *
  * @see RE
  * @see RECompiler
  *
@@ -107,8 +107,8 @@
         this.lenInstruction = lenInstruction;
 
         // Initialize other program-related variables
-        flags = 0;
-        prefix = null;
+        this.flags = 0;
+        this.prefix = null;
 
         // Try various compile-time optimizations if there's a program
         if (instruction != null && lenInstruction != 0)
@@ -126,14 +126,14 @@
                     {
                         // then get that atom as an prefix because there's no other choice
                         int lenAtom = instruction[RE.nodeSize + RE.offsetOpdata];
-                        prefix = new char[lenAtom];
+                        this.prefix = new char[lenAtom];
                         System.arraycopy(instruction, RE.nodeSize * 2, prefix, 0, lenAtom);
                     }
                     // the branch starts with a BOL
                     else if (nextOp == RE.OP_BOL)
                     {
                         // then set the flag indicating that BOL is present
-                        flags |= OPT_HASBOL;
+                        this.flags |= OPT_HASBOL;
                     }
                 }
             }
@@ -159,5 +159,23 @@
                 }
             }
         }
+    }
+
+    /**
+     * Returns a copy of the prefix of current regular expression program
+     * in a character array.  If there is no prefix, or there is no program
+     * compiled yet, <code>getPrefix</code> will return null.
+     * @return A copy of the prefix of current compiled RE program
+     */
+    public char[] getPrefix()
+    {
+        if (prefix != null)
+        {
+            // Return copy of prefix
+            char[] ret = new char[prefix.length];
+            System.arraycopy(prefix, 0, ret, 0, prefix.length);
+            return ret;
+        }
+        return null;
     }
 }

Modified: jakarta/regexp/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewcvs/jakarta/regexp/trunk/xdocs/changes.xml?rev=368412&r1=368411&r2=368412&view=diff
==============================================================================
--- jakarta/regexp/trunk/xdocs/changes.xml (original)
+++ jakarta/regexp/trunk/xdocs/changes.xml Thu Jan 12 09:13:19 2006
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 
 <!--
-  - Copyright 1999-2004 The Apache Software Foundation.
+  - Copyright 1999-2006 The Apache Software Foundation.
   -
   - Licensed under the Apache License, Version 2.0 (the "License");
   - you may not use this file except in compliance with the License.
@@ -31,6 +31,11 @@
         This document reflects the changes between releases for the Jakarta Regexp
         package.
       </p>
+
+<h3>Version 1.5-dev</h3>
+<ul>
+<li>Added accessor for REProgram.prefix (VG)</li>
+</ul>
 
 <h3>Version 1.4</h3>
 <ul>



---------------------------------------------------------------------
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