1 Clazz.declarePackage ("com.stevesoft.pat");
\r
2 Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Boundary", ["com.stevesoft.pat.patInt"], function () {
\r
3 c$ = Clazz.declareType (com.stevesoft.pat, "Boundary", com.stevesoft.pat.Pattern);
\r
4 Clazz.overrideMethod (c$, "toString",
\r
6 return "\\b" + this.nextString ();
\r
8 Clazz.defineMethod (c$, "isAChar",
\r
10 if (c >= 'a' && c <= 'z') {
\r
12 }if (c >= 'A' && c <= 'Z') {
\r
14 }if (c >= '0' && c <= '9') {
\r
20 Clazz.defineMethod (c$, "matchLeft",
\r
21 function (pos, pt) {
\r
24 }if (this.isAChar (pt.src.charAt (pos)) && this.isAChar (pt.src.charAt (pos - 1))) {
\r
27 }, "~N,com.stevesoft.pat.Pthings");
\r
28 Clazz.defineMethod (c$, "matchRight",
\r
29 function (pos, pt) {
\r
32 }if (pos + 1 >= pt.src.length ()) {
\r
34 }if (this.isAChar (pt.src.charAt (pos)) && this.isAChar (pt.src.charAt (pos + 1))) {
\r
37 }, "~N,com.stevesoft.pat.Pthings");
\r
38 Clazz.overrideMethod (c$, "matchInternal",
\r
39 function (pos, pt) {
\r
40 if (this.matchRight (pos - 1, pt) || this.matchLeft (pos, pt)) {
\r
41 return this.nextMatch (pos, pt);
\r
43 }, "~N,com.stevesoft.pat.Pthings");
\r
44 Clazz.overrideMethod (c$, "maxChars",
\r
46 return new com.stevesoft.pat.patInt (0);
\r
48 Clazz.overrideMethod (c$, "clone1",
\r
50 return new com.stevesoft.pat.Boundary ();
\r
51 }, "java.util.Hashtable");
\r