1 Clazz.declarePackage ("com.stevesoft.pat");
2 Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.DotMulti", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.fewestMatches = null;
5 this.mostMatches = null;
6 this.matchFewest = false;
9 this.dotDoesntMatchCR = true;
10 Clazz.instantialize (this, arguments);
11 }, com.stevesoft.pat, "DotMulti", com.stevesoft.pat.PatternSub);
12 Clazz.overrideMethod (c$, "minChars",
14 return this.fewestMatches;
16 Clazz.overrideMethod (c$, "maxChars",
18 return this.mostMatches;
20 Clazz.makeConstructor (c$,
22 Clazz.superConstructor (this, com.stevesoft.pat.DotMulti, []);
23 this.fewestMatches = a;
25 }, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt");
26 Clazz.overrideMethod (c$, "toString",
28 return ".{" + this.fewestMatches + "," + this.mostMatches + "}" + (this.matchFewest ? "?" : "") + "(?# <= dot multi)" + this.nextString ();
30 Clazz.defineMethod (c$, "submatchInternal",
32 if (pos < this.srclength) {
33 if (this.dotDoesntMatchCR) {
34 if (this.src.charAt (pos) != '\n') {
39 }, "~N,com.stevesoft.pat.Pthings");
40 Clazz.overrideMethod (c$, "matchInternal",
45 this.srclength = this.src.length ();
46 this.dotDoesntMatchCR = pt.dotDoesntMatchCR;
47 if (this.matchFewest) {
49 while (this.fewestMatches.intValue () > nMatches) {
50 i = this.submatchInternal (i, pt);
57 }var ii = this.nextMatch (i, pt);
60 }if (!this.mostMatches.finite ()) {
62 i = this.submatchInternal (i, pt);
65 }ii = this.nextMatch (i, pt);
71 i = this.submatchInternal (i, pt);
75 if (nMatches > this.mostMatches.intValue ()) {
77 }ii = this.nextMatch (i, pt);
83 while (this.fewestMatches.intValue () > nMatches) {
84 i = this.submatchInternal (i, pt);
91 if (this.mostMatches.finite ()) {
92 while (nMatches < this.mostMatches.intValue ()) {
93 i = this.submatchInternal (i, pt);
102 i = this.submatchInternal (i, pt);
110 var r = this.nextMatch (m, pt);
115 if (nMatches < this.fewestMatches.intValue ()) {
119 }, "~N,com.stevesoft.pat.Pthings");
120 Clazz.overrideMethod (c$, "clone1",
122 var dm = new com.stevesoft.pat.DotMulti (this.fewestMatches, this.mostMatches);
123 dm.matchFewest = this.matchFewest;
125 }, "java.util.Hashtable");
126 Clazz.defineStatics (c$,