Clover icon

Coverage Report

  1. Project Clover database Fri Dec 6 2024 13:47:14 GMT
  2. Package com.stevesoft.pat

File TransPat.java

 

Coverage histogram

../../../img/srcFileCovDistChart0.png
60% of files have more coverage

Code metrics

4
11
3
1
51
32
5
0.45
3.67
3
1.67

Classes

Class Line # Actions
TransPat 15 11 5
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

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    /**
11    * This class is used to implement the Transformer
12    *
13    * @see com.stevesoft.pat.Transform
14    */
 
15    class TransPat extends Pattern
16    {
17    Regex[] ra = new Regex[10];
18   
19    int ra_len = 0;
20   
21    int pn = -1;
22   
 
23  0 toggle public String toString()
24    {
25  0 return "(?#TransPat)";
26    }
27   
 
28  0 toggle TransPat()
29    {
30    }
31   
32    int lastMatchedTo = -1;
33   
 
34  0 toggle public int matchInternal(int pos, Pthings pt)
35    {
36  0 for (int i = 0; i < ra_len; i++)
37    {
38  0 pt.ignoreCase = ra[i].ignoreCase;
39  0 pt.mFlag = ra[i].mFlag;
40  0 pt.dotDoesntMatchCR = Regex.dotDoesntMatchCR;
41  0 int r = ra[i].thePattern.matchInternal(pos, pt);
42  0 if (r >= 0)
43    {
44  0 pn = i;
45  0 return r;
46    }
47    }
48  0 pn = -1;
49  0 return -1;
50    }
51    }