use of org.gluu.oxtrust.service.antlr.scimFilter.antlr4.ScimFilterLexer in project oxTrust by GluuFederation.
the class ScimFilterParserService method getParser.
private ScimFilterParser getParser(String filter) throws Exception {
log.info(" getParser() ");
// Get lexer
ANTLRInputStream input = new ANTLRInputStream(filter);
ScimFilterLexer lexer = new ScimFilterLexer(input);
// Get list of matched tokens
CommonTokenStream tokens = new CommonTokenStream(lexer);
// Pass tokens to the parser
ScimFilterParser parser = new ScimFilterParser(tokens);
parser.setBuildParseTree(true);
parser.setTrimParseTree(true);
parser.setProfile(true);
parser.removeErrorListeners();
parser.setErrorHandler(new ScimFilterErrorHandler());
return parser;
}
Aggregations