All Downloads are FREE. Search and download functionalities are using the official Maven repository.

design.unstructured.stix.evaluator.grammar.StixPatternVisitor Maven / Gradle / Ivy

Go to download

A Cyber Threat Intelligence (CTI) STIX v2.1 pattern compiler and expression evaluator

There is a newer version: 1.0.0-M3
Show newest version

/*
 * stix-pattern-evaluator
 * Copyright (C) 2020 - Christopher Carver
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package design.unstructured.stix.evaluator.grammar;

import org.antlr.v4.runtime.tree.ParseTreeVisitor;

/**
 * This interface defines a complete generic visitor for a parse tree produced
 * by {@link StixPatternParser}.
 *
 * @param  The return type of the visit operation. Use {@link Void} for
 *            operations with no return type.
 */
public interface StixPatternVisitor extends ParseTreeVisitor {

    /**
     * Visit a parse tree produced by {@link StixPatternParser#pattern}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPattern(StixPatternParser.PatternContext ctx);

    /**
     * Visit a parse tree produced by
     * {@link StixPatternParser#observationExpressions}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitObservationExpressions(StixPatternParser.ObservationExpressionsContext ctx);

    /**
     * Visit a parse tree produced by
     * {@link StixPatternParser#observationExpressionOr}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitObservationExpressionOr(StixPatternParser.ObservationExpressionOrContext ctx);

    /**
     * Visit a parse tree produced by
     * {@link StixPatternParser#observationExpressionAnd}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitObservationExpressionAnd(StixPatternParser.ObservationExpressionAndContext ctx);

    /**
     * Visit a parse tree produced by the {@code observationExpressionRepeated}
     * labeled alternative in {@link StixPatternParser#observationExpression}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitObservationExpressionRepeated(StixPatternParser.ObservationExpressionRepeatedContext ctx);

    /**
     * Visit a parse tree produced by the {@code observationExpressionSimple}
     * labeled alternative in {@link StixPatternParser#observationExpression}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitObservationExpressionSimple(StixPatternParser.ObservationExpressionSimpleContext ctx);

    /**
     * Visit a parse tree produced by the {@code observationExpressionCompound}
     * labeled alternative in {@link StixPatternParser#observationExpression}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitObservationExpressionCompound(StixPatternParser.ObservationExpressionCompoundContext ctx);

    /**
     * Visit a parse tree produced by the {@code observationExpressionWithin}
     * labeled alternative in {@link StixPatternParser#observationExpression}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitObservationExpressionWithin(StixPatternParser.ObservationExpressionWithinContext ctx);

    /**
     * Visit a parse tree produced by the {@code observationExpressionStartStop}
     * labeled alternative in {@link StixPatternParser#observationExpression}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitObservationExpressionStartStop(StixPatternParser.ObservationExpressionStartStopContext ctx);

    /**
     * Visit a parse tree produced by the {@code comparisonExpressionAnd_} labeled
     * alternative in {@link StixPatternParser#comparisonExpression}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitComparisonExpressionAnd_(StixPatternParser.ComparisonExpressionAnd_Context ctx);

    /**
     * Visit a parse tree produced by the {@code comparisonExpressionOred} labeled
     * alternative in {@link StixPatternParser#comparisonExpression}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitComparisonExpressionOred(StixPatternParser.ComparisonExpressionOredContext ctx);

    /**
     * Visit a parse tree produced by the {@code comparisonExpressionAndPropTest}
     * labeled alternative in {@link StixPatternParser#comparisonExpressionAnd}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitComparisonExpressionAndPropTest(StixPatternParser.ComparisonExpressionAndPropTestContext ctx);

    /**
     * Visit a parse tree produced by the {@code comparisonExpressionAnded} labeled
     * alternative in {@link StixPatternParser#comparisonExpressionAnd}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitComparisonExpressionAnded(StixPatternParser.ComparisonExpressionAndedContext ctx);

    /**
     * Visit a parse tree produced by the {@code propTestEqual} labeled alternative
     * in {@link StixPatternParser#propTest}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPropTestEqual(StixPatternParser.PropTestEqualContext ctx);

    /**
     * Visit a parse tree produced by the {@code propTestOrder} labeled alternative
     * in {@link StixPatternParser#propTest}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPropTestOrder(StixPatternParser.PropTestOrderContext ctx);

    /**
     * Visit a parse tree produced by the {@code propTestSet} labeled alternative in
     * {@link StixPatternParser#propTest}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPropTestSet(StixPatternParser.PropTestSetContext ctx);

    /**
     * Visit a parse tree produced by the {@code propTestLike} labeled alternative
     * in {@link StixPatternParser#propTest}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPropTestLike(StixPatternParser.PropTestLikeContext ctx);

    /**
     * Visit a parse tree produced by the {@code propTestRegex} labeled alternative
     * in {@link StixPatternParser#propTest}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPropTestRegex(StixPatternParser.PropTestRegexContext ctx);

    /**
     * Visit a parse tree produced by the {@code propTestIsSubset} labeled
     * alternative in {@link StixPatternParser#propTest}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPropTestIsSubset(StixPatternParser.PropTestIsSubsetContext ctx);

    /**
     * Visit a parse tree produced by the {@code propTestIsSuperset} labeled
     * alternative in {@link StixPatternParser#propTest}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPropTestIsSuperset(StixPatternParser.PropTestIsSupersetContext ctx);

    /**
     * Visit a parse tree produced by the {@code propTestParen} labeled alternative
     * in {@link StixPatternParser#propTest}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPropTestParen(StixPatternParser.PropTestParenContext ctx);

    /**
     * Visit a parse tree produced by the {@code propTestExists} labeled alternative
     * in {@link StixPatternParser#propTest}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPropTestExists(StixPatternParser.PropTestExistsContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#orderingComparator}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitOrderingComparator(StixPatternParser.OrderingComparatorContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#stringLiteral}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitStringLiteral(StixPatternParser.StringLiteralContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#startStopQualifier}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitStartStopQualifier(StixPatternParser.StartStopQualifierContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#withinQualifier}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitWithinQualifier(StixPatternParser.WithinQualifierContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#repeatedQualifier}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitRepeatedQualifier(StixPatternParser.RepeatedQualifierContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#objectPath}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitObjectPath(StixPatternParser.ObjectPathContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#objectType}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitObjectType(StixPatternParser.ObjectTypeContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#firstPathComponent}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitFirstPathComponent(StixPatternParser.FirstPathComponentContext ctx);

    /**
     * Visit a parse tree produced by the {@code indexPathStep} labeled alternative
     * in {@link StixPatternParser#objectPathComponent}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitIndexPathStep(StixPatternParser.IndexPathStepContext ctx);

    /**
     * Visit a parse tree produced by the {@code pathStep} labeled alternative in
     * {@link StixPatternParser#objectPathComponent}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPathStep(StixPatternParser.PathStepContext ctx);

    /**
     * Visit a parse tree produced by the {@code keyPathStep} labeled alternative in
     * {@link StixPatternParser#objectPathComponent}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitKeyPathStep(StixPatternParser.KeyPathStepContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#setLiteral}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitSetLiteral(StixPatternParser.SetLiteralContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#primitiveLiteral}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitPrimitiveLiteral(StixPatternParser.PrimitiveLiteralContext ctx);

    /**
     * Visit a parse tree produced by {@link StixPatternParser#orderableLiteral}.
     *
     * @param ctx the parse tree
     * @return the visitor result
     */
    T visitOrderableLiteral(StixPatternParser.OrderableLiteralContext ctx);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy