Interface ParseTreeVisitor<T>

Type Parameters:
T - The return type of the visit operation. Use Void for operations with no return type.
All Known Implementing Classes:
AbstractParseTreeVisitor

public interface ParseTreeVisitor<T>
This interface defines the basic notion of a parse tree visitor. Generated visitors implement this interface and the XVisitor interface for grammar X.
  • Method Summary

    Modifier and Type
    Method
    Description
    Visit a parse tree, and return a user-defined result of the operation.
    Visit the children of a node, and return a user-defined result of the operation.
    Visit an error node, and return a user-defined result of the operation.
    Visit a terminal node, and return a user-defined result of the operation.
  • Method Details

    • visit

      T visit(ParseTree tree)
      Visit a parse tree, and return a user-defined result of the operation.
      Parameters:
      tree - The ParseTree to visit.
      Returns:
      The result of visiting the parse tree.
    • visitChildren

      T visitChildren(RuleNode node)
      Visit the children of a node, and return a user-defined result of the operation.
      Parameters:
      node - The RuleNode whose children should be visited.
      Returns:
      The result of visiting the children of the node.
    • visitTerminal

      T visitTerminal(TerminalNode node)
      Visit a terminal node, and return a user-defined result of the operation.
      Parameters:
      node - The TerminalNode to visit.
      Returns:
      The result of visiting the node.
    • visitErrorNode

      T visitErrorNode(ErrorNode node)
      Visit an error node, and return a user-defined result of the operation.
      Parameters:
      node - The ErrorNode to visit.
      Returns:
      The result of visiting the node.