Class BufferingErrorListener

  • All Implemented Interfaces:
    Serializable, org.antlr.v4.runtime.ANTLRErrorListener

    public class BufferingErrorListener
    extends org.antlr.v4.runtime.BaseErrorListener
    implements Serializable
    ANTLR error listener implementation for registration with lexers and parsers. Buffers error messages as they are produced and allows them to be retrieved later via getErrorsAsString().
    See Also:
    Serialized Form
    • Constructor Detail

      • BufferingErrorListener

        public BufferingErrorListener()
    • Method Detail

      • syntaxError

        public void syntaxError​(org.antlr.v4.runtime.Recognizer<?,​?> recognizer,
                                Object offendingSymbol,
                                int line,
                                int charPositionInLine,
                                String msg,
                                org.antlr.v4.runtime.RecognitionException e)
        Specified by:
        syntaxError in interface org.antlr.v4.runtime.ANTLRErrorListener
        Overrides:
        syntaxError in class org.antlr.v4.runtime.BaseErrorListener
      • heardErrors

        public boolean heardErrors()
      • getErrorsAsString

        public String getErrorsAsString()