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
10 /** See the example file
\r
11 <a href="http://javaregex.com/code/trans3.java.html">trans3.java</a> for
\r
12 further examples of how this is used. You will probably not
\r
13 want to call it directly. */
\r
14 public class PushRule extends SpecialRule {
\r
16 public PushRule(PushRule p) { NewRule = p.NewRule; }
\r
17 public PushRule(String nm,Regex rr) { name=nm; NewRule = rr; }
\r
18 public PushRule(String nm,Transformer tr) { name = nm; NewRule = tr.rp; }
\r
19 public Object clone1() { return new PushRule(this); }
\r
20 public String String1() { return "${+"+name+"}"; }
\r
21 public void apply(StringBufferLike sbl,RegRes rr) {}
\r