Class ParserUtils

java.lang.Object
org.elasticsearch.xpack.esql.parser.ParserUtils

public final class ParserUtils extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    nameOrPosition(org.antlr.v4.runtime.Token token)
    Extract the name or the position of a parameter.
    static Source
    source(org.antlr.v4.runtime.ParserRuleContext parserRuleContext)
     
    static Source
    source(org.antlr.v4.runtime.ParserRuleContext begin, org.antlr.v4.runtime.ParserRuleContext end)
     
    static Source
    source(org.antlr.v4.runtime.Token token)
     
    static Source
    source(org.antlr.v4.runtime.Token start, org.antlr.v4.runtime.Token stop)
     
    static Source
    source(org.antlr.v4.runtime.tree.ParseTree ctx)
     
    static Source
    source(org.antlr.v4.runtime.tree.TerminalNode terminalNode)
     
    static Source
    source(org.antlr.v4.runtime.tree.TerminalNode begin, org.antlr.v4.runtime.ParserRuleContext end)
     
    static String
    text(org.antlr.v4.runtime.tree.ParseTree node)
    Retrieves the raw text of the node (without interpreting it as a string literal).
    static <T> T
    typedParsing(org.antlr.v4.runtime.tree.ParseTreeVisitor<?> visitor, org.antlr.v4.runtime.tree.ParseTree ctx, Class<T> type)
     
    static Object
    visit(Function<org.antlr.v4.runtime.tree.ParseTree,Object> visitor, org.antlr.v4.runtime.tree.ParseTree tree)
     
    static <T> List<T>
    visitList(org.antlr.v4.runtime.tree.ParseTreeVisitor<?> visitor, List<? extends org.antlr.v4.runtime.ParserRuleContext> contexts, Class<T> clazz)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • visit

      public static Object visit(Function<org.antlr.v4.runtime.tree.ParseTree,Object> visitor, org.antlr.v4.runtime.tree.ParseTree tree)
    • visitList

      public static <T> List<T> visitList(org.antlr.v4.runtime.tree.ParseTreeVisitor<?> visitor, List<? extends org.antlr.v4.runtime.ParserRuleContext> contexts, Class<T> clazz)
    • typedParsing

      public static <T> T typedParsing(org.antlr.v4.runtime.tree.ParseTreeVisitor<?> visitor, org.antlr.v4.runtime.tree.ParseTree ctx, Class<T> type)
    • source

      public static Source source(org.antlr.v4.runtime.tree.ParseTree ctx)
    • source

      public static Source source(org.antlr.v4.runtime.tree.TerminalNode terminalNode)
    • source

      public static Source source(org.antlr.v4.runtime.ParserRuleContext parserRuleContext)
    • source

      public static Source source(org.antlr.v4.runtime.Token token)
    • source

      public static Source source(org.antlr.v4.runtime.ParserRuleContext begin, org.antlr.v4.runtime.ParserRuleContext end)
    • source

      public static Source source(org.antlr.v4.runtime.tree.TerminalNode begin, org.antlr.v4.runtime.ParserRuleContext end)
    • source

      public static Source source(org.antlr.v4.runtime.Token start, org.antlr.v4.runtime.Token stop)
    • text

      public static String text(org.antlr.v4.runtime.tree.ParseTree node)
      Retrieves the raw text of the node (without interpreting it as a string literal).
    • nameOrPosition

      public static String nameOrPosition(org.antlr.v4.runtime.Token token)
      Extract the name or the position of a parameter.