Clover icon

Coverage Report

  1. Project Clover database Thu Nov 28 2024 11:45:30 GMT
  2. Package com.stevesoft.pat

File Rthings.java

 

Coverage histogram

../../../img/srcFileCovDistChart9.png
13% of files have more coverage

Code metrics

2
9
2
1
68
30
3
0.33
4.5
2
1.5

Classes

Class Line # Actions
Rthings 18 9 3
0.8461538684.6%
 

Contributing tests

This file is covered by 98 tests. .

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    Shareware: package pat
12    <a href="copyright.html">Copyright 2001, Steven R. Brandt</a>
13    */
14    /**
15    * This class only exists to store data needed during the compilation of a
16    * regular expression.
17    */
 
18    public class Rthings
19    {
20    /**
21    * The numeric identity of the next () to be encountered while compiling the
22    * pattern.
23    */
24    public int val = Regex.BackRefOffset;
25   
26    /**
27    * Needed in case (?i) is encountered, to pass back the message that
28    * ignoreCase should be set.
29    */
30    public boolean ignoreCase;
31   
32    /**
33    * Needed in case (?Q) is encountered, to pass back the message that
34    * dontMatchInQuotes should be set.
35    */
36    public boolean dontMatchInQuotes;
37   
38    public boolean optimizeMe = false;
39   
40    public boolean noBackRefs = false;
41   
42    public int parenLevel = 0;
43   
44    boolean gFlag = false, mFlag = false, sFlag = false;
45   
46    Pattern p;
47   
48    Or o;
49   
 
50  2226 toggle Rthings(Regex r)
51    {
52  2226 ignoreCase = r.ignoreCase;
53  2226 dontMatchInQuotes = r.dontMatchInQuotes;
54    }
55   
 
56  2225 toggle void set(Regex r)
57    {
58  2225 r.gFlag = gFlag;
59  2225 r.mFlag = mFlag;
60  2225 r.sFlag = sFlag;
61  2225 r.ignoreCase = ignoreCase;
62  2225 r.dontMatchInQuotes = dontMatchInQuotes;
63  2225 if (optimizeMe)
64    {
65  0 r.optimize();
66    }
67    }
68    };