JAL-1807 still testing
[jalviewjs.git] / unused / com / stevesoft / pat / Custom.java
index 61879ac..18cba7d 100644 (file)
@@ -1,64 +1,64 @@
-//
-// 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;
-
-import java.util.*;
-
-/**
- * Simple custom patterns. See <a
- * href="http://javaregex.com/code/deriv2.java.html">deriv2.java</a> and <a
- * href="http://javaregex.com/code/deriv3.java.html">deriv3.java</a> in the
- * test directory.
- * 
- * @see com.stevesoft.pat.CustomEndpoint
- */
-class Custom extends PatternSub
-{
-  String select;
-
-  Validator v;
-
-  int start;
-
-  Custom(String s)
-  {
-    select = s;
-    v = (Validator) Regex.validators.get(s);
-  }
-
-  public int matchInternal(int pos, Pthings pt)
-  {
-    start = pos;
-    return sub.matchInternal(pos, pt);
-  }
-
-  public String toString()
-  {
-    String a = v.argsave == null ? "" : ":" + v.argsave;
-    return "(??" + select + a + ")" + nextString();
-  }
-
-  public patInt minChars()
-  {
-    return v.minChars();
-  }
-
-  public patInt maxChars()
-  {
-    return v.maxChars();
-  }
-
-  Pattern clone1(Hashtable h)
-  {
-    Custom c = new Custom(select);
-    h.put(c, c);
-    h.put(this, c);
-    c.sub = sub.clone(h);
-    return c;
-  }
-}
+//\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
+/**\r
+ * Simple custom patterns. See <a\r
+ * href="http://javaregex.com/code/deriv2.java.html">deriv2.java</a> and <a\r
+ * href="http://javaregex.com/code/deriv3.java.html">deriv3.java</a> in the\r
+ * test directory.\r
+ * \r
+ * @see com.stevesoft.pat.CustomEndpoint\r
+ */\r
+class Custom extends PatternSub\r
+{\r
+  String select;\r
+\r
+  Validator v;\r
+\r
+  int start;\r
+\r
+  Custom(String s)\r
+  {\r
+    select = s;\r
+    v = (Validator) Regex.validators.get(s);\r
+  }\r
+\r
+  public int matchInternal(int pos, Pthings pt)\r
+  {\r
+    start = pos;\r
+    return sub.matchInternal(pos, pt);\r
+  }\r
+\r
+  public String toString()\r
+  {\r
+    String a = v.argsave == null ? "" : ":" + v.argsave;\r
+    return "(??" + select + a + ")" + nextString();\r
+  }\r
+\r
+  public patInt minChars()\r
+  {\r
+    return v.minChars();\r
+  }\r
+\r
+  public patInt maxChars()\r
+  {\r
+    return v.maxChars();\r
+  }\r
+\r
+  Pattern clone1(Hashtable h)\r
+  {\r
+    Custom c = new Custom(select);\r
+    h.put(c, c);\r
+    h.put(this, c);\r
+    c.sub = sub.clone(h);\r
+    return c;\r
+  }\r
+}\r