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 TypeMethodDescriptionvoidemit(ErrorType etype, ANTLRMessage msg) static voidfatalInternalError(String error, Throwable e) booleanorg.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 voidvoidvoidvoidThe 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
-
FORMATS_DIR
- See Also:
-
tool
-
errors
public int errors -
warnings
public int warnings -
errorTypes
All errors that have been generated
-
-
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() -
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 -
panic
-
panic
-
panic
public static void panic()
-