use of org.alfresco.rest.antlr.WhereClauseLexer in project alfresco-remote-api by Alfresco.
the class WhereCompiler method compileSelectClause.
public static CommonTree compileSelectClause(String selectParam) throws RecognitionException {
// lexer splits input into tokens
ANTLRStringStream input = new ANTLRStringStream(selectParam);
TokenStream tokens = new CommonTokenStream(new WhereClauseLexer(input));
// parser generates abstract syntax tree
WhereClauseParser parser = new WhereClauseParser(tokens);
WhereClauseParser.selectClause_return ret = parser.selectClause();
// acquire parse result
CommonTree ast = (CommonTree) ret.getTree();
if (logger.isDebugEnabled())
print(ast, 0);
return ast;
}
use of org.alfresco.rest.antlr.WhereClauseLexer in project alfresco-remote-api by Alfresco.
the class WhereCompiler method compileWhereClause.
public static CommonTree compileWhereClause(String expression) throws RecognitionException {
// lexer splits input into tokens
ANTLRStringStream input = new ANTLRStringStream(expression);
TokenStream tokens = new CommonTokenStream(new WhereClauseLexer(input));
// parser generates abstract syntax tree
WhereClauseParser parser = new WhereClauseParser(tokens);
WhereClauseParser.whereclause_return ret = parser.whereclause();
// acquire parse result
CommonTree ast = (CommonTree) ret.getTree();
if (logger.isDebugEnabled())
print(ast, 0);
return ast;
}
Aggregations