2 // This software is now distributed according to
3 // the Lesser Gnu Public License. Please see
4 // http://www.gnu.org/copyleft/lesser.txt for
8 package com.stevesoft.pat;
10 import java.util.Hashtable;
13 * This class is needed internally to make backtracking work correctly in
14 * user-defined patterns.
16 class CustomEndpoint extends Pattern
20 CustomEndpoint(Custom cm)
25 public int matchInternal(int pos, Pthings pt)
27 int npos = c.v.validate(pt.src, c.start, pos);
30 return nextMatch(npos, pt);
35 public String toString()
40 Pattern clone1(Hashtable h)
42 return new CustomEndpoint((Custom) c.clone(h));