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