/[classpath]/classpath/gnu/regexp/RETokenRepeated.java
ViewVC logotype

Diff of /classpath/gnu/regexp/RETokenRepeated.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by mark, Sun Mar 7 23:58:54 2004 UTC revision 1.2 by ziga, Sun Jun 12 19:33:16 2005 UTC
# Line 44  final class RETokenRepeated extends RETo Line 44  final class RETokenRepeated extends RETo
44      private REToken token;      private REToken token;
45      private int min,max;      private int min,max;
46      private boolean stingy;      private boolean stingy;
47        private boolean possessive;
48            
49      RETokenRepeated(int subIndex, REToken token, int min, int max) {      RETokenRepeated(int subIndex, REToken token, int min, int max) {
50          super(subIndex);          super(subIndex);
# Line 61  final class RETokenRepeated extends RETo Line 62  final class RETokenRepeated extends RETo
62      boolean isStingy() {      boolean isStingy() {
63          return stingy;          return stingy;
64      }      }
65    
66        /** Sets possessive matching mode to true. */
67        void makePossessive() {
68            possessive = true;
69        }
70    
71        /** Queries if this token has possessive matching enabled. */
72        boolean isPossessive() {
73            return possessive;
74        }
75            
76      /**      /**
77       * The minimum length of a repeated token is the minimum length       * The minimum length of a repeated token is the minimum length
# Line 172  final class RETokenRepeated extends RETo Line 183  final class RETokenRepeated extends RETo
183                  }                  }
184              }              }
185              // else did not match rest of the tokens, try again on smaller sample              // else did not match rest of the tokens, try again on smaller sample
186                // or break out when performing possessive matching
187                if (possessive) break;
188          }          }
189          if (allResults != null) {          if (allResults != null) {
190              mymatch.assignFrom(allResults); // does this get all?              mymatch.assignFrom(allResults); // does this get all?

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26