final PatternMatcherBuilder builder = new PatternMatcherBuilder();
executionSymbols.put(SYMBOL_PATTERN_VAR, new PatternMatcherBuilderVarSymbol(builder, topSymbolMap));
executionSymbols.put(SYMBOL_GUARDED_ACTION, new PatternMatcherBuilderBuilderGuardedActionSymbol(builder));
executionSymbols.put(SYMBOL_DEFAULT_ACTION, new PatternMatcherBuilderDefaultActionSymbol(builder));
pattern.execute(executionFrame);
<BUG>Preconditions.checkState(executionFrame.stack().isEmpty(), "Leftovers on pattern execution stack: %s", executionFrame.stack());
return builder.buildPattern();</BUG>
}
}
public static class MatchFailedException extends RuntimeException {

final PatternMatcherBuilder builder = new PatternMatcherBuilder();
executionSymbols.put(SYMBOL_PATTERN_VAR, new PatternMatcherBuilderVarSymbol(builder, topSymbolMap));
executionSymbols.put(SYMBOL_GUARDED_ACTION, new PatternMatcherBuilderBuilderGuardedActionSymbol(builder));
executionSymbols.put(SYMBOL_DEFAULT_ACTION, new PatternMatcherBuilderDefaultActionSymbol(builder));
pattern.execute(executionFrame);
executionFrame.stack().checkIsEmpty();
return builder.buildPattern();
}
}
public static class MatchFailedException extends RuntimeException {
