public static Processor generateProcessor(StreamHandler streamHandler, MetaComplexEvent metaEvent,
                                              List<VariableExpressionExecutor> variableExpressionExecutors,
                                              Map<String, Table> tableMap,
                                              boolean supportsBatchProcessing, boolean outputExpectsExpiredEvents,
                                              boolean findToBeExecuted, SiddhiQueryContext siddhiQueryContext) {
        Expression[] parameters = streamHandler.getParameters();
        MetaStreamEvent metaStreamEvent;
        int stateIndex = SiddhiConstants.UNKNOWN_STATE;
        if (metaEvent instanceof MetaStateEvent) {
            stateIndex = ((MetaStateEvent) metaEvent).getStreamEventCount() - 1;
            metaStreamEvent = ((MetaStateEvent) metaEvent).getMetaStreamEvent(stateIndex);
        } else {
            metaStreamEvent = (MetaStreamEvent) metaEvent;
        }

        if (streamHandler instanceof Window) {
            metaStreamEvent.initializeOnAfterWindowData();
        }

        ExpressionExecutor[] attributeExpressionExecutors;
        if (parameters != null) {
            if (parameters.length > 0) {
                attributeExpressionExecutors = new ExpressionExecutor[parameters.length];
                for (int i = 0, parametersLength = parameters.length; i < parametersLength; i++) {
                    attributeExpressionExecutors[i] = ExpressionParser.parseExpression(parameters[i], metaEvent,
                            stateIndex, tableMap, variableExpressionExecutors, false,
                            SiddhiConstants.CURRENT, ProcessingMode.BATCH, false,
                            siddhiQueryContext);
                }
            } else {
                List<Attribute> attributeList = metaStreamEvent.getLastInputDefinition().getAttributeList();
                int parameterSize = attributeList.size();
                attributeExpressionExecutors = new ExpressionExecutor[parameterSize];
                for (int i = 0; i < parameterSize; i++) {
                    attributeExpressionExecutors[i] = ExpressionParser.parseExpression(new Variable(attributeList.get
                                    (i).getName()), metaEvent, stateIndex, tableMap, variableExpressionExecutors,
                            false, SiddhiConstants.CURRENT, ProcessingMode.BATCH,
                            false, siddhiQueryContext);
                }
            }
        } else {
            attributeExpressionExecutors = new ExpressionExecutor[0];
        }

        ConfigReader configReader;
        if (streamHandler instanceof Filter) {
            return new FilterProcessor(attributeExpressionExecutors[0]);

        } else if (streamHandler instanceof Window) {
            WindowProcessor windowProcessor = (WindowProcessor) SiddhiClassLoader.loadExtensionImplementation(
                    (Extension) streamHandler,
                    WindowProcessorExtensionHolder.getInstance(siddhiQueryContext.getSiddhiAppContext()));
            configReader = siddhiQueryContext.getSiddhiContext().getConfigManager().
                    generateConfigReader(((Window) streamHandler).getNamespace(),
                            ((Window) streamHandler).getName());
            windowProcessor.initProcessor(metaStreamEvent, attributeExpressionExecutors,
                    configReader, outputExpectsExpiredEvents, findToBeExecuted, false, streamHandler, siddhiQueryContext);
            return windowProcessor;

        } else if (streamHandler instanceof StreamFunction) {
            AbstractStreamProcessor abstractStreamProcessor;
            configReader = siddhiQueryContext.getSiddhiContext().getConfigManager().
                    generateConfigReader(((StreamFunction) streamHandler).getNamespace(),
                            ((StreamFunction) streamHandler).getName());
            if (supportsBatchProcessing) {
                try {
                    abstractStreamProcessor = (StreamProcessor) SiddhiClassLoader.loadExtensionImplementation(
                            (Extension) streamHandler,
                            StreamProcessorExtensionHolder.getInstance(siddhiQueryContext.getSiddhiAppContext()));
                    abstractStreamProcessor.initProcessor(metaStreamEvent,
                            attributeExpressionExecutors, configReader,
                            outputExpectsExpiredEvents, false, false, streamHandler, siddhiQueryContext);
                    return abstractStreamProcessor;
                } catch (SiddhiAppCreationException e) {
                    if (!e.isClassLoadingIssue()) {
                        ExceptionUtil.populateQueryContext(e, streamHandler, siddhiQueryContext.getSiddhiAppContext(),
                                siddhiQueryContext);
                        throw e;
                    }
                }
            }
            abstractStreamProcessor = (StreamFunctionProcessor) SiddhiClassLoader.loadExtensionImplementation(
                    (Extension) streamHandler,
                    StreamFunctionProcessorExtensionHolder.getInstance(siddhiQueryContext.getSiddhiAppContext()));
            abstractStreamProcessor.initProcessor(metaStreamEvent, attributeExpressionExecutors,
                    configReader, outputExpectsExpiredEvents, false, false, streamHandler, siddhiQueryContext);
            return abstractStreamProcessor;
        } else {
            throw new SiddhiAppCreationException(streamHandler.getClass().getName() + " is not supported",
                    streamHandler.getQueryContextStartIndex(), streamHandler.getQueryContextEndIndex());
        }
    }
Parse single InputStream and return SingleStreamRuntime

@param inputStream                 single input stream to be parsed
@param variableExpressionExecutors List to hold VariableExpressionExecutors to update after query parsing
@param streamDefinitionMap         Stream Definition Map
@param tableDefinitionMap          Table Definition Map
@param windowDefinitionMap         window definition map
@param aggregationDefinitionMap    aggregation definition map
@param tableMap                    Table Map
@param metaComplexEvent            MetaComplexEvent
@param processStreamReceiver       ProcessStreamReceiver
@param supportsBatchProcessing     supports batch processing
@param outputExpectsExpiredEvents  is expired events sent as output
@param findToBeExecuted            find will be executed in the steam stores
@param multiValue                  event has the possibility to produce multiple values
@param siddhiQueryContext          @return SingleStreamRuntime
modules/siddhi-core/src/main/java/io/siddhi/core/util/parser/SingleInputStreamParser.java