use of org.ballerinalang.siddhi.query.compiler.internal.SiddhiQLBaseVisitorImpl in project ballerina by ballerina-lang.
the class SiddhiCompiler method parsePartition.
public static Partition parsePartition(String source) throws SiddhiParserException {
ANTLRInputStream input = new ANTLRInputStream(source);
SiddhiQLLexer lexer = new SiddhiQLLexer(input);
lexer.removeErrorListeners();
lexer.addErrorListener(SiddhiErrorListener.INSTANCE);
CommonTokenStream tokens = new CommonTokenStream(lexer);
SiddhiQLParser parser = new SiddhiQLParser(tokens);
parser.removeErrorListeners();
parser.addErrorListener(SiddhiErrorListener.INSTANCE);
ParseTree tree = parser.partition_final();
SiddhiQLVisitor eval = new SiddhiQLBaseVisitorImpl();
return (Partition) eval.visit(tree);
}
use of org.ballerinalang.siddhi.query.compiler.internal.SiddhiQLBaseVisitorImpl in project ballerina by ballerina-lang.
the class SiddhiCompiler method parseFunctionDefinition.
public static FunctionDefinition parseFunctionDefinition(String source) throws SiddhiParserException {
ANTLRInputStream input = new ANTLRInputStream(source);
SiddhiQLLexer lexer = new SiddhiQLLexer(input);
lexer.removeErrorListeners();
lexer.addErrorListener(SiddhiErrorListener.INSTANCE);
CommonTokenStream tokens = new CommonTokenStream(lexer);
SiddhiQLParser parser = new SiddhiQLParser(tokens);
parser.removeErrorListeners();
parser.addErrorListener(SiddhiErrorListener.INSTANCE);
ParseTree tree = parser.definition_function_final();
SiddhiQLVisitor eval = new SiddhiQLBaseVisitorImpl();
return (FunctionDefinition) eval.visit(tree);
}
use of org.ballerinalang.siddhi.query.compiler.internal.SiddhiQLBaseVisitorImpl in project ballerina by ballerina-lang.
the class SiddhiCompiler method parseAggregationDefinition.
public static AggregationDefinition parseAggregationDefinition(String source) throws SiddhiParserException {
ANTLRInputStream input = new ANTLRInputStream(source);
SiddhiQLLexer lexer = new SiddhiQLLexer(input);
lexer.removeErrorListeners();
lexer.addErrorListener(SiddhiErrorListener.INSTANCE);
CommonTokenStream tokens = new CommonTokenStream(lexer);
SiddhiQLParser parser = new SiddhiQLParser(tokens);
parser.removeErrorListeners();
parser.addErrorListener(SiddhiErrorListener.INSTANCE);
ParseTree tree = parser.definition_aggregation_final();
SiddhiQLVisitor eval = new SiddhiQLBaseVisitorImpl();
return (AggregationDefinition) eval.visit(tree);
}
use of org.ballerinalang.siddhi.query.compiler.internal.SiddhiQLBaseVisitorImpl in project ballerina by ballerina-lang.
the class SiddhiCompiler method parseStreamDefinition.
public static StreamDefinition parseStreamDefinition(String source) {
ANTLRInputStream input = new ANTLRInputStream(source);
SiddhiQLLexer lexer = new SiddhiQLLexer(input);
lexer.removeErrorListeners();
lexer.addErrorListener(SiddhiErrorListener.INSTANCE);
CommonTokenStream tokens = new CommonTokenStream(lexer);
SiddhiQLParser parser = new SiddhiQLParser(tokens);
parser.removeErrorListeners();
parser.addErrorListener(SiddhiErrorListener.INSTANCE);
ParseTree tree = parser.definition_stream_final();
SiddhiQLVisitor eval = new SiddhiQLBaseVisitorImpl();
return (StreamDefinition) eval.visit(tree);
}
Aggregations