use of org.apache.sling.scripting.sightly.impl.parser.expr.generated.SightlyLexer in project sling by apache.
the class ExpressionParser method createParser.
private SightlyParser createParser(String string) {
SightlyLexer lexer = new SightlyLexer(new ANTLRInputStream(string));
lexer.removeErrorListeners();
lexer.addErrorListener(new SightlyParserErrorListener());
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
SightlyParser parser = new SightlyParser(tokenStream);
parser.removeErrorListeners();
parser.addErrorListener(new SightlyParserErrorListener());
return parser;
}
Aggregations