Class ANTLRMessage

java.lang.Object
org.antlr.v4.tool.ANTLRMessage
Direct Known Subclasses:
GrammarSemanticsMessage, GrammarSyntaxMessage, LeftRecursionCyclesMessage, ToolMessage

public class ANTLRMessage extends Object
  • Field Details

    • EMPTY_ARGS

      private static final Object[] EMPTY_ARGS
    • errorType

      private final ErrorType errorType
    • args

      private final Object[] args
    • e

      private final Throwable e
    • fileName

      public String fileName
    • line

      public int line
    • charPosition

      public int charPosition
    • g

      public Grammar g
    • offendingToken

      public org.antlr.runtime.Token offendingToken
      Most of the time, we'll have a token such as an undefined rule ref and so this will be set.
  • Constructor Details

    • ANTLRMessage

      public ANTLRMessage(ErrorType errorType)
    • ANTLRMessage

      public ANTLRMessage(ErrorType errorType, org.antlr.runtime.Token offendingToken, Object... args)
    • ANTLRMessage

      public ANTLRMessage(ErrorType errorType, Throwable e, org.antlr.runtime.Token offendingToken, Object... args)
  • Method Details

    • getErrorType

      public ErrorType getErrorType()
    • getArgs

      public Object[] getArgs()
    • getMessageTemplate

      public org.stringtemplate.v4.ST getMessageTemplate(boolean verbose)
    • getCause

      public Throwable getCause()
    • toString

      public String toString()
      Overrides:
      toString in class Object