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
9 import java.util.Hashtable;
\r
11 /** This pattern matches nothing -- it is found in patterns
\r
12 * like (hello|world|) where a zero-length subelement occurs.
\r
14 class NullPattern extends Pattern {
\r
15 public String toString() { return nextString(); }
\r
16 public int matchInternal(int p,Pthings pt) {
\r
17 return nextMatch(p,pt);
\r
19 public patInt maxChars() { return new patInt(0); }
\r
20 Pattern clone1(Hashtable h) { return new NullPattern(); }
\r