-//\r
-// This software is now distributed according to\r
-// the Lesser Gnu Public License. Please see\r
-// http://www.gnu.org/copyleft/lesser.txt for\r
-// the details.\r
-// -- Happy Computing!\r
-//\r
-package com.stevesoft.pat;\r
-\r
-import java.util.*;\r
-\r
-/** This class is used to implement the Transformer\r
- @see com.stevesoft.pat.Transform\r
- */\r
-class TransPat extends Pattern {\r
- Regex[] ra = new Regex[10];\r
- int ra_len = 0;\r
- int pn = -1;\r
- public String toString() {\r
- return "(?#TransPat)";\r
- }\r
-\r
- TransPat() {}\r
-\r
- int lastMatchedTo = -1;\r
- public int matchInternal(int pos,Pthings pt) {\r
- for(int i=0;i<ra_len;i++) {\r
- pt.ignoreCase = ra[i].ignoreCase;\r
- pt.mFlag = ra[i].mFlag;\r
- pt.dotDoesntMatchCR = ra[i].dotDoesntMatchCR;\r
- int r = ra[i].thePattern.matchInternal(pos,pt);\r
- if(r >= 0) {\r
- pn = i;\r
- return r;\r
- }\r
- }\r
- pn = -1;\r
- return -1;\r
- }\r
-}\r
+//
+// This software is now distributed according to
+// the Lesser Gnu Public License. Please see
+// http://www.gnu.org/copyleft/lesser.txt for
+// the details.
+// -- Happy Computing!
+//
+package com.stevesoft.pat;
+
+/**
+ * This class is used to implement the Transformer
+ *
+ * @see com.stevesoft.pat.Transform
+ */
+class TransPat extends Pattern
+{
+ Regex[] ra = new Regex[10];
+
+ int ra_len = 0;
+
+ int pn = -1;
+
+ public String toString()
+ {
+ return "(?#TransPat)";
+ }
+
+ TransPat()
+ {
+ }
+
+ int lastMatchedTo = -1;
+
+ public int matchInternal(int pos, Pthings pt)
+ {
+ for (int i = 0; i < ra_len; i++)
+ {
+ pt.ignoreCase = ra[i].ignoreCase;
+ pt.mFlag = ra[i].mFlag;
+ pt.dotDoesntMatchCR = Regex.dotDoesntMatchCR;
+ int r = ra[i].thePattern.matchInternal(pos, pt);
+ if (r >= 0)
+ {
+ pn = i;
+ return r;
+ }
+ }
+ pn = -1;
+ return -1;
+ }
+}