X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fcom%2Fstevesoft%2Fpat%2FEnd.java;h=06aadda912f21bf18a4349f31667d7e4f71b3a9d;hb=4b2be7cd8c14e67cc347609199e25c7f09fda988;hp=75e5acfd57d0a748a88ceeaba8d364a86cf39acf;hpb=c40cf903f740a72ab63dd1abc10fa33450ce660d;p=jalview.git diff --git a/src/com/stevesoft/pat/End.java b/src/com/stevesoft/pat/End.java index 75e5acf..06aadda 100755 --- a/src/com/stevesoft/pat/End.java +++ b/src/com/stevesoft/pat/End.java @@ -1,42 +1,71 @@ -// -// 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.Hashtable; - -//class AddToEnd extends RegSyntax {}; - -/** Compiles the '$' or the '\Z' Pattern. It is - an error to have further Pattern elements after - '\Z'. It is the end of the String. */ -class End extends Pattern { - boolean retIsEnd; - End(boolean b) { retIsEnd = b; } - public int matchInternal(int pos,Pthings pt) { - if(retIsEnd && pt.mFlag && pos < pt.src.length()) { - if(pt.src.charAt(pos)=='\n') { - return nextMatch(pos,pt); - } - } - if(pt.src.length() == pos) - return nextMatch(pos,pt); - else if(pos