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
This class manages a list of
RecognitionException
s.- Author:
- Ole Kniemeyer
- See Also:
-
Field Summary
Fields inherited from class de.grogra.grammar.RecognitionException
IS_ERROR, MIN_UNUSED, warningBits
Fields inherited from class antlr.RecognitionException
column, fileName, line
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addAll
(RecognitionException[] list) void
void
addLexicalError
(I18NBundle bundle, String key, antlr.collections.AST node) void
addLexicalError
(I18NBundle bundle, String key, antlr.Token token) void
addLexicalError
(String error, antlr.collections.AST node) void
addLexicalError
(String error, antlr.Token token) void
addLexicalWarning
(I18NBundle bundle, String key, antlr.collections.AST node) void
addLexicalWarning
(I18NBundle bundle, String key, antlr.Token token) void
addLexicalWarning
(String warning, antlr.collections.AST node) void
addLexicalWarning
(String warning, antlr.Token token) void
addSemanticError
(I18NBundle bundle, String key, antlr.collections.AST node) void
addSemanticError
(I18NBundle bundle, String key, antlr.Token token) void
addSemanticError
(String error, antlr.collections.AST node) void
addSemanticError
(String error, antlr.Token token) void
addSemanticWarning
(I18NBundle bundle, String key, antlr.collections.AST node) void
addSemanticWarning
(I18NBundle bundle, String key, antlr.Token token) void
addSemanticWarning
(String warning, antlr.collections.AST node) void
addSemanticWarning
(String warning, antlr.Token token) void
addSyntacticError
(I18NBundle bundle, String key, antlr.collections.AST node) void
addSyntacticError
(I18NBundle bundle, String key, antlr.Token token) void
addSyntacticError
(String error, antlr.collections.AST node) void
addSyntacticError
(String error, antlr.Token token) void
addSyntacticWarning
(I18NBundle bundle, String key, antlr.collections.AST node) void
addSyntacticWarning
(I18NBundle bundle, String key, antlr.Token token) void
addSyntacticWarning
(String warning, antlr.collections.AST node) void
addSyntacticWarning
(String warning, antlr.Token token) void
addWarning
(RecognitionException warning) void
addWarning
(RecognitionException warning, long warningBits) void
check()
boolean
boolean
void
Disables the addition of exceptions to this list.void
dispose()
Enables the addition of exceptions.getDetailedMessage
(int firstLine, int firstColumn, int tabWidth, boolean html) int
boolean
boolean
isEmpty()
boolean
isWarning
(long bits) void
reset()
Methods inherited from class de.grogra.grammar.RecognitionException
compareTo, complete, convert, getCategoryDescription, getColumn, getDetailedMessage, getLine, isError, set, set, set, set, set
Methods inherited from class antlr.RecognitionException
getErrorMessage, getFilename, toString
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
RecognitionExceptionList
public RecognitionExceptionList(long warningMask, long errorMask) -
RecognitionExceptionList
public RecognitionExceptionList()
-
-
Method Details
-
check
- Throws:
RecognitionExceptionList
-
reset
public void reset() -
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 ofdisableAdd
and this invocation, but were not due todisableAdd
.- 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 ofdisableAdd
andenableAdd
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
-
addAll
-
addAll
-
addWarning
-
addWarning
-
addLexicalWarning
-
addLexicalWarning
-
addLexicalWarning
-
addLexicalWarning
-
addLexicalError
-
addLexicalError
-
addLexicalError
-
addLexicalError
-
addSyntacticWarning
-
addSyntacticWarning
-
addSyntacticWarning
-
addSyntacticWarning
-
addSyntacticError
-
addSyntacticError
-
addSyntacticError
-
addSyntacticError
-
addSemanticWarning
-
addSemanticWarning
-
addSemanticWarning
-
addSemanticWarning
-
addSemanticError
-
addSemanticError
-
addSemanticError
-
addSemanticError
-
getMessage
- Overrides:
getMessage
in classThrowable
-
getDetailedMessage
- Overrides:
getDetailedMessage
in classRecognitionException
-
dispose
public void dispose()- Specified by:
dispose
in interfaceDisposable
- Overrides:
dispose
in classRecognitionException
-