| 122 | |
| 123 | // This is visible for testing. |
| 124 | RE2(String expr) { |
| 125 | RE2 re2 = RE2.compile(expr); |
| 126 | // Copy everything. |
| 127 | this.expr = re2.expr; |
| 128 | this.prog = re2.prog; |
| 129 | this.cond = re2.cond; |
| 130 | this.numSubexp = re2.numSubexp; |
| 131 | this.longest = re2.longest; |
| 132 | this.prefix = re2.prefix; |
| 133 | this.prefixUTF8 = re2.prefixUTF8; |
| 134 | this.prefixComplete = re2.prefixComplete; |
| 135 | this.prefixRune = re2.prefixRune; |
| 136 | } |
| 137 | |
| 138 | private RE2(String expr, Prog prog, int numSubexp, boolean longest) { |
| 139 | this.expr = expr; |