Class | Line # | Actions | |||
---|---|---|---|---|---|
CodeRule | 11 | 3 | 4 |
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 | /** Implements the rules for \U, \L, \E, \Q in substitutions. */ | |
11 | public final class CodeRule extends SpecialRule | |
12 | { | |
13 | char c = 'E'; | |
14 | ||
15 | 0 | public CodeRule() |
16 | { | |
17 | } | |
18 | ||
19 | 0 | public CodeRule(char c) |
20 | { | |
21 | 0 | this.c = c; |
22 | } | |
23 | ||
24 | 0 | public void apply(StringBufferLike sb, RegRes res) |
25 | { | |
26 | 0 | sb.setMode(c); |
27 | } | |
28 | ||
29 | 0 | public String toString1() |
30 | { | |
31 | 0 | return "\\" + c; |
32 | } | |
33 | } |