Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / com / stevesoft / pat / DotMulti.js
index 3584af1..172397b 100644 (file)
-Clazz.declarePackage ("com.stevesoft.pat");\r
-Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.DotMulti", null, function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.fewestMatches = null;\r
-this.mostMatches = null;\r
-this.matchFewest = false;\r
-this.src = null;\r
-this.srclength = 0;\r
-this.dotDoesntMatchCR = true;\r
-Clazz.instantialize (this, arguments);\r
-}, com.stevesoft.pat, "DotMulti", com.stevesoft.pat.PatternSub);\r
-Clazz.overrideMethod (c$, "minChars", \r
-function () {\r
-return this.fewestMatches;\r
-});\r
-Clazz.overrideMethod (c$, "maxChars", \r
-function () {\r
-return this.mostMatches;\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (a, b) {\r
-Clazz.superConstructor (this, com.stevesoft.pat.DotMulti, []);\r
-this.fewestMatches = a;\r
-this.mostMatches = b;\r
-}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-return ".{" + this.fewestMatches + "," + this.mostMatches + "}" + (this.matchFewest ? "?" : "") + "(?# <= dot multi)" + this.nextString ();\r
-});\r
-Clazz.defineMethod (c$, "submatchInternal", \r
-function (pos, pt) {\r
-if (pos < this.srclength) {\r
-if (this.dotDoesntMatchCR) {\r
-if (this.src.charAt (pos) != '\n') {\r
-return 1 + pos;\r
-}} else {\r
-return 1 + pos;\r
-}}return -1;\r
-}, "~N,com.stevesoft.pat.Pthings");\r
-Clazz.overrideMethod (c$, "matchInternal", \r
-function (pos, pt) {\r
-var m = -1;\r
-var i = pos;\r
-this.src = pt.src;\r
-this.srclength = this.src.length ();\r
-this.dotDoesntMatchCR = pt.dotDoesntMatchCR;\r
-if (this.matchFewest) {\r
-var nMatches = 0;\r
-while (this.fewestMatches.intValue () > nMatches) {\r
-i = this.submatchInternal (i, pt);\r
-if (i < 0) {\r
-return -1;\r
-}nMatches++;\r
-}\r
-if (i < 0) {\r
-return -1;\r
-}var ii = this.nextMatch (i, pt);\r
-if (ii >= 0) {\r
-return ii;\r
-}if (!this.mostMatches.finite ()) {\r
-while (i >= 0) {\r
-i = this.submatchInternal (i, pt);\r
-if (i < 0) {\r
-return -1;\r
-}ii = this.nextMatch (i, pt);\r
-if (ii >= 0) {\r
-return ii;\r
-}}\r
-} else {\r
-while (i > 0) {\r
-i = this.submatchInternal (i, pt);\r
-if (i < 0) {\r
-return -1;\r
-}nMatches++;\r
-if (nMatches > this.mostMatches.intValue ()) {\r
-return -1;\r
-}ii = this.nextMatch (i, pt);\r
-if (ii >= 0) {\r
-return ii;\r
-}}\r
-}return -1;\r
-}var nMatches = 0;\r
-while (this.fewestMatches.intValue () > nMatches) {\r
-i = this.submatchInternal (i, pt);\r
-if (i >= 0) {\r
-nMatches++;\r
-} else {\r
-return -1;\r
-}}\r
-m = i;\r
-if (this.mostMatches.finite ()) {\r
-while (nMatches < this.mostMatches.intValue ()) {\r
-i = this.submatchInternal (i, pt);\r
-if (i >= 0) {\r
-m = i;\r
-nMatches++;\r
-} else {\r
-break;\r
-}}\r
-} else {\r
-while (true) {\r
-i = this.submatchInternal (i, pt);\r
-if (i >= 0) {\r
-m = i;\r
-nMatches++;\r
-} else {\r
-break;\r
-}}\r
-}while (m >= pos) {\r
-var r = this.nextMatch (m, pt);\r
-if (r >= 0) {\r
-return r;\r
-}m -= 1;\r
-nMatches--;\r
-if (nMatches < this.fewestMatches.intValue ()) {\r
-return -1;\r
-}}\r
-return -1;\r
-}, "~N,com.stevesoft.pat.Pthings");\r
-Clazz.overrideMethod (c$, "clone1", \r
-function (h) {\r
-var dm =  new com.stevesoft.pat.DotMulti (this.fewestMatches, this.mostMatches);\r
-dm.matchFewest = this.matchFewest;\r
-return dm;\r
-}, "java.util.Hashtable");\r
-Clazz.defineStatics (c$,\r
-"step", 1,\r
-"idcount", 1);\r
-});\r
+Clazz.declarePackage ("com.stevesoft.pat");
+Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.DotMulti", null, function () {
+c$ = Clazz.decorateAsClass (function () {
+this.fewestMatches = null;
+this.mostMatches = null;
+this.matchFewest = false;
+this.src = null;
+this.srclength = 0;
+this.dotDoesntMatchCR = true;
+Clazz.instantialize (this, arguments);
+}, com.stevesoft.pat, "DotMulti", com.stevesoft.pat.PatternSub);
+Clazz.overrideMethod (c$, "minChars", 
+function () {
+return this.fewestMatches;
+});
+Clazz.overrideMethod (c$, "maxChars", 
+function () {
+return this.mostMatches;
+});
+Clazz.makeConstructor (c$, 
+function (a, b) {
+Clazz.superConstructor (this, com.stevesoft.pat.DotMulti, []);
+this.fewestMatches = a;
+this.mostMatches = b;
+}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+return ".{" + this.fewestMatches + "," + this.mostMatches + "}" + (this.matchFewest ? "?" : "") + "(?# <= dot multi)" + this.nextString ();
+});
+Clazz.defineMethod (c$, "submatchInternal", 
+function (pos, pt) {
+if (pos < this.srclength) {
+if (this.dotDoesntMatchCR) {
+if (this.src.charAt (pos) != '\n') {
+return 1 + pos;
+}} else {
+return 1 + pos;
+}}return -1;
+}, "~N,com.stevesoft.pat.Pthings");
+Clazz.overrideMethod (c$, "matchInternal", 
+function (pos, pt) {
+var m = -1;
+var i = pos;
+this.src = pt.src;
+this.srclength = this.src.length ();
+this.dotDoesntMatchCR = pt.dotDoesntMatchCR;
+if (this.matchFewest) {
+var nMatches = 0;
+while (this.fewestMatches.intValue () > nMatches) {
+i = this.submatchInternal (i, pt);
+if (i < 0) {
+return -1;
+}nMatches++;
+}
+if (i < 0) {
+return -1;
+}var ii = this.nextMatch (i, pt);
+if (ii >= 0) {
+return ii;
+}if (!this.mostMatches.finite ()) {
+while (i >= 0) {
+i = this.submatchInternal (i, pt);
+if (i < 0) {
+return -1;
+}ii = this.nextMatch (i, pt);
+if (ii >= 0) {
+return ii;
+}}
+} else {
+while (i > 0) {
+i = this.submatchInternal (i, pt);
+if (i < 0) {
+return -1;
+}nMatches++;
+if (nMatches > this.mostMatches.intValue ()) {
+return -1;
+}ii = this.nextMatch (i, pt);
+if (ii >= 0) {
+return ii;
+}}
+}return -1;
+}var nMatches = 0;
+while (this.fewestMatches.intValue () > nMatches) {
+i = this.submatchInternal (i, pt);
+if (i >= 0) {
+nMatches++;
+} else {
+return -1;
+}}
+m = i;
+if (this.mostMatches.finite ()) {
+while (nMatches < this.mostMatches.intValue ()) {
+i = this.submatchInternal (i, pt);
+if (i >= 0) {
+m = i;
+nMatches++;
+} else {
+break;
+}}
+} else {
+while (true) {
+i = this.submatchInternal (i, pt);
+if (i >= 0) {
+m = i;
+nMatches++;
+} else {
+break;
+}}
+}while (m >= pos) {
+var r = this.nextMatch (m, pt);
+if (r >= 0) {
+return r;
+}m -= 1;
+nMatches--;
+if (nMatches < this.fewestMatches.intValue ()) {
+return -1;
+}}
+return -1;
+}, "~N,com.stevesoft.pat.Pthings");
+Clazz.overrideMethod (c$, "clone1", 
+function (h) {
+var dm =  new com.stevesoft.pat.DotMulti (this.fewestMatches, this.mostMatches);
+dm.matchFewest = this.matchFewest;
+return dm;
+}, "java.util.Hashtable");
+Clazz.defineStatics (c$,
+"step", 1,
+"idcount", 1);
+});