1 Clazz.declarePackage ("com.stevesoft.pat");
2 Clazz.load (["com.stevesoft.pat.Pattern", "$.RegSyntax"], ["com.stevesoft.pat.BadRangeArgs", "$.Range"], ["com.stevesoft.pat.RegSyntaxError", "$.oneChar", "$.patInt"], function () {
3 c$ = Clazz.declareType (com.stevesoft.pat, "BadRangeArgs", com.stevesoft.pat.RegSyntax);
4 c$ = Clazz.decorateAsClass (function () {
9 this.printBrackets = false;
10 Clazz.instantialize (this, arguments);
11 }, com.stevesoft.pat, "Range", com.stevesoft.pat.Pattern);
12 Clazz.overrideMethod (c$, "toString",
14 var s = com.stevesoft.pat.Pattern.protect ("" + this.lo, "[]{}(),$,-\"^.", '\\') + "-" + com.stevesoft.pat.Pattern.protect ("" + this.hi, "[]{}(),$,-\"^.", '\\');
15 if (!this.printBrackets) {
17 }return "[" + s + "]";
19 Clazz.makeConstructor (c$,
21 Clazz.superConstructor (this, com.stevesoft.pat.Range, []);
25 if (this.lo >= this.hi) {
26 com.stevesoft.pat.RegSyntaxError.endItAll ("Badly formed []'s : " + this.lo + " >= " + this.hi);
27 }o = new com.stevesoft.pat.oneChar (this.lo);
29 o = new com.stevesoft.pat.oneChar (this.hi);
32 Clazz.overrideMethod (c$, "matchInternal",
34 if (pos >= pt.src.length ()) {
36 }if (this.Masked (pos, pt)) {
38 }var c = pt.src.charAt (pos);
39 if (this.lo <= c && c <= this.hi || (pt.ignoreCase && (this.altlo <= c && c <= this.althi))) {
40 return this.nextMatch (pos + 1, pt);
42 }, "~N,com.stevesoft.pat.Pthings");
43 Clazz.overrideMethod (c$, "minChars",
45 return new com.stevesoft.pat.patInt (1);
47 Clazz.overrideMethod (c$, "maxChars",
49 return new com.stevesoft.pat.patInt (1);
51 Clazz.overrideMethod (c$, "clone1",
54 var r = new com.stevesoft.pat.Range (this.lo, this.hi);
55 r.printBrackets = this.printBrackets;
58 if (Clazz.exceptionOf (rs, com.stevesoft.pat.RegSyntax)) {
64 }, "java.util.Hashtable");