JAL-1807 still testing
[jalviewjs.git] / unused / com / stevesoft / pat / Boundary.java
index 566b20e..a3bc020 100644 (file)
@@ -1,89 +1,89 @@
-//
-// 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.*;
-
-/** This class implements the word boundary pattern element: \b. */
-class Boundary extends Pattern
-{
-  public String toString()
-  {
-    return "\\b" + nextString();
-  }
-
-  boolean isAChar(char c)
-  {
-    if (c >= 'a' && c <= 'z')
-    {
-      return true;
-    }
-    if (c >= 'A' && c <= 'Z')
-    {
-      return true;
-    }
-    if (c >= '0' && c <= '9')
-    {
-      return true;
-    }
-    if (c == '_')
-    {
-      return true;
-    }
-    return false;
-  }
-
-  boolean matchLeft(int pos, Pthings pt)
-  {
-    if (pos <= 0)
-    {
-      return true;
-    }
-    if (isAChar(pt.src.charAt(pos)) && isAChar(pt.src.charAt(pos - 1)))
-    {
-      return false;
-    }
-    return true;
-  }
-
-  boolean matchRight(int pos, Pthings pt)
-  {
-    if (pos < 0)
-    {
-      return false;
-    }
-    if (pos + 1 >= pt.src.length())
-    {
-      return true;
-    }
-    if (isAChar(pt.src.charAt(pos)) && isAChar(pt.src.charAt(pos + 1)))
-    {
-      return false;
-    }
-    return true;
-  }
-
-  public int matchInternal(int pos, Pthings pt)
-  {
-    if (matchRight(pos - 1, pt) || matchLeft(pos, pt))
-    {
-      return nextMatch(pos, pt);
-    }
-    return -1;
-  }
-
-  public patInt maxChars()
-  {
-    return new patInt(0);
-  }
-
-  public Pattern clone1(Hashtable h)
-  {
-    return new Boundary();
-  }
-};
+//\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 implements the word boundary pattern element: \b. */\r
+class Boundary extends Pattern\r
+{\r
+  public String toString()\r
+  {\r
+    return "\\b" + nextString();\r
+  }\r
+\r
+  boolean isAChar(char c)\r
+  {\r
+    if (c >= 'a' && c <= 'z')\r
+    {\r
+      return true;\r
+    }\r
+    if (c >= 'A' && c <= 'Z')\r
+    {\r
+      return true;\r
+    }\r
+    if (c >= '0' && c <= '9')\r
+    {\r
+      return true;\r
+    }\r
+    if (c == '_')\r
+    {\r
+      return true;\r
+    }\r
+    return false;\r
+  }\r
+\r
+  boolean matchLeft(int pos, Pthings pt)\r
+  {\r
+    if (pos <= 0)\r
+    {\r
+      return true;\r
+    }\r
+    if (isAChar(pt.src.charAt(pos)) && isAChar(pt.src.charAt(pos - 1)))\r
+    {\r
+      return false;\r
+    }\r
+    return true;\r
+  }\r
+\r
+  boolean matchRight(int pos, Pthings pt)\r
+  {\r
+    if (pos < 0)\r
+    {\r
+      return false;\r
+    }\r
+    if (pos + 1 >= pt.src.length())\r
+    {\r
+      return true;\r
+    }\r
+    if (isAChar(pt.src.charAt(pos)) && isAChar(pt.src.charAt(pos + 1)))\r
+    {\r
+      return false;\r
+    }\r
+    return true;\r
+  }\r
+\r
+  public int matchInternal(int pos, Pthings pt)\r
+  {\r
+    if (matchRight(pos - 1, pt) || matchLeft(pos, pt))\r
+    {\r
+      return nextMatch(pos, pt);\r
+    }\r
+    return -1;\r
+  }\r
+\r
+  public patInt maxChars()\r
+  {\r
+    return new patInt(0);\r
+  }\r
+\r
+  public Pattern clone1(Hashtable h)\r
+  {\r
+    return new Boundary();\r
+  }\r
+};\r