()
| 258 | // concat replaces the top of the stack (above the topmost '|' or '(') with |
| 259 | // its concatenation. |
| 260 | private Regexp concat() { |
| 261 | maybeConcat(-1, 0); |
| 262 | |
| 263 | // Scan down to find pseudo-operator | or (. |
| 264 | Regexp[] subs = popToPseudo(); |
| 265 | |
| 266 | // Empty concatenation is special case. |
| 267 | if (subs.length == 0) { |
| 268 | return push(newRegexp(Regexp.Op.EMPTY_MATCH)); |
| 269 | } |
| 270 | |
| 271 | return push(collapse(subs, Regexp.Op.CONCAT)); |
| 272 | } |
| 273 | |
| 274 | // alternate replaces the top of the stack (above the topmost '(') with its |
| 275 | // alternation. |
no test coverage detected