Search in sources :

Example 1 with WindowLexer

use of org.apache.metron.profiler.client.window.generated.WindowLexer in project metron by apache.

the class WindowProcessor method createTokenStream.

private static TokenStream createTokenStream(String statement) {
    if (statement == null || isEmpty(statement.trim())) {
        return null;
    }
    statement = statement.trim();
    ANTLRInputStream input = new ANTLRInputStream(statement);
    WindowLexer lexer = new WindowLexer(input);
    lexer.removeErrorListeners();
    lexer.addErrorListener(new ErrorListener());
    TokenStream tokens = new CommonTokenStream(lexer);
    return tokens;
}
Also used : ErrorListener(org.apache.metron.stellar.dsl.ErrorListener) WindowLexer(org.apache.metron.profiler.client.window.generated.WindowLexer)

Aggregations

WindowLexer (org.apache.metron.profiler.client.window.generated.WindowLexer)1 ErrorListener (org.apache.metron.stellar.dsl.ErrorListener)1