1 Clazz.declarePackage ("com.stevesoft.pat");
\r
2 Clazz.load (["com.stevesoft.pat.Or"], "com.stevesoft.pat.Bracket", ["com.stevesoft.pat.patInt", "java.util.Vector"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
5 Clazz.instantialize (this, arguments);
\r
6 }, com.stevesoft.pat, "Bracket", com.stevesoft.pat.Or);
\r
7 Clazz.makeConstructor (c$,
\r
9 Clazz.superConstructor (this, com.stevesoft.pat.Bracket, []);
\r
12 Clazz.overrideMethod (c$, "leftForm",
\r
19 Clazz.overrideMethod (c$, "rightForm",
\r
23 Clazz.overrideMethod (c$, "sepForm",
\r
27 Clazz.defineMethod (c$, "matchInternal",
\r
28 function (pos, pt) {
\r
29 if (pos >= pt.src.length ()) {
\r
31 }var r = Clazz.superCall (this, com.stevesoft.pat.Bracket, "matchInternal", [pos, pt]);
\r
32 if ((this.neg && r < 0) || (!this.neg && r >= 0)) {
\r
33 return this.nextMatch (pos + 1, pt);
\r
35 }, "~N,com.stevesoft.pat.Pthings");
\r
36 Clazz.overrideMethod (c$, "minChars",
\r
38 return new com.stevesoft.pat.patInt (1);
\r
40 Clazz.overrideMethod (c$, "maxChars",
\r
42 return new com.stevesoft.pat.patInt (1);
\r
44 Clazz.overrideMethod (c$, "addOr",
\r
47 this.v.addElement (p);
\r
50 }, "com.stevesoft.pat.Pattern");
\r
51 Clazz.overrideMethod (c$, "clone1",
\r
53 var b = new com.stevesoft.pat.Bracket (this.neg);
\r
54 b.v = new java.util.Vector ();
\r
55 for (var i = 0; i < this.v.size (); i++) {
\r
56 b.v.addElement ((this.v.elementAt (i)).clone1 (h));
\r
59 }, "java.util.Hashtable");
\r