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