Class |
Line # |
Actions |
|||
---|---|---|---|---|---|
BackG | 13 | 5 | 7 |
1 | // | |
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 | |
5 | // the details. | |
6 | // -- Happy Computing! | |
7 | // | |
8 | package com.stevesoft.pat; | |
9 | ||
10 | import java.util.Hashtable; | |
11 | ||
12 | /** This class represents the \G pattern element. */ | |
13 | class BackG extends Pattern | |
14 | { | |
15 | char c, altc, altc2; | |
16 | ||
17 | int mask; | |
18 | ||
19 | 0 | public BackG() |
20 | { | |
21 | } | |
22 | ||
23 | 0 | public int matchInternal(int pos, Pthings pt) |
24 | { | |
25 | 0 | return pos == pt.lastPos ? nextMatch(pos, pt) : -1; |
26 | } | |
27 | ||
28 | 0 | public String toString() |
29 | { | |
30 | 0 | return "\\G" + nextString(); |
31 | } | |
32 | ||
33 | 0 | public patInt minChars() |
34 | { | |
35 | 0 | return new patInt(1); |
36 | } | |
37 | ||
38 | 0 | public patInt maxChars() |
39 | { | |
40 | 0 | return new patInt(1); |
41 | } | |
42 | ||
43 | 0 | Pattern clone1(Hashtable h) |
44 | { | |
45 | 0 | return new BackG(); |
46 | } | |
47 | } |