use of org.talend.components.salesforce.soql.parser.SoqlLexer in project components by Talend.
the class SoqlQuery method init.
/**
* init method parses input <code>queryString</code> and stores is as tree.
* Should be invoked right after
* {@link org.talend.components.salesforce.soql.SoqlQuery#getInstance()} method
*
* @param queryString SOQL query
*/
public void init(String queryString) {
ANTLRInputStream is = new ANTLRInputStream(queryString);
SoqlLexer lexer = new SoqlLexer(is);
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
SoqlParser parser = new SoqlParser(tokenStream);
queryTree = parser.query();
fieldDescriptions = new ArrayList<>();
FieldRetrieverListener listener = new FieldRetrieverListener();
ParseTreeWalker.DEFAULT.walk(listener, queryTree);
}
Aggregations