X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fcom%2Fstevesoft%2Fpat%2FBoundary.js;h=9eaff99b939e280d4879dc57523f5956e6740151;hp=58bb19c34a7ed9d4376d10597c298ee2c83afb2e;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/com/stevesoft/pat/Boundary.js b/site/j2s/com/stevesoft/pat/Boundary.js index 58bb19c..9eaff99 100644 --- a/site/j2s/com/stevesoft/pat/Boundary.js +++ b/site/j2s/com/stevesoft/pat/Boundary.js @@ -1,52 +1,52 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Boundary", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.declareType (com.stevesoft.pat, "Boundary", com.stevesoft.pat.Pattern); -Clazz.overrideMethod (c$, "toString", -function () { -return "\\b" + this.nextString (); -}); -Clazz.defineMethod (c$, "isAChar", -function (c) { -if (c >= 'a' && c <= 'z') { -return true; -}if (c >= 'A' && c <= 'Z') { -return true; -}if (c >= '0' && c <= '9') { -return true; -}if (c == '_') { -return true; -}return false; -}, "~S"); -Clazz.defineMethod (c$, "matchLeft", -function (pos, pt) { -if (pos <= 0) { -return true; -}if (this.isAChar (pt.src.charAt (pos)) && this.isAChar (pt.src.charAt (pos - 1))) { -return false; -}return true; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.defineMethod (c$, "matchRight", -function (pos, pt) { -if (pos < 0) { -return false; -}if (pos + 1 >= pt.src.length ()) { -return true; -}if (this.isAChar (pt.src.charAt (pos)) && this.isAChar (pt.src.charAt (pos + 1))) { -return false; -}return true; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "matchInternal", -function (pos, pt) { -if (this.matchRight (pos - 1, pt) || this.matchLeft (pos, pt)) { -return this.nextMatch (pos, pt); -}return -1; -}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (0); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -return new com.stevesoft.pat.Boundary (); -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Boundary", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.declareType (com.stevesoft.pat, "Boundary", com.stevesoft.pat.Pattern); +Clazz.overrideMethod (c$, "toString", +function () { +return "\\b" + this.nextString (); +}); +Clazz.defineMethod (c$, "isAChar", +function (c) { +if (c >= 'a' && c <= 'z') { +return true; +}if (c >= 'A' && c <= 'Z') { +return true; +}if (c >= '0' && c <= '9') { +return true; +}if (c == '_') { +return true; +}return false; +}, "~S"); +Clazz.defineMethod (c$, "matchLeft", +function (pos, pt) { +if (pos <= 0) { +return true; +}if (this.isAChar (pt.src.charAt (pos)) && this.isAChar (pt.src.charAt (pos - 1))) { +return false; +}return true; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.defineMethod (c$, "matchRight", +function (pos, pt) { +if (pos < 0) { +return false; +}if (pos + 1 >= pt.src.length ()) { +return true; +}if (this.isAChar (pt.src.charAt (pos)) && this.isAChar (pt.src.charAt (pos + 1))) { +return false; +}return true; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "matchInternal", +function (pos, pt) { +if (this.matchRight (pos - 1, pt) || this.matchLeft (pos, pt)) { +return this.nextMatch (pos, pt); +}return -1; +}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +return new com.stevesoft.pat.Boundary (); +}, "java.util.Hashtable"); +});