final PatternDescr patternDescr = (PatternDescr) parser.getCurrent();
final Object parent = parser.getParent();
if ( parent instanceof PatternDestinationDescr ) {
final PatternDestinationDescr parentDescr = (PatternDestinationDescr) parent;
parentDescr.setInputPattern( patternDescr );
} else {
final ConditionalElementDescr parentDescr = (ConditionalElementDescr) parent;
parentDescr.addDescr( patternDescr );
}
return patternDescr;
}