MCPcopy Create free account
hub / github.com/google/re2j / concat

Method concat

java/com/google/re2j/Parser.java:260–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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.

Callers 3

parseInternalMethod · 0.95
parseVerticalBarMethod · 0.95
parseRightParenMethod · 0.95

Calls 5

maybeConcatMethod · 0.95
popToPseudoMethod · 0.95
pushMethod · 0.95
newRegexpMethod · 0.95
collapseMethod · 0.95

Tested by

no test coverage detected