Package org.antlr.v4.tool
Class ErrorManager
java.lang.Object
org.antlr.v4.tool.ErrorManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
emit
(ErrorType etype, ANTLRMessage msg) static void
fatalInternalError
(String error, Throwable e) boolean
private static StackTraceElement
Return first non ErrorManager code location for generating messagesorg.stringtemplate.v4.ST
Return a StringTemplate that refers to the current format used for emitting messages.org.stringtemplate.v4.ST
org.stringtemplate.v4.ST
int
org.stringtemplate.v4.ST
getReportFormat
(ErrorSeverity severity) void
grammarError
(ErrorType etype, String fileName, org.antlr.runtime.Token token, Object... args) void
static void
internalError
(String error) static void
internalError
(String error, Throwable e) void
leftRecursionCycles
(String fileName, Collection<? extends Collection<Rule>> cycles) static void
panic()
static void
void
(package private) static void
If there are errors during ErrorManager init, we have no choice but to go to System.err.(package private) static void
void
void
The format gets reset either from the Tool if the user supplied a command line option to that effect Otherwise we just use the default "antlr".void
syntaxError
(ErrorType etype, String fileName, org.antlr.runtime.Token token, org.antlr.runtime.RecognitionException antlrException, Object... args) void
Raise a predefined message with some number of parameters for the StringTemplate but for which there is no location information possible.void
protected boolean
Verify the message format template group
-
Field Details
-
loadedFormats
-
FORMATS_DIR
- See Also:
-
tool
-
errors
public int errors -
warnings
public int warnings -
errorTypes
All errors that have been generated -
format
org.stringtemplate.v4.STGroup formatThe group of templates that represent the current message format. -
formatName
String formatName -
initSTListener
org.stringtemplate.v4.misc.ErrorBuffer initSTListener
-
-
Constructor Details
-
ErrorManager
-
-
Method Details
-
resetErrorState
public void resetErrorState() -
getMessageTemplate
-
getLocationFormat
public org.stringtemplate.v4.ST getLocationFormat()Return a StringTemplate that refers to the current format used for emitting messages. -
getReportFormat
-
getMessageFormat
public org.stringtemplate.v4.ST getMessageFormat() -
formatWantsSingleLineMessage
public boolean formatWantsSingleLineMessage() -
info
-
syntaxError
-
fatalInternalError
-
internalError
-
internalError
-
toolError
Raise a predefined message with some number of parameters for the StringTemplate but for which there is no location information possible.- Parameters:
errorType
- The Message Descriptorargs
- The arguments to pass to the StringTemplate
-
toolError
-
grammarError
-
leftRecursionCycles
-
getNumErrors
public int getNumErrors() -
getLastNonErrorManagerCodeLocation
Return first non ErrorManager code location for generating messages -
emit
-
setFormat
The format gets reset either from the Tool if the user supplied a command line option to that effect Otherwise we just use the default "antlr". -
verifyFormat
protected boolean verifyFormat()Verify the message format template group -
rawError
If there are errors during ErrorManager init, we have no choice but to go to System.err. -
rawError
-
panic
-
panic
-
panic
public static void panic()
-