public class ErrorManager extends Object
| Modifier and Type | Field and Description |
|---|---|
int |
errors
|
Set |
errorTypes
All errors that have been generated
|
static String |
FORMATS_DIR
|
Tool |
tool
|
int |
warnings
|
| Constructor and Description |
|---|
ErrorManager(Tool
|
| Modifier and Type | Method and Description |
|---|---|
void |
emit(ErrorType
|
static void |
fatalInternalError(String
|
boolean |
formatWantsSingleLineMessage()
|
ST |
getLocationFormat()
Return a StringTemplate that refers to the current format used for emitting messages.
|
ST |
getMessageFormat()
|
ST |
getMessageTemplate(ANTLRMessage
|
int |
getNumErrors()
|
ST |
getReportFormat(ErrorSeverity
|
void |
grammarError(ErrorType
|
void |
info(String
|
static void |
internalError(String
|
static void |
internalError(String
|
void |
leftRecursionCycles(String
|
static void |
panic()
|
void |
panic(ErrorType
|
static void |
panic(String
|
void |
resetErrorState()
|
void |
setFormat(String
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
|
void |
toolError(ErrorType
Raise a predefined message with some number of paramters for the StringTemplate but for which there is no location information possible.
|
void |
toolError(ErrorType
|
protected boolean |
verifyFormat()
Verify the message format template group
|
public static final StringFORMATS_DIR
public Tooltool
public int errors
public int warnings
public ErrorManager(Tooltool)
public void resetErrorState()
public ST getMessageTemplate(ANTLRMessagemsg)
public ST getLocationFormat()
public ST getReportFormat(ErrorSeverityseverity)
public ST getMessageFormat()
public boolean formatWantsSingleLineMessage()
public void info(Stringmsg)
public void syntaxError(ErrorTypeetype, String fileName, org.antlr.runtime.Token token, org.antlr.runtime.RecognitionException antlrException, Object ... args)
public static void internalError(Stringerror)
public void toolError(ErrorTypeerrorType, Object ... args)
errorType - The Message Descriptor
args - The arguments to pass to the StringTemplate
public void grammarError(ErrorTypeetype, String fileName, org.antlr.runtime.Token token, Object ... args)
public void leftRecursionCycles(StringfileName, Collection <? extends Collection <Rule >> cycles)
public int getNumErrors()
public void emit(ErrorTypeetype, ANTLRMessage msg)
public void setFormat(StringformatName)
protected boolean verifyFormat()
public static void panic(Stringmsg)
public static void panic()