Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / com / stevesoft / pat / Multi_stage2.js
index 1d291ab..6d4f8fc 100644 (file)
@@ -1,95 +1,95 @@
-Clazz.declarePackage ("com.stevesoft.pat");\r
-Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.Multi_stage2", ["com.stevesoft.pat.RegSyntaxError", "$.patInt"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.nextRet = null;\r
-this.count = null;\r
-this.matchMin = null;\r
-this.matchMax = null;\r
-this.matchFewest = false;\r
-this.pos_old = -1;\r
-Clazz.instantialize (this, arguments);\r
-}, com.stevesoft.pat, "Multi_stage2", com.stevesoft.pat.PatternSub);\r
-Clazz.defineMethod (c$, "toString", \r
-function () {\r
-var ret = "";\r
-ret += this.sub.toString ();\r
-ret += "{" + this.matchMin + "," + this.matchMax + "}";\r
-if (this.matchFewest) {\r
-ret += "?";\r
-}ret += this.parent.nextString ();\r
-return ret;\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (a, b, p) {\r
-Clazz.superConstructor (this, com.stevesoft.pat.Multi_stage2, []);\r
-if (p == null) {\r
-com.stevesoft.pat.RegSyntaxError.endItAll ("Multiple match of Null pattern requested.");\r
-}this.sub = p;\r
-this.nextRet = this;\r
-this.sub.setParent (this);\r
-this.matchMin = a;\r
-this.matchMax = b;\r
-this.count =  new com.stevesoft.pat.patInt (0);\r
-if (!a.lessEq (b)) {\r
-com.stevesoft.pat.RegSyntaxError.endItAll ("Bad Multi Args: " + a + ">" + b);\r
-}var i =  new com.stevesoft.pat.patInt (-1);\r
-if (a.lessEq (i)) {\r
-com.stevesoft.pat.RegSyntaxError.endItAll ("Bad Multi Args: " + a + "< 0");\r
-}}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern");\r
-Clazz.defineMethod (c$, "getNext", \r
-function () {\r
-return this.nextRet;\r
-});\r
-Clazz.overrideMethod (c$, "matchInternal", \r
-function (pos, pt) {\r
-this.sub.setParent (this);\r
-var canUse = -1;\r
-if (this.pos_old >= 0 && pos == this.pos_old) {\r
-return -1;\r
-}this.pos_old = pos;\r
-if (this.matchMin.lessEq (this.count)) {\r
-canUse = pos;\r
-}if (!this.count.lessEq (this.matchMax) || pos > pt.src.length ()) {\r
-return -1;\r
-}if ((this.matchFewest || this.count.equals (this.matchMax)) && canUse >= 0) {\r
-var n = Clazz.superCall (this, com.stevesoft.pat.Multi_stage2, "getNext", []);\r
-if (n == null) {\r
-return canUse;\r
-}var ret = this.testMatch (n, pos, pt);\r
-if (ret >= 0) {\r
-return ret;\r
-} else {\r
-canUse = -1;\r
-}}this.count.inc ();\r
-try {\r
-if (this.count.lessEq (this.matchMax)) {\r
-var r = this.testMatch (this.sub, pos, pt);\r
-if (r >= 0) {\r
-return r;\r
-}}} finally {\r
-this.count.dec ();\r
-}\r
-if (!this.matchFewest && canUse >= 0) {\r
-var n = Clazz.superCall (this, com.stevesoft.pat.Multi_stage2, "getNext", []);\r
-if (n == null) {\r
-return canUse;\r
-}var ret = this.testMatch (n, pos, pt);\r
-return ret;\r
-} else {\r
-return canUse;\r
-}}, "~N,com.stevesoft.pat.Pthings");\r
-Clazz.overrideMethod (c$, "clone1", \r
-function (h) {\r
-try {\r
-var m =  new com.stevesoft.pat.Multi_stage2 (this.matchMin, this.matchMax, this.sub.clone (h));\r
-m.matchFewest = this.matchFewest;\r
-return m;\r
-} catch (rs) {\r
-if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) {\r
-return null;\r
-} else {\r
-throw rs;\r
-}\r
-}\r
-}, "java.util.Hashtable");\r
-});\r
+Clazz.declarePackage ("com.stevesoft.pat");
+Clazz.load (["com.stevesoft.pat.PatternSub"], "com.stevesoft.pat.Multi_stage2", ["com.stevesoft.pat.RegSyntaxError", "$.patInt"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.nextRet = null;
+this.count = null;
+this.matchMin = null;
+this.matchMax = null;
+this.matchFewest = false;
+this.pos_old = -1;
+Clazz.instantialize (this, arguments);
+}, com.stevesoft.pat, "Multi_stage2", com.stevesoft.pat.PatternSub);
+Clazz.defineMethod (c$, "toString", 
+function () {
+var ret = "";
+ret += this.sub.toString ();
+ret += "{" + this.matchMin + "," + this.matchMax + "}";
+if (this.matchFewest) {
+ret += "?";
+}ret += this.parent.nextString ();
+return ret;
+});
+Clazz.makeConstructor (c$, 
+function (a, b, p) {
+Clazz.superConstructor (this, com.stevesoft.pat.Multi_stage2, []);
+if (p == null) {
+com.stevesoft.pat.RegSyntaxError.endItAll ("Multiple match of Null pattern requested.");
+}this.sub = p;
+this.nextRet = this;
+this.sub.setParent (this);
+this.matchMin = a;
+this.matchMax = b;
+this.count =  new com.stevesoft.pat.patInt (0);
+if (!a.lessEq (b)) {
+com.stevesoft.pat.RegSyntaxError.endItAll ("Bad Multi Args: " + a + ">" + b);
+}var i =  new com.stevesoft.pat.patInt (-1);
+if (a.lessEq (i)) {
+com.stevesoft.pat.RegSyntaxError.endItAll ("Bad Multi Args: " + a + "< 0");
+}}, "com.stevesoft.pat.patInt,com.stevesoft.pat.patInt,com.stevesoft.pat.Pattern");
+Clazz.defineMethod (c$, "getNext", 
+function () {
+return this.nextRet;
+});
+Clazz.overrideMethod (c$, "matchInternal", 
+function (pos, pt) {
+this.sub.setParent (this);
+var canUse = -1;
+if (this.pos_old >= 0 && pos == this.pos_old) {
+return -1;
+}this.pos_old = pos;
+if (this.matchMin.lessEq (this.count)) {
+canUse = pos;
+}if (!this.count.lessEq (this.matchMax) || pos > pt.src.length ()) {
+return -1;
+}if ((this.matchFewest || this.count.equals (this.matchMax)) && canUse >= 0) {
+var n = Clazz.superCall (this, com.stevesoft.pat.Multi_stage2, "getNext", []);
+if (n == null) {
+return canUse;
+}var ret = this.testMatch (n, pos, pt);
+if (ret >= 0) {
+return ret;
+} else {
+canUse = -1;
+}}this.count.inc ();
+try {
+if (this.count.lessEq (this.matchMax)) {
+var r = this.testMatch (this.sub, pos, pt);
+if (r >= 0) {
+return r;
+}}} finally {
+this.count.dec ();
+}
+if (!this.matchFewest && canUse >= 0) {
+var n = Clazz.superCall (this, com.stevesoft.pat.Multi_stage2, "getNext", []);
+if (n == null) {
+return canUse;
+}var ret = this.testMatch (n, pos, pt);
+return ret;
+} else {
+return canUse;
+}}, "~N,com.stevesoft.pat.Pthings");
+Clazz.overrideMethod (c$, "clone1", 
+function (h) {
+try {
+var m =  new com.stevesoft.pat.Multi_stage2 (this.matchMin, this.matchMax, this.sub.clone (h));
+m.matchFewest = this.matchFewest;
+return m;
+} catch (rs) {
+if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) {
+return null;
+} else {
+throw rs;
+}
+}
+}, "java.util.Hashtable");
+});