JAL-1807 includes ?j2sdebug flag and DebugJS._(msg)
[jalviewjs.git] / bin / com / stevesoft / pat / RegexTokenizer.js
index 08cc754..c5774f3 100644 (file)
-Clazz.declarePackage ("com.stevesoft.pat");\r
-Clazz.load (["java.util.Enumeration", "$.Vector"], "com.stevesoft.pat.RegexTokenizer", ["com.stevesoft.pat.Regex"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.toParse = null;\r
-this.r = null;\r
-this.count = 0;\r
-this.v = null;\r
-this.vi = null;\r
-this.pos = 0;\r
-this.offset = 1;\r
-Clazz.instantialize (this, arguments);\r
-}, com.stevesoft.pat, "RegexTokenizer", null, java.util.Enumeration);\r
-Clazz.prepareFields (c$, function () {\r
-this.v =  new java.util.Vector ();\r
-this.vi =  new java.util.Vector ();\r
-});\r
-Clazz.defineMethod (c$, "getMore", \r
-function () {\r
-var s = this.r.right ();\r
-if (this.r.searchFrom (this.toParse, this.pos)) {\r
-this.v.addElement (this.r.left ().substring (this.pos));\r
-this.vi.addElement ( new Integer (this.r.matchFrom () + this.r.charsMatched ()));\r
-for (var i = 0; i < this.r.numSubs (); i++) {\r
-if (this.r.substring () != null) {\r
-this.v.addElement (this.r.substringI (i + this.offset));\r
-this.vi.addElement ( new Integer (this.r.matchFromI (i + this.offset) + this.r.charsMatchedI (i + this.offset)));\r
-}}\r
-this.pos = this.r.matchFrom () + this.r.charsMatched ();\r
-} else if (s != null) {\r
-this.v.addElement (s);\r
-}});\r
-Clazz.makeConstructor (c$, \r
-function (txt, ptrn) {\r
-this.toParse = txt;\r
-this.r =  new com.stevesoft.pat.Regex (ptrn, "");\r
-this.offset = com.stevesoft.pat.Regex.BackRefOffset;\r
-this.getMore ();\r
-}, "~S,~S");\r
-Clazz.makeConstructor (c$, \r
-function (txt, r) {\r
-this.toParse = txt;\r
-this.r = r;\r
-this.offset = com.stevesoft.pat.Regex.BackRefOffset;\r
-this.getMore ();\r
-}, "~S,com.stevesoft.pat.Regex");\r
-Clazz.overrideMethod (c$, "nextElement", \r
-function () {\r
-if (this.count >= this.v.size ()) {\r
-this.getMore ();\r
-}return this.v.elementAt (this.count++);\r
-});\r
-Clazz.defineMethod (c$, "nextToken", \r
-function () {\r
-return this.nextElement ();\r
-});\r
-Clazz.defineMethod (c$, "nextToken", \r
-function (newpat) {\r
-try {\r
-this.r.compile (newpat);\r
-} catch (r_) {\r
-if (Clazz.exceptionOf (r_, com.stevesoft.pat.RegSyntax)) {\r
-} else {\r
-throw r_;\r
-}\r
-}\r
-return this.nextToken (this.r);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "nextToken", \r
-function (nr) {\r
-this.r = nr;\r
-if (this.vi.size () > this.count) {\r
-this.pos = (this.vi.elementAt (this.count)).intValue ();\r
-this.v.setSize (this.count);\r
-this.vi.setSize (this.count);\r
-}this.getMore ();\r
-return this.nextToken ();\r
-}, "com.stevesoft.pat.Regex");\r
-Clazz.overrideMethod (c$, "hasMoreElements", \r
-function () {\r
-if (this.count >= this.v.size ()) {\r
-this.getMore ();\r
-}return this.count < this.v.size ();\r
-});\r
-Clazz.defineMethod (c$, "hasMoreTokens", \r
-function () {\r
-return this.hasMoreElements ();\r
-});\r
-Clazz.defineMethod (c$, "countTokens", \r
-function () {\r
-var _count = this.count;\r
-while (this.hasMoreTokens ()) {\r
-this.nextToken ();\r
-}\r
-this.count = _count;\r
-return this.v.size () - this.count;\r
-});\r
-Clazz.defineMethod (c$, "allTokens", \r
-function () {\r
-this.countTokens ();\r
-var ret =  new Array (this.v.size ());\r
-this.v.copyInto (ret);\r
-return ret;\r
-});\r
-});\r
+Clazz.declarePackage ("com.stevesoft.pat");
+Clazz.load (["java.util.Enumeration", "$.Vector"], "com.stevesoft.pat.RegexTokenizer", ["com.stevesoft.pat.Regex"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.toParse = null;
+this.r = null;
+this.count = 0;
+this.v = null;
+this.vi = null;
+this.pos = 0;
+this.offset = 1;
+Clazz.instantialize (this, arguments);
+}, com.stevesoft.pat, "RegexTokenizer", null, java.util.Enumeration);
+Clazz.prepareFields (c$, function () {
+this.v =  new java.util.Vector ();
+this.vi =  new java.util.Vector ();
+});
+Clazz.defineMethod (c$, "getMore", 
+function () {
+var s = this.r.right ();
+if (this.r.searchFrom (this.toParse, this.pos)) {
+this.v.addElement (this.r.left ().substring (this.pos));
+this.vi.addElement ( new Integer (this.r.matchFrom () + this.r.charsMatched ()));
+for (var i = 0; i < this.r.numSubs (); i++) {
+if (this.r.substring () != null) {
+this.v.addElement (this.r.substringI (i + this.offset));
+this.vi.addElement ( new Integer (this.r.matchFromI (i + this.offset) + this.r.charsMatchedI (i + this.offset)));
+}}
+this.pos = this.r.matchFrom () + this.r.charsMatched ();
+} else if (s != null) {
+this.v.addElement (s);
+}});
+Clazz.makeConstructor (c$, 
+function (txt, ptrn) {
+this.toParse = txt;
+this.r =  new com.stevesoft.pat.Regex (ptrn, "");
+this.offset = com.stevesoft.pat.Regex.BackRefOffset;
+this.getMore ();
+}, "~S,~S");
+Clazz.makeConstructor (c$, 
+function (txt, r) {
+this.toParse = txt;
+this.r = r;
+this.offset = com.stevesoft.pat.Regex.BackRefOffset;
+this.getMore ();
+}, "~S,com.stevesoft.pat.Regex");
+Clazz.overrideMethod (c$, "nextElement", 
+function () {
+if (this.count >= this.v.size ()) {
+this.getMore ();
+}return this.v.elementAt (this.count++);
+});
+Clazz.defineMethod (c$, "nextToken", 
+function () {
+return this.nextElement ();
+});
+Clazz.defineMethod (c$, "nextToken", 
+function (newpat) {
+try {
+this.r.compile (newpat);
+} catch (r_) {
+if (Clazz.exceptionOf (r_, com.stevesoft.pat.RegSyntax)) {
+} else {
+throw r_;
+}
+}
+return this.nextToken (this.r);
+}, "~S");
+Clazz.defineMethod (c$, "nextToken", 
+function (nr) {
+this.r = nr;
+if (this.vi.size () > this.count) {
+this.pos = (this.vi.elementAt (this.count)).intValue ();
+this.v.setSize (this.count);
+this.vi.setSize (this.count);
+}this.getMore ();
+return this.nextToken ();
+}, "com.stevesoft.pat.Regex");
+Clazz.overrideMethod (c$, "hasMoreElements", 
+function () {
+if (this.count >= this.v.size ()) {
+this.getMore ();
+}return this.count < this.v.size ();
+});
+Clazz.defineMethod (c$, "hasMoreTokens", 
+function () {
+return this.hasMoreElements ();
+});
+Clazz.defineMethod (c$, "countTokens", 
+function () {
+var _count = this.count;
+while (this.hasMoreTokens ()) {
+this.nextToken ();
+}
+this.count = _count;
+return this.v.size () - this.count;
+});
+Clazz.defineMethod (c$, "allTokens", 
+function () {
+this.countTokens ();
+var ret =  new Array (this.v.size ());
+this.v.copyInto (ret);
+return ret;
+});
+});