X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=bin%2Fcom%2Fstevesoft%2Fpat%2FlookAhead.js;h=6b9fe88d2bee7c088f538092a2a57a52967c2c83;hp=05e888d1acbc6f59ce623ada119761b5120ccb4e;hb=8ffd05b3abe52c0b6b79b011c0966361f82d5fe6;hpb=6154cb57a6eac3bb1344b8342495f5bb701ee921 diff --git a/bin/com/stevesoft/pat/lookAhead.js b/bin/com/stevesoft/pat/lookAhead.js index 05e888d..6b9fe88 100644 --- a/bin/com/stevesoft/pat/lookAhead.js +++ b/bin/com/stevesoft/pat/lookAhead.js @@ -1,62 +1,62 @@ -Clazz.declarePackage ("com.stevesoft.pat"); -Clazz.load (["com.stevesoft.pat.Or"], "com.stevesoft.pat.lookAhead", ["com.stevesoft.pat.patInt"], function () { -c$ = Clazz.decorateAsClass (function () { -this.reverse = false; -Clazz.instantialize (this, arguments); -}, com.stevesoft.pat, "lookAhead", com.stevesoft.pat.Or); -Clazz.makeConstructor (c$, -function (b) { -Clazz.superConstructor (this, com.stevesoft.pat.lookAhead, []); -this.reverse = b; -}, "~B"); -Clazz.defineMethod (c$, "getNext", -function () { -return null; -}); -Clazz.overrideMethod (c$, "nextMatch", -function (pos, pt) { -var p = Clazz.superCall (this, com.stevesoft.pat.lookAhead, "getNext", []); -if (p != null) { -return p.matchInternal (pos, pt); -} else { -return pos; -}}, "~N,com.stevesoft.pat.Pthings"); -Clazz.defineMethod (c$, "matchInternal", -function (pos, pt) { -if (Clazz.superCall (this, com.stevesoft.pat.lookAhead, "matchInternal", [pos, pt]) >= 0) { -if (this.reverse) { -return -1; -} else { -return this.nextMatch (pos, pt); -}} else { -if (this.reverse) { -return this.nextMatch (pos, pt); -} else { -return -1; -}}}, "~N,com.stevesoft.pat.Pthings"); -Clazz.overrideMethod (c$, "leftForm", -function () { -if (this.reverse) { -return "(?!"; -} else { -return "(?="; -}}); -Clazz.overrideMethod (c$, "minChars", -function () { -return new com.stevesoft.pat.patInt (0); -}); -Clazz.overrideMethod (c$, "maxChars", -function () { -return new com.stevesoft.pat.patInt (0); -}); -Clazz.overrideMethod (c$, "clone1", -function (h) { -var la = new com.stevesoft.pat.lookAhead (this.reverse); -h.put (this, la); -h.put (la, la); -for (var i = 0; i < this.v.size (); i++) { -la.v.addElement ((this.v.elementAt (i)).clone (h)); -} -return la; -}, "java.util.Hashtable"); -}); +Clazz.declarePackage ("com.stevesoft.pat"); +Clazz.load (["com.stevesoft.pat.Or"], "com.stevesoft.pat.lookAhead", ["com.stevesoft.pat.patInt"], function () { +c$ = Clazz.decorateAsClass (function () { +this.reverse = false; +Clazz.instantialize (this, arguments); +}, com.stevesoft.pat, "lookAhead", com.stevesoft.pat.Or); +Clazz.makeConstructor (c$, +function (b) { +Clazz.superConstructor (this, com.stevesoft.pat.lookAhead, []); +this.reverse = b; +}, "~B"); +Clazz.defineMethod (c$, "getNext", +function () { +return null; +}); +Clazz.overrideMethod (c$, "nextMatch", +function (pos, pt) { +var p = Clazz.superCall (this, com.stevesoft.pat.lookAhead, "getNext", []); +if (p != null) { +return p.matchInternal (pos, pt); +} else { +return pos; +}}, "~N,com.stevesoft.pat.Pthings"); +Clazz.defineMethod (c$, "matchInternal", +function (pos, pt) { +if (Clazz.superCall (this, com.stevesoft.pat.lookAhead, "matchInternal", [pos, pt]) >= 0) { +if (this.reverse) { +return -1; +} else { +return this.nextMatch (pos, pt); +}} else { +if (this.reverse) { +return this.nextMatch (pos, pt); +} else { +return -1; +}}}, "~N,com.stevesoft.pat.Pthings"); +Clazz.overrideMethod (c$, "leftForm", +function () { +if (this.reverse) { +return "(?!"; +} else { +return "(?="; +}}); +Clazz.overrideMethod (c$, "minChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.overrideMethod (c$, "maxChars", +function () { +return new com.stevesoft.pat.patInt (0); +}); +Clazz.overrideMethod (c$, "clone1", +function (h) { +var la = new com.stevesoft.pat.lookAhead (this.reverse); +h.put (this, la); +h.put (la, la); +for (var i = 0; i < this.v.size (); i++) { +la.v.addElement ((this.v.elementAt (i)).clone (h)); +} +return la; +}, "java.util.Hashtable"); +});