try {
DRLLexer lexer = getDRLLexer(new ANTLRStringStream(text), languageLevel);
CommonTokenStream input = new CommonTokenStream( lexer );
RecognizerSharedState state = new RecognizerSharedState();
helper = new ParserHelper( input, state, languageLevel );
DRLExpressions parser = getDRLExpressions( input, state, helper, languageLevel );
parser.setBuildDescr( true );
parser.setLeftMostExpr( null ); // setting initial value just in case
BaseDescr expr = parser.conditionalOrExpression();
if ( expr != null && !parser.hasErrors() ) {
constraint = ConstraintConnectiveDescr.newAnd();
constraint.addOrMerge( expr );
}
} catch ( RecognitionException e ) {
helper.reportError( e );