Module grammar

Class RecognitionExceptionList

java.lang.Object
java.lang.Throwable
java.lang.Exception
antlr.ANTLRException
antlr.RecognitionException
de.grogra.grammar.RecognitionException
de.grogra.grammar.RecognitionExceptionList
All Implemented Interfaces:
DetailedException, Disposable, UserException, Serializable, Comparable<RecognitionException>
Direct Known Subclasses:
ProblemReporter

public class RecognitionExceptionList extends RecognitionException
This class manages a list of RecognitionExceptions.
Author:
Ole Kniemeyer
See Also:
  • Constructor Details

    • RecognitionExceptionList

      public RecognitionExceptionList(long warningMask, long errorMask)
    • RecognitionExceptionList

      public RecognitionExceptionList()
  • Method Details

    • check

      public void check() throws RecognitionExceptionList
      Throws:
      RecognitionExceptionList
    • reset

      public void reset()
    • enableAdd

      public RecognitionExceptionList enableAdd()
      Enables the addition of exceptions. disableAdd must have been invoked previously. This method returns those exceptions which would have been added between the corresponding invocation of disableAdd and this invocation, but were not due to disableAdd.
      Returns:
      list of suppressed exceptions (never null, but the length may be 0)
    • disableAdd

      public void disableAdd()
      Disables the addition of exceptions to this list. Pairs of disableAdd and enableAdd may be nested.
      See Also:
    • isAddEnabled

      public boolean isAddEnabled()
    • containsErrors

      public boolean containsErrors()
    • getErrorCount

      public int getErrorCount()
    • containsWarnings

      public boolean containsWarnings()
    • isEmpty

      public boolean isEmpty()
    • isWarning

      public boolean isWarning(long bits)
    • add

      public void add(RecognitionException e)
    • addAll

      public void addAll(RecognitionExceptionList list)
    • addAll

      public void addAll(RecognitionException[] list)
    • addWarning

      public void addWarning(RecognitionException warning, long warningBits)
    • addWarning

      public void addWarning(RecognitionException warning)
    • addLexicalWarning

      public void addLexicalWarning(String warning, antlr.Token token)
    • addLexicalWarning

      public void addLexicalWarning(String warning, antlr.collections.AST node)
    • addLexicalWarning

      public void addLexicalWarning(I18NBundle bundle, String key, antlr.Token token)
    • addLexicalWarning

      public void addLexicalWarning(I18NBundle bundle, String key, antlr.collections.AST node)
    • addLexicalError

      public void addLexicalError(String error, antlr.Token token)
    • addLexicalError

      public void addLexicalError(String error, antlr.collections.AST node)
    • addLexicalError

      public void addLexicalError(I18NBundle bundle, String key, antlr.Token token)
    • addLexicalError

      public void addLexicalError(I18NBundle bundle, String key, antlr.collections.AST node)
    • addSyntacticWarning

      public void addSyntacticWarning(String warning, antlr.Token token)
    • addSyntacticWarning

      public void addSyntacticWarning(String warning, antlr.collections.AST node)
    • addSyntacticWarning

      public void addSyntacticWarning(I18NBundle bundle, String key, antlr.Token token)
    • addSyntacticWarning

      public void addSyntacticWarning(I18NBundle bundle, String key, antlr.collections.AST node)
    • addSyntacticError

      public void addSyntacticError(String error, antlr.Token token)
    • addSyntacticError

      public void addSyntacticError(String error, antlr.collections.AST node)
    • addSyntacticError

      public void addSyntacticError(I18NBundle bundle, String key, antlr.Token token)
    • addSyntacticError

      public void addSyntacticError(I18NBundle bundle, String key, antlr.collections.AST node)
    • addSemanticWarning

      public void addSemanticWarning(String warning, antlr.Token token)
    • addSemanticWarning

      public void addSemanticWarning(String warning, antlr.collections.AST node)
    • addSemanticWarning

      public void addSemanticWarning(I18NBundle bundle, String key, antlr.Token token)
    • addSemanticWarning

      public void addSemanticWarning(I18NBundle bundle, String key, antlr.collections.AST node)
    • addSemanticError

      public void addSemanticError(String error, antlr.Token token)
    • addSemanticError

      public void addSemanticError(String error, antlr.collections.AST node)
    • addSemanticError

      public void addSemanticError(I18NBundle bundle, String key, antlr.Token token)
    • addSemanticError

      public void addSemanticError(I18NBundle bundle, String key, antlr.collections.AST node)
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getDetailedMessage

      public String getDetailedMessage(int firstLine, int firstColumn, int tabWidth, boolean html)
      Overrides:
      getDetailedMessage in class RecognitionException
    • dispose

      public void dispose()
      Specified by:
      dispose in interface Disposable
      Overrides:
      dispose in class RecognitionException