Class ErrorManager
java.lang.Object
org.antlr.v4.tool.ErrorManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidemit(ErrorType etype, ANTLRMessage msg) static voidfatalInternalError(String error, Throwable e) booleanprivate static StackTraceElementReturn first non ErrorManager code location for generating messagesorg.stringtemplate.v4.STReturn a StringTemplate that refers to the current format used for emitting messages.org.stringtemplate.v4.STorg.stringtemplate.v4.STintorg.stringtemplate.v4.STgetReportFormat(ErrorSeverity severity) voidgrammarError(ErrorType etype, String fileName, org.antlr.runtime.Token token, Object... args) voidstatic voidinternalError(String error) static voidinternalError(String error, Throwable e) voidleftRecursionCycles(String fileName, Collection<? extends Collection<Rule>> cycles) static voidpanic()static voidvoid(package private) static voidIf there are errors during ErrorManager init, we have no choice but to go to System.err.(package private) static voidvoidvoidThe 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".voidsyntaxError(ErrorType etype, String fileName, org.antlr.runtime.Token token, org.antlr.runtime.RecognitionException antlrException, Object... args) voidRaise a predefined message with some number of parameters for the StringTemplate but for which there is no location information possible.voidprotected booleanVerify the message format template group
-
Field Details
-
loadedFormats
-
FORMATS_DIR
- See Also:
-
tool
-
errors
public int errors -
warnings
public int warnings -
errorTypes
-
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
-
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()
-