//lexer splits input into tokens
ANTLRStringStream input = new ANTLRStringStream(expression);
TokenStream tokens = new CommonTokenStream(new BooleanExprLexer(input));
//parser generates abstract syntax tree
BooleanExprParser parser = new BooleanExprParser(tokens);
BooleanExprParser.expression_return ret = parser.expression();
//acquire parse result
CommonTree ast = (CommonTree) ret.getTree();
return parse(ast, mapper);
} catch (RecognitionException e) {