jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: jakarta-regexp/xdocs RETest.txt changes.xml velocity.properties
Date Sun, 11 Feb 2001 23:04:25 GMT
jon         01/02/11 15:04:25

  Modified:    build    build-regexp.xml
               docs     RETest.txt changes.html index.html
               src/java/org/apache/regexp RE.java RECompiler.java
                        RETest.java
               xdocs    RETest.txt changes.xml velocity.properties
  Added:       .        .cvsignore
               build    .cvsignore
  Log:
  added clustering patch (thanks to: Michael McCallum <gholam@xtra.co.nz>)
  updated docs with latest jakarta-site
  updated version number to 1.3-dev
  added .cvsignore files
  
  Revision  Changes    Path
  1.1                  jakarta-regexp/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  bin
  
  
  
  1.6       +2 -2      jakarta-regexp/build/build-regexp.xml
  
  Index: build-regexp.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/build/build-regexp.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build-regexp.xml	2001/01/09 17:55:06	1.5
  +++ build-regexp.xml	2001/02/11 23:04:21	1.6
  @@ -10,8 +10,8 @@
       <!-- =================================================================== -->
       <property name="ant.home" value="."/>
       <property name="Name" value="Jakarta-Regexp"/>
  -    <property name="year" value="2000"/>
  -    <property name="version" value="1.2"/>
  +    <property name="year" value="2001"/>
  +    <property name="version" value="1.3-dev"/>
       <property name="project" value="jakarta-regexp"/>
       <property name="build.compiler" value="classic"/>
       <property name="build.dir" value="../bin"/>
  
  
  
  1.1                  jakarta-regexp/build/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  velocity.log
  
  
  
  1.2       +94 -0     jakarta-regexp/docs/RETest.txt
  
  Index: RETest.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/docs/RETest.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RETest.txt	2000/04/27 01:24:38	1.1
  +++ RETest.txt	2001/02/11 23:04:21	1.2
  @@ -884,3 +884,97 @@
   YES
     aa
     aa
  +
  +#149
  +(?:a)
  +a
  +YES
  +a
  +
  +#150
  +(?:a)
  +aa
  +YES
  +a
  +
  +#151
  +(?:\w)
  +abc
  +YES
  +a
  +
  +#152
  +(?:\w\s\w)+
  +a b c
  +YES
  +a b
  +
  +#153
  +(a\w)(?:,(a\w))+
  +ab,ac,ad
  +YES
  +ab,ac,ad
  +ab
  +ad
  +
  +#154
  +z(\w\s+(?:\w\s+\w)+)z
  +za   b bc   cd     dz
  +YES
  +za   b bc   cd     dz
  +a   b bc   cd     d
  +
  +#155
  +(([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*
  +http://www.test.com
  +YES
  +http://www.test.com
  +http://
  +http
  +.com
  +
  +#156
  +((?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*
  +ftp://www.test.com
  +YES
  +ftp://www.test.com
  +ftp://
  +.com
  +
  +#157
  +(([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*
  +htTp://www.test.com
  +YES
  +htTp://www.test.com
  +htTp://
  +htTp
  +
  +#158
  +(?:([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*
  +FTP://www.test.com
  +YES
  +FTP://www.test.com
  +FTP
  +.com
  +
  +#159
  +^(?:([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*$
  +http://.www.test.com
  +NO
  +
  +#160
  +^(?:(?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*$
  +FtP://www.test.com
  +YES
  +FtP://www.test.com
  +
  +#161
  +^(?:(?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*$
  +FtTP://www.test.com
  +NO
  +
  +#162
  +^(?:(?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*$
  +www.test.com
  +YES
  +www.test.com
  
  
  
  1.3       +25 -28    jakarta-regexp/docs/changes.html
  
  Index: changes.html
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/docs/changes.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- changes.html	2000/12/11 02:50:42	1.2
  +++ changes.html	2001/02/11 23:04:21	1.3
  @@ -1,3 +1,5 @@
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  +
   <!-- Content Stylesheet for Site -->
   
           
  @@ -19,8 +21,7 @@
               <table border="0" width="100%" cellspacing="0">
                   <!-- TOP IMAGE -->
                   <tr>
  -                    
  -<td colspan="2">
  +                    <td colspan="2">
   <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif"
align="left" border="0"/></a>
   </td>
                   </tr>
  @@ -35,11 +36,9 @@
                       <td valign="top" nowrap="true">
                                   <strong>Regexp</strong>
           <ul>
  -                    <li>
  -    <a href="./index.html">Front Page</a>
  +                    <li>    <a href="./index.html">Front Page</a>
   </li>
  -                    <li>
  -    <a href="./changes.html">Changes</a>
  +                    <li>    <a href="./changes.html">Changes</a>
   </li>
                   </ul>
               <strong>Download</strong>
  @@ -71,15 +70,17 @@
         </td></tr>
         <tr><td>
           <blockquote>
  -                    
  -                <p>
  +                                    <p>
   This document reflects the changes between releases for the Jakarta Regexp
   package.
   </p>
  -                                
  -                <h3>Version 1.2</h3>
  -                                
  -                <ul>
  +                                                <h3>Version 1.3-dev</h3>
  +                                                <ul>
  +<li>New Feature: <a href="http://www.mail-archive.com/regexp-dev%40jakarta.apache.org/msg00002.html">Clustering</a></li>
  +<li>Rebuilt website with latest Jakarta-Site dependency</li>
  +</ul>
  +                                                <h3>Version 1.2</h3>
  +                                                <ul>
   <li>Updated to Ant 1.2 (JSS)</li>
   <li>Documentation now built with <a href="http://jakarta.apache.org/site/jakarta-site2.html">Anakia</a>
(JSS)</li>
   <li><a href="http://jakarta.apache.org/cvsweb/index.cgi/jakarta-regexp/src/java/org/apache/regexp/RE.java?rev=1.3&amp;content-type=text/vnd.viewcvs-markup">Fixed
bug</a></li>
  @@ -87,14 +88,11 @@
   <li><a href="http://jakarta.apache.org/cvsweb/index.cgi/jakarta-regexp/src/java/org/apache/regexp/RE.java?rev=1.5&amp;content-type=text/vnd.viewcvs-markup">Fixed
bug</a></li>
   <li><a href="http://jakarta.apache.org/cvsweb/index.cgi/jakarta-regexp/src/java/org/apache/regexp/RE.java?rev=1.6&amp;content-type=text/vnd.viewcvs-markup">Fixed
bug</a></li>
   </ul>
  -                                
  -                <h3>Version 1.1</h3>
  -                                
  -                <p>
  +                                                <h3>Version 1.1</h3>
  +                                                <p>
   Contributions by Ales Novak:
   </p>
  -                                
  -                <ul>
  +                                                <ul>
   <li>RECompiler.compile() - copy on return</li>
   <li>RE.matchNodes() - BOL and EOL cases
   if RE.MATCH_MULTILINE is specified.
  @@ -108,19 +106,15 @@
   All needed modifications are only in the RE class.
   </li>
   </ul>
  -                                
  -                <p>
  +                                                <p>
   Contributions by Jon S. Stevens:
   </p>
  -                                
  -                <ul>
  +                                                <ul>
   <li>Fix in the build system for building on NT</li>
   <li>Documentation fixes / additions</li>
   </ul>
  -                                
  -                <h3>Version 1.0</h3>
  -                                
  -                <ul>
  +                                                <h3>Version 1.0</h3>
  +                                                <ul>
   <li>Repackaging from original contribution. No major code changes.</li>
   </ul>
                               </blockquote>
  @@ -134,14 +128,17 @@
                       <hr noshade="" size="1"/>
                   </td></tr>
                   <tr><td colspan="2">
  -                    <div align="center"><font color="{#525D76" size="-1"><em>
  -                    Copyright &#169; 1999-2000, Apache Software Foundation
  +                    <div align="center"><font color="#525D76" size="-1"><em>
  +                    Copyright &#169; 1999-2001, Apache Software Foundation
                       </em></font></div>
                   </td></tr>
               </table>
           </body>
       </html>
   <!-- end the processing -->
  +
  +
  +
   
   
   
  
  
  
  1.3       +19 -26    jakarta-regexp/docs/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/docs/index.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- index.html	2000/12/11 02:50:42	1.2
  +++ index.html	2001/02/11 23:04:22	1.3
  @@ -1,3 +1,5 @@
  +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  +
   <!-- Content Stylesheet for Site -->
   
           
  @@ -19,8 +21,7 @@
               <table border="0" width="100%" cellspacing="0">
                   <!-- TOP IMAGE -->
                   <tr>
  -                    
  -<td colspan="2">
  +                    <td colspan="2">
   <a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif"
align="left" border="0"/></a>
   </td>
                   </tr>
  @@ -35,11 +36,9 @@
                       <td valign="top" nowrap="true">
                                   <strong>Regexp</strong>
           <ul>
  -                    <li>
  -    <a href="./index.html">Front Page</a>
  +                    <li>    <a href="./index.html">Front Page</a>
   </li>
  -                    <li>
  -    <a href="./changes.html">Changes</a>
  +                    <li>    <a href="./changes.html">Changes</a>
   </li>
                   </ul>
               <strong>Download</strong>
  @@ -71,52 +70,43 @@
         </td></tr>
         <tr><td>
           <blockquote>
  -                    
  -                <p>
  +                                    <p>
   Regexp is a 100% Pure Java Regular Expression package that was graciously 
   donated to the Apache Software Foundation by Jonathan Locke. He originally wrote 
   this software back in 1996 and it has stood up quite well to the test of time. 
   It includes complete Javadoc documentation as well as a simple Applet for visual 
   debugging and testing suite for compatibility.
   </p>
  -                                
  -                <p>
  +                                                <p>
   This package is intended to be an answer to a question we commonly hear in the 
   Java world:
   <br />
   <strong>"Why isn't there a decent regular expression package available for 
   Java under a BSD-Style (ie: Apache) license?"</strong>
   </p>
  -                                
  -                <p>
  +                                                <p>
   You can <a href="../site/binindex.html">download</a> builds.
   </p>
  -                                
  -                <p>
  +                                                <p>
   You can view the list of 
   <a href="./changes.html">changes</a> between revisions.
   </p>
  -                                
  -                <p>
  +                                                <p>
   The Javadoc is <a href="http://jakarta.apache.org/regexp/apidocs/">available online</a>.

   It is also included in the distribution download.
   </p>
  -                                
  -                <p>
  +                                                <p>
   An online <a href="http://jakarta.apache.org/jyve-faq/Turbine/screen/DisplayTopics/action/SetAll/project_id/2/faq_id/27">FAQ</a>
   is available for commonly asked questions like, "What is a regular
   expression?", "Why did you do this? There are already other Java
   regexp packages available!", etc. 
   </p>
  -                                
  -                <p>
  +                                                <p>
   If you would like to get involved with this project in one way or another 
   (Mailing lists, CVS, Contributions), please see the <a href="../site/getinvolved.html">Getting
Involved</a> section of the Jakarta Website.
   </p>
  -                                
  -                <h3><a href="../site/whoweare.html">Contributors</a></h3>
  -                                
  -                <ul>
  +                                                <h3><a href="../site/whoweare.html">Contributors</a></h3>
  +                                                <ul>
   <li>Jonathan Locke wrote the original code.</li>
   <li>James Davidson for making the contact with Jonathan and asking him to release
his 
   source code.</li>
  @@ -137,14 +127,17 @@
                       <hr noshade="" size="1"/>
                   </td></tr>
                   <tr><td colspan="2">
  -                    <div align="center"><font color="{#525D76" size="-1"><em>
  -                    Copyright &#169; 1999-2000, Apache Software Foundation
  +                    <div align="center"><font color="#525D76" size="-1"><em>
  +                    Copyright &#169; 1999-2001, Apache Software Foundation
                       </em></font></div>
                   </td></tr>
               </table>
           </body>
       </html>
   <!-- end the processing -->
  +
  +
  +
   
   
   
  
  
  
  1.7       +23 -15    jakarta-regexp/src/java/org/apache/regexp/RE.java
  
  Index: RE.java
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/src/java/org/apache/regexp/RE.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RE.java	2000/08/22 17:19:38	1.6
  +++ RE.java	2001/02/11 23:04:22	1.7
  @@ -173,19 +173,19 @@
    *
    * <br>
    *
  - *    [:alnum:]            Alphanumeric characters. 
  - *    [:alpha:]            Alphabetic characters. 
  - *    [:blank:]            Space and tab characters. 
  - *    [:cntrl:]            Control characters. 
  - *    [:digit:]            Numeric characters. 
  - *    [:graph:]            Characters that are printable and are also visible. (A space
is printable, but not visible, while an `a' is both.) 
  - *    [:lower:]            Lower-case alphabetic characters. 
  - *    [:print:]            Printable characters (characters that are not control characters.)

  - *    [:punct:]            Punctuation characters (characters that are not letter, digits,
control characters, or space characters). 
  - *    [:space:]            Space characters (such as space, tab, and formfeed, to name
a few). 
  - *    [:upper:]            Upper-case alphabetic characters. 
  + *    [:alnum:]            Alphanumeric characters.
  + *    [:alpha:]            Alphabetic characters.
  + *    [:blank:]            Space and tab characters.
  + *    [:cntrl:]            Control characters.
  + *    [:digit:]            Numeric characters.
  + *    [:graph:]            Characters that are printable and are also visible. (A space
is printable, but not visible, while an `a' is both.)
  + *    [:lower:]            Lower-case alphabetic characters.
  + *    [:print:]            Printable characters (characters that are not control characters.)
  + *    [:punct:]            Punctuation characters (characters that are not letter, digits,
control characters, or space characters).
  + *    [:space:]            Space characters (such as space, tab, and formfeed, to name
a few).
  + *    [:upper:]            Upper-case alphabetic characters.
    *    [:xdigit:]           Characters that are hexadecimal digits.
  - *         
  + *
    * <br>
    *
    *  <b><font face=times roman>Non-standard POSIX-style Character Classes</font></b>
  @@ -196,7 +196,7 @@
    *    [:javapart:]         Part of a Java identifier
    *
    * <br>
  - *         
  + *
    *  <b><font face=times roman>Predefined Classes</font></b>
    *
    * <br>
  @@ -252,6 +252,7 @@
    *    AB                   Matches A followed by B
    *    A|B                  Matches either A or B
    *    (A)                  Used for subexpression grouping
  + *   (?:A)                 Used for subexpression clustering (just like grouping but no
backrefs)
    *
    * <br>
    *
  @@ -347,7 +348,7 @@
    * @see RECompiler
    *
    * @author <a href="mailto:jonl@muppetlabs.com">Jonathan Locke</a>
  - * @version $Id: RE.java,v 1.6 2000/08/22 17:19:38 jon Exp $
  + * @version $Id: RE.java,v 1.7 2001/02/11 23:04:22 jon Exp $
    */
   public class RE
   {
  @@ -397,7 +398,9 @@
       static final char OP_MAYBE            = '?';  // node            optional closure
       static final char OP_ESCAPE           = '\\'; // escape          special escape code
char class (escape is E_* code)
       static final char OP_OPEN             = '(';  // number          nth opening paren
  +    static final char OP_OPEN_CLUSTER     = '<';  //                 opening cluster
       static final char OP_CLOSE            = ')';  // number          nth closing paren
  +    static final char OP_CLOSE_CLUSTER    = '>';  //                 closing cluster
       static final char OP_BACKREF          = '#';  // number          reference nth already
matched parenthesized string
       static final char OP_GOTO             = 'G';  //                 nothing but a (back-)pointer
       static final char OP_NOTHING          = 'N';  //                 match null string
such as in '(a|)'
  @@ -418,7 +421,7 @@
   
       // Posix character classes
       static final char POSIX_CLASS_ALNUM   = 'w';  // Alphanumerics
  -    static final char POSIX_CLASS_ALPHA   = 'a';  // Alphabetics 
  +    static final char POSIX_CLASS_ALPHA   = 'a';  // Alphabetics
       static final char POSIX_CLASS_BLANK   = 'b';  // Blanks
       static final char POSIX_CLASS_CNTRL   = 'c';  // Control characters
       static final char POSIX_CLASS_DIGIT   = 'd';  // Digits
  @@ -945,6 +948,11 @@
                           }
                       }
                       return idxNew;
  +
  +                case OP_OPEN_CLUSTER:
  +                case OP_CLOSE_CLUSTER:
  +                    // starting or ending the matching of a subexpression which has no
backref.
  +                    return matchNodes( next, maxNode, idx );
   
                   case OP_BACKREF:
                       {
  
  
  
  1.3       +24 -7     jakarta-regexp/src/java/org/apache/regexp/RECompiler.java
  
  Index: RECompiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/src/java/org/apache/regexp/RECompiler.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RECompiler.java	2000/05/14 21:04:17	1.2
  +++ RECompiler.java	2001/02/11 23:04:22	1.3
  @@ -71,7 +71,7 @@
    * @see recompile
    *
    * @author <a href="mailto:jonl@muppetlabs.com">Jonathan Locke</a>
  - * @version $Id: RECompiler.java,v 1.2 2000/05/14 21:04:17 jon Exp $
  + * @version $Id: RECompiler.java,v 1.3 2001/02/11 23:04:22 jon Exp $
    */
   public class RECompiler
   {
  @@ -1188,14 +1188,24 @@
       int expr(int[] flags) throws RESyntaxException
       {
           // Create open paren node unless we were called from the top level (which has no
parens)
  -        boolean paren = false;
  +        int paren = -1;
           int ret = -1;
           int closeParens = parens;
           if ((flags[0] & NODE_TOPLEVEL) == 0 && pattern.charAt(idx) == '(')
           {
  -            idx++;
  -            paren = true;
  -            ret = node(RE.OP_OPEN, parens++);
  +            // if its a cluster ( rather than a proper subexpression ie with backrefs )
  +            if ( idx + 2 < len && pattern.charAt( idx + 1 ) == '?' &&
pattern.charAt( idx + 2 ) == ':' )
  +            {
  +                paren = 2;
  +                idx += 3;
  +                ret = node( RE.OP_OPEN_CLUSTER, 0 );
  +            }
  +            else
  +            {
  +                paren = 1;
  +                idx++;
  +                ret = node(RE.OP_OPEN, parens++);
  +            }
           }
           flags[0] &= ~NODE_TOPLEVEL;
   
  @@ -1220,7 +1230,7 @@
   
           // Create an ending node (either a close paren or an OP_END)
           int end;
  -        if (paren)
  +        if ( paren > 0 )
           {
               if (idx < len && pattern.charAt(idx) == ')')
               {
  @@ -1229,8 +1239,15 @@
               else
               {
                   syntaxError("Missing close paren");
  +            }
  +            if ( paren == 1 )
  +            {
  +                end = node(RE.OP_CLOSE, closeParens);
  +            }
  +            else
  +            {
  +                end = node( RE.OP_CLOSE_CLUSTER, 0 );
               }
  -            end = node(RE.OP_CLOSE, closeParens);
           }
           else
           {
  
  
  
  1.3       +23 -37    jakarta-regexp/src/java/org/apache/regexp/RETest.java
  
  Index: RETest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/src/java/org/apache/regexp/RETest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RETest.java	2000/04/30 20:42:35	1.2
  +++ RETest.java	2001/02/11 23:04:22	1.3
  @@ -55,7 +55,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    *
  - */ 
  + */
   
   import java.io.*;
   
  @@ -65,7 +65,7 @@
    *
    * @author <a href="mailto:jonl@muppetlabs.com">Jonathan Locke</a>
    * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
  - * @version $Id: RETest.java,v 1.2 2000/04/30 20:42:35 jon Exp $
  + * @version $Id: RETest.java,v 1.3 2001/02/11 23:04:22 jon Exp $
    */
   public class RETest
   {
  @@ -82,12 +82,11 @@
        * file RETest.txt will be used as automated testing input.
        * @param arg Command line arguments (optional regular expression)
       */
  -    public static void main(String[] arg)
  +    public static void main(String[] args)
       {
           try
           {
  -            //new RETest(arg);
  -            test();
  +            test( args );
           }
           catch (Exception e)
           {
  @@ -100,10 +99,26 @@
        * @param arg Command line arguments
        * @exception Exception thrown in case of error
       */
  -    public static boolean test() throws Exception
  +    public static boolean test( String[] args ) throws Exception
       {
           RETest test = new RETest();
  -        test.runAutomatedTests("docs/RETest.txt");
  +        // Run interactive tests against a single regexp
  +        if (args.length == 2)
  +        {
  +            test.runInteractiveTests(args[1]);
  +        }
  +        else if (args.length == 1)
  +        {
  +            // Run automated tests
  +            test.runAutomatedTests(args[0]);
  +        }
  +        else
  +        {
  +            System.out.println( "Usage: RETest ([-i] [regex]) ([/path/to/testfile.txt])"
);
  +            System.out.println( "By Default will run automated tests from file 'docs/RETest.txt'
..." );
  +            System.out.println();
  +            test.runAutomatedTests("docs/RETest.txt");
  +        }
           return test.failures == 0;
       }
   
  @@ -115,35 +130,6 @@
       }
   
       /**
  -     * Constructor for test
  -     * @param arg Command line arguments
  -    */
  -    public RETest(String[] arg)
  -    {
  -        try
  -        {
  -            // Run interactive tests against a single regexp
  -            if (arg.length == 2)
  -            {
  -                runInteractiveTests(arg[1]);
  -            }
  -            else if (arg.length == 1)
  -            {
  -                // Run automated tests 
  -                runAutomatedTests(arg[0]);
  -            }
  -            else
  -            {
  -                System.out.println ( "Usage: RETest ([-i] [regex]) ([/path/to/testfile.txt])"
);
  -            }
  -        }
  -        catch (Exception e)
  -        {
  -            e.printStackTrace();
  -        }       
  -    }
  -
  -    /**
        * Compile and test matching against a single expression
        * @param expr Expression to compile and test
       */
  @@ -159,7 +145,7 @@
   
               // Show program for compiled expression
               compiler.dumpProgram(new PrintWriter(System.out));
  -            
  +
               // Test matching against compiled expression
               while (true)
               {
  
  
  
  1.2       +94 -0     jakarta-regexp/xdocs/RETest.txt
  
  Index: RETest.txt
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/xdocs/RETest.txt,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RETest.txt	2000/11/27 19:48:00	1.1
  +++ RETest.txt	2001/02/11 23:04:23	1.2
  @@ -884,3 +884,97 @@
   YES
     aa
     aa
  +
  +#149
  +(?:a)
  +a
  +YES
  +a
  +
  +#150
  +(?:a)
  +aa
  +YES
  +a
  +
  +#151
  +(?:\w)
  +abc
  +YES
  +a
  +
  +#152
  +(?:\w\s\w)+
  +a b c
  +YES
  +a b
  +
  +#153
  +(a\w)(?:,(a\w))+
  +ab,ac,ad
  +YES
  +ab,ac,ad
  +ab
  +ad
  +
  +#154
  +z(\w\s+(?:\w\s+\w)+)z
  +za   b bc   cd     dz
  +YES
  +za   b bc   cd     dz
  +a   b bc   cd     d
  +
  +#155
  +(([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*
  +http://www.test.com
  +YES
  +http://www.test.com
  +http://
  +http
  +.com
  +
  +#156
  +((?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*
  +ftp://www.test.com
  +YES
  +ftp://www.test.com
  +ftp://
  +.com
  +
  +#157
  +(([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*
  +htTp://www.test.com
  +YES
  +htTp://www.test.com
  +htTp://
  +htTp
  +
  +#158
  +(?:([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*
  +FTP://www.test.com
  +YES
  +FTP://www.test.com
  +FTP
  +.com
  +
  +#159
  +^(?:([hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)*$
  +http://.www.test.com
  +NO
  +
  +#160
  +^(?:(?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*$
  +FtP://www.test.com
  +YES
  +FtP://www.test.com
  +
  +#161
  +^(?:(?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*$
  +FtTP://www.test.com
  +NO
  +
  +#162
  +^(?:(?:[hH][tT]{2}[pP]|[fF][tT][pP]):\/\/)?[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*$
  +www.test.com
  +YES
  +www.test.com
  
  
  
  1.2       +6 -0      jakarta-regexp/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/xdocs/changes.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- changes.xml	2000/11/27 19:48:00	1.1
  +++ changes.xml	2001/02/11 23:04:23	1.2
  @@ -15,6 +15,12 @@
   package.
   </p>
   
  +<h3>Version 1.3-dev</h3>
  +<ul>
  +<li>New Feature: <a href="http://www.mail-archive.com/regexp-dev%40jakarta.apache.org/msg00002.html">Clustering</a></li>
  +<li>Rebuilt website with latest Jakarta-Site dependency</li>
  +</ul>
  +
   <h3>Version 1.2</h3>
   <ul>
   <li>Updated to Ant 1.2 (JSS)</li>
  
  
  
  1.2       +1 -99     jakarta-regexp/xdocs/velocity.properties
  
  Index: velocity.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-regexp/xdocs/velocity.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- velocity.properties	2000/11/27 19:48:00	1.1
  +++ velocity.properties	2001/02/11 23:04:24	1.2
  @@ -1,99 +1 @@
  -#----------------------------------------------------------------------------
  -# These are the default properties for the
  -# Velocity Runtime. These values are used when
  -# Runtime.init() is called, and when Runtime.init(properties)
  -# fails to find the specificed properties file.
  -#----------------------------------------------------------------------------
  -
  -#----------------------------------------------------------------------------
  -# R U N T I M E  L O G  
  -#----------------------------------------------------------------------------
  -# This is the location of the Velocity Runtime log.
  -#----------------------------------------------------------------------------
  -
  -runtime.log = velocity.log
  -
  -#----------------------------------------------------------------------------
  -# T E M P L A T E  E N C O D I N G
  -#----------------------------------------------------------------------------
  -
  -template.encoding=8859_1
  -
  -#----------------------------------------------------------------------------
  -# C O N T E N T  T Y P E  
  -#----------------------------------------------------------------------------
  -# This is the default content type for the VelocityServlet.
  -#----------------------------------------------------------------------------
  -
  -default.contentType=text/html
  -
  -#----------------------------------------------------------------------------
  -# F O R E A C H  P R O P E R T I E S
  -#----------------------------------------------------------------------------
  -# These properties control how the counter is accessed in the #foreach
  -# directive. By default the reference $velocityCount will be available
  -# in the body of the #foreach directive. The default starting value
  -# for this reference is 1.
  -#----------------------------------------------------------------------------
  -
  -counter.name = velocityCount
  -counter.initial.value = 1
  -
  -#----------------------------------------------------------------------------
  -# I N C L U D E  P R O P E R T I E S
  -#----------------------------------------------------------------------------
  -# These are the properties that governed the way #include'd content
  -# is governed.
  -#----------------------------------------------------------------------------
  -
  -include.path=../../jakarta-site2/xdocs/stylesheets
  -include.cache = false
  -include.output.errormsg.start = <!-- include error : 
  -include.output.errormsg.end   =  see error log -->
  -
  -#----------------------------------------------------------------------------
  -# P A R S E  P R O P E R T I E S
  -#----------------------------------------------------------------------------
  -
  -parse_directive.maxdepth = 10
  -
  -#----------------------------------------------------------------------------
  -# T E M P L A T E  L O A D E R S
  -#----------------------------------------------------------------------------
  -# 
  -# 
  -#----------------------------------------------------------------------------
  -
  -template.loader.1.public.name = File
  -template.loader.1.description = Velocity File Template Loader
  -template.loader.1.class = org.apache.velocity.runtime.loader.FileTemplateLoader
  -template.loader.1.template.path = ../../jakarta-site2/xdocs/stylesheets
  -template.loader.1.cache = false
  -template.loader.1.modificationCheckInterval = 2
  -
  -#template.loader.2.public.name = URL
  -#template.loader.2.description = Velocity URL Template Loader
  -#template.loader.2.class = org.apache.velocity.runtime.loader.URLTemplateLoader
  -#template.loader.2.template.path = http://localhost/templates/
  -#template.loader.2.cache = false
  -
  -#----------------------------------------------------------------------------
  -# E X T E R N A L  S E R V I C E  I N I T I A L I Z A T I O N
  -#----------------------------------------------------------------------------
  -# If this property is set to true then an external service will
  -# set certain system properties and initialize the Velocity
  -# Runtime. This method is used by Turbine to initialize the
  -# Velocity Runtime for the TurbineVelocityService.
  -#----------------------------------------------------------------------------
  -
  -external.init = false
  -
  -#----------------------------------------------------------------------------
  -# VELOCIMACRO GLOBAL LIBRARY
  -#----------------------------------------------------------------------------
  -# name of default global library.  It is expected to be in the regular
  -# template path.  You may remove it (either the file or this property) if 
  -# you wish with no harm.
  -#----------------------------------------------------------------------------
  -#velocimacro.library.global=VM_global_library.vm
  -
  +resource.loader.1.resource.path = ../../jakarta-site2/xdocs/stylesheets
  
  
  

Mime
View raw message