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); |
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 |
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? |