@SuppressWarnings("unchecked")
private ConstraintConnectiveDescr parseExpression( final RuleBuildContext context,
final PatternDescr patternDescr,
final BaseDescr original,
final String expression ) {
DrlExprParser parser = new DrlExprParser();
ConstraintConnectiveDescr result = parser.parse( expression );
result.copyLocation( original );
if ( result == null || parser.hasErrors() ) {
for ( DroolsParserException error : parser.getErrors() ) {
context.getErrors().add( new DescrBuildError( context.getParentDescr(),
patternDescr,
null,
"Unable to parser pattern expression:\n" + error.getMessage() ) );
}