1 Clazz.declarePackage ("com.stevesoft.pat");
\r
2 Clazz.load (["com.stevesoft.pat.Pattern"], "com.stevesoft.pat.Start", ["com.stevesoft.pat.patInt"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
4 this.retIsStart = false;
\r
5 Clazz.instantialize (this, arguments);
\r
6 }, com.stevesoft.pat, "Start", com.stevesoft.pat.Pattern);
\r
7 Clazz.makeConstructor (c$,
\r
9 Clazz.superConstructor (this, com.stevesoft.pat.Start, []);
\r
10 this.retIsStart = b;
\r
12 Clazz.overrideMethod (c$, "matchInternal",
\r
13 function (pos, pt) {
\r
14 if (this.retIsStart && pt.mFlag && pos > 0 && pt.src.charAt (pos - 1) == '\n') {
\r
15 return this.nextMatch (pos, pt);
\r
17 return this.nextMatch (pos, pt);
\r
19 }, "~N,com.stevesoft.pat.Pthings");
\r
20 Clazz.overrideMethod (c$, "toString",
\r
22 if (this.retIsStart) {
\r
23 return "^" + this.nextString ();
\r
25 return "\\A" + this.nextString ();
\r
27 Clazz.overrideMethod (c$, "maxChars",
\r
29 return new com.stevesoft.pat.patInt (0);
\r
31 Clazz.overrideMethod (c$, "clone1",
\r
33 return new com.stevesoft.pat.Start (this.retIsStart);
\r
34 }, "java.util.Hashtable");
\r