1 Clazz.declarePackage ("com.stevesoft.pat");
2 Clazz.load (["com.stevesoft.pat.Or", "$.SubMark"], "com.stevesoft.pat.OrMark", null, function () {
3 c$ = Clazz.decorateAsClass (function () {
6 Clazz.instantialize (this, arguments);
7 }, com.stevesoft.pat, "OrMark", com.stevesoft.pat.Or);
8 Clazz.prepareFields (c$, function () {
9 this.sm = new com.stevesoft.pat.SubMark ();
11 Clazz.makeConstructor (c$,
13 Clazz.superConstructor (this, com.stevesoft.pat.OrMark, []);
17 Clazz.overrideMethod (c$, "leftForm",
21 Clazz.defineMethod (c$, "getNext",
25 Clazz.defineMethod (c$, "matchInternal",
27 this.sm.next = Clazz.superCall (this, com.stevesoft.pat.OrMark, "getNext", []);
28 if (pt.marks == null) {
29 var n2 = 2 * pt.nMarks + 2;
30 pt.marks = Clazz.newIntArray (n2, 0);
31 for (var i = 0; i < n2; i++) {
34 }pt.marks[this.id] = pos;
35 var ret = Clazz.superCall (this, com.stevesoft.pat.OrMark, "matchInternal", [pos, pt]);
37 pt.marks[this.id] = -1;
38 } else if (pt.marks[this.id] > pt.marks[this.id + pt.nMarks]) {
39 var swap = pt.marks[this.id];
40 pt.marks[this.id] = pt.marks[this.id + pt.nMarks] + 1;
41 pt.marks[this.id + pt.nMarks] = swap + 1;
43 }, "~N,com.stevesoft.pat.Pthings");
44 Clazz.overrideMethod (c$, "clone1",
46 var om = new com.stevesoft.pat.OrMark (this.id);
49 for (var i = 0; i < this.v.size (); i++) {
50 om.v.addElement ((this.v.elementAt (i)).clone (h));
53 }, "java.util.Hashtable");