Package org.antlr.tool
Class ErrorManager
java.lang.Object
org.antlr.tool.ErrorManager
Defines all the errors ANTLR can generator for both the tool and for
issues with a grammar.
Here is a list of language names:
http://ftp.ics.uci.edu/pub/ietf/http/related/iso639.txt
Here is a list of country names:
http://www.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
I use constants not strings to identify messages as the compiler will
find any errors/mismatches rather than leaving a mistyped string in
the code to be found randomly in the future. Further, Intellij can
do field name expansion to save me some typing. I have to map
int constants to template names, however, which could introduce a mismatch.
Someone could provide a .stg file that had a template name wrong. When
I load the group, then, I must verify that all messages are there.
This is essentially the functionality of the resource bundle stuff Java
has, but I don't want to load a property file--I want to load a template
group file and this is so simple, why mess with their junk.
I use the default Locale as defined by java to compute a group file name
in the org/antlr/tool/templates/messages dir called en_US.stg and so on.
Normally we want to use the default locale, but often a message file will
not exist for it so we must fall back on the US local.
During initialization of this class, all errors go straight to System.err.
There is no way around this. If I have not set up the error system, how
can I do errors properly? For example, if the string template group file
full of messages has an error, how could I print to anything but System.err?
TODO: how to map locale to a file encoding for the stringtemplate group file?
ST knows how to pay attention to the default encoding so it
should probably just work unless a GUI sets the local to some chinese
variation but System.getProperty("file.encoding") is US. Hmm...
TODO: get antlr.g etc.. parsing errors to come here.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static org.stringtemplate.v4.STErrorListener
During verification of the messages group file, don't gen errors.Only one error can be emitted for any entry in this table.static final BitSet
Do not do perform analysis if one of these happensstatic final BitSet
Do not do code gen if one of these happensprivate static org.stringtemplate.v4.STGroup
The group of templates that represent the current message format.private static String
private static final String[]
From a msgID how can I get the name of the template that describes the error or warning?(package private) static org.stringtemplate.v4.STErrorListener
Handle all ST error listeners here (code gen, Grammar, and this class use templates.private static Locale
Messages should be sensitive to the locale.static final int
private static org.stringtemplate.v4.STGroup
The group of templates that represent all possible ANTLR errors.static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
(package private) static ANTLRErrorListener
(package private) static org.stringtemplate.v4.STErrorListener
Errors during initialization related to ST must all go to System.err.private static final Map<Thread,
ErrorManager.ErrorState> Track the number of errors regardless of the listener but track per thread.private static final Map<Thread,
ANTLRErrorListener> Each thread might need it's own error listener; e.g., a GUI with multiple window frames holding multiple grammars.Each thread has its own ptr to a Tool object, which knows how to panic, for example. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
analysisAborted
(DecisionProbe probe) static void
assertTrue
(boolean condition, String message) static void
danglingState
(DecisionProbe probe, DFAState d) static boolean
static boolean
static void
error
(int msgID) static void
static void
static void
static void
static boolean
static ANTLRErrorListener
static ErrorManager.ErrorState
private static StackTraceElement
Return first non ErrorManager code location for generating messagesstatic org.stringtemplate.v4.ST
Return a ST that refers to the current format used for emitting messages.static org.stringtemplate.v4.ST
getMessage
(int msgID) Given a message ID, return a ST that somebody can fill with data.static org.stringtemplate.v4.ST
static String
getMessageType
(int msgID) static int
static org.stringtemplate.v4.ST
static org.stringtemplate.v4.STErrorListener
static void
grammarError
(int msgID, Grammar g, Token token) static void
grammarError
(int msgID, Grammar g, Token token, Object arg) static void
grammarError
(int msgID, Grammar g, Token token, Object arg, Object arg2) static void
grammarWarning
(int msgID, Grammar g, Token token) static void
grammarWarning
(int msgID, Grammar g, Token token, Object arg) static void
grammarWarning
(int msgID, Grammar g, Token token, Object arg, Object arg2) static void
protected static boolean
static void
insufficientPredicates
(DecisionProbe probe, DFAState d, Map<Integer, Set<Token>> altToUncoveredLocations) static void
internalError
(Object error) static void
internalError
(Object error, Throwable e) static void
leftRecursionCycles
(Collection<? extends Set<? extends Rule>> cycles) static void
nondeterminism
(DecisionProbe probe, DFAState d) static void
nonLLStarDecision
(DecisionProbe probe) static void
panic()
I *think* this will allow Tool subclasses to exit gracefully for GUIs etc...(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
static void
recursionOverflow
(DecisionProbe probe, DFAState sampleBadState, int alt, Collection<String> targetRules, Collection<? extends Collection<? extends NFAState>> callSiteStates) static void
static void
static void
setErrorListener
(ANTLRErrorListener listener) In general, you'll want all errors to go to a single spot.static 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".static void
We really only need a single locale for entire running ANTLR code in a single VM.static void
static void
syntaxError
(int msgID, Grammar grammar, Token token, Object arg, RecognitionException re) static void
unreachableAlts
(DecisionProbe probe, List<Integer> alts) protected static boolean
Verify the message format template groupprotected static boolean
Use reflection to find list of MSG_ fields and then verify a template exists for each one from the locale's group.static void
-
Field Details
-
MSG_CANNOT_WRITE_FILE
public static final int MSG_CANNOT_WRITE_FILE- See Also:
-
MSG_CANNOT_CLOSE_FILE
public static final int MSG_CANNOT_CLOSE_FILE- See Also:
-
MSG_CANNOT_FIND_TOKENS_FILE
public static final int MSG_CANNOT_FIND_TOKENS_FILE- See Also:
-
MSG_ERROR_READING_TOKENS_FILE
public static final int MSG_ERROR_READING_TOKENS_FILE- See Also:
-
MSG_DIR_NOT_FOUND
public static final int MSG_DIR_NOT_FOUND- See Also:
-
MSG_OUTPUT_DIR_IS_FILE
public static final int MSG_OUTPUT_DIR_IS_FILE- See Also:
-
MSG_CANNOT_OPEN_FILE
public static final int MSG_CANNOT_OPEN_FILE- See Also:
-
MSG_FILE_AND_GRAMMAR_NAME_DIFFER
public static final int MSG_FILE_AND_GRAMMAR_NAME_DIFFER- See Also:
-
MSG_FILENAME_EXTENSION_ERROR
public static final int MSG_FILENAME_EXTENSION_ERROR- See Also:
-
MSG_INTERNAL_ERROR
public static final int MSG_INTERNAL_ERROR- See Also:
-
MSG_INTERNAL_WARNING
public static final int MSG_INTERNAL_WARNING- See Also:
-
MSG_ERROR_CREATING_ARTIFICIAL_RULE
public static final int MSG_ERROR_CREATING_ARTIFICIAL_RULE- See Also:
-
MSG_TOKENS_FILE_SYNTAX_ERROR
public static final int MSG_TOKENS_FILE_SYNTAX_ERROR- See Also:
-
MSG_CANNOT_GEN_DOT_FILE
public static final int MSG_CANNOT_GEN_DOT_FILE- See Also:
-
MSG_BAD_AST_STRUCTURE
public static final int MSG_BAD_AST_STRUCTURE- See Also:
-
MSG_BAD_ACTION_AST_STRUCTURE
public static final int MSG_BAD_ACTION_AST_STRUCTURE- See Also:
-
MSG_MISSING_CODE_GEN_TEMPLATES
public static final int MSG_MISSING_CODE_GEN_TEMPLATES- See Also:
-
MSG_MISSING_CYCLIC_DFA_CODE_GEN_TEMPLATES
public static final int MSG_MISSING_CYCLIC_DFA_CODE_GEN_TEMPLATES- See Also:
-
MSG_CODE_GEN_TEMPLATES_INCOMPLETE
public static final int MSG_CODE_GEN_TEMPLATES_INCOMPLETE- See Also:
-
MSG_CANNOT_CREATE_TARGET_GENERATOR
public static final int MSG_CANNOT_CREATE_TARGET_GENERATOR- See Also:
-
MSG_STRING_TEMPLATE_ERROR
public static final int MSG_STRING_TEMPLATE_ERROR- See Also:
-
MSG_SYNTAX_ERROR
public static final int MSG_SYNTAX_ERROR- See Also:
-
MSG_RULE_REDEFINITION
public static final int MSG_RULE_REDEFINITION- See Also:
-
MSG_LEXER_RULES_NOT_ALLOWED
public static final int MSG_LEXER_RULES_NOT_ALLOWED- See Also:
-
MSG_PARSER_RULES_NOT_ALLOWED
public static final int MSG_PARSER_RULES_NOT_ALLOWED- See Also:
-
MSG_CANNOT_FIND_ATTRIBUTE_NAME_IN_DECL
public static final int MSG_CANNOT_FIND_ATTRIBUTE_NAME_IN_DECL- See Also:
-
MSG_NO_TOKEN_DEFINITION
public static final int MSG_NO_TOKEN_DEFINITION- See Also:
-
MSG_UNDEFINED_RULE_REF
public static final int MSG_UNDEFINED_RULE_REF- See Also:
-
MSG_LITERAL_NOT_ASSOCIATED_WITH_LEXER_RULE
public static final int MSG_LITERAL_NOT_ASSOCIATED_WITH_LEXER_RULE- See Also:
-
MSG_CANNOT_ALIAS_TOKENS_IN_LEXER
public static final int MSG_CANNOT_ALIAS_TOKENS_IN_LEXER- See Also:
-
MSG_ATTRIBUTE_REF_NOT_IN_RULE
public static final int MSG_ATTRIBUTE_REF_NOT_IN_RULE- See Also:
-
MSG_INVALID_RULE_SCOPE_ATTRIBUTE_REF
public static final int MSG_INVALID_RULE_SCOPE_ATTRIBUTE_REF- See Also:
-
MSG_UNKNOWN_ATTRIBUTE_IN_SCOPE
public static final int MSG_UNKNOWN_ATTRIBUTE_IN_SCOPE- See Also:
-
MSG_UNKNOWN_SIMPLE_ATTRIBUTE
public static final int MSG_UNKNOWN_SIMPLE_ATTRIBUTE- See Also:
-
MSG_INVALID_RULE_PARAMETER_REF
public static final int MSG_INVALID_RULE_PARAMETER_REF- See Also:
-
MSG_UNKNOWN_RULE_ATTRIBUTE
public static final int MSG_UNKNOWN_RULE_ATTRIBUTE- See Also:
-
MSG_ISOLATED_RULE_SCOPE
public static final int MSG_ISOLATED_RULE_SCOPE- See Also:
-
MSG_SYMBOL_CONFLICTS_WITH_GLOBAL_SCOPE
public static final int MSG_SYMBOL_CONFLICTS_WITH_GLOBAL_SCOPE- See Also:
-
MSG_LABEL_CONFLICTS_WITH_RULE
public static final int MSG_LABEL_CONFLICTS_WITH_RULE- See Also:
-
MSG_LABEL_CONFLICTS_WITH_TOKEN
public static final int MSG_LABEL_CONFLICTS_WITH_TOKEN- See Also:
-
MSG_LABEL_CONFLICTS_WITH_RULE_SCOPE_ATTRIBUTE
public static final int MSG_LABEL_CONFLICTS_WITH_RULE_SCOPE_ATTRIBUTE- See Also:
-
MSG_LABEL_CONFLICTS_WITH_RULE_ARG_RETVAL
public static final int MSG_LABEL_CONFLICTS_WITH_RULE_ARG_RETVAL- See Also:
-
MSG_ATTRIBUTE_CONFLICTS_WITH_RULE
public static final int MSG_ATTRIBUTE_CONFLICTS_WITH_RULE- See Also:
-
MSG_ATTRIBUTE_CONFLICTS_WITH_RULE_ARG_RETVAL
public static final int MSG_ATTRIBUTE_CONFLICTS_WITH_RULE_ARG_RETVAL- See Also:
-
MSG_LABEL_TYPE_CONFLICT
public static final int MSG_LABEL_TYPE_CONFLICT- See Also:
-
MSG_ARG_RETVAL_CONFLICT
public static final int MSG_ARG_RETVAL_CONFLICT- See Also:
-
MSG_NONUNIQUE_REF
public static final int MSG_NONUNIQUE_REF- See Also:
-
MSG_FORWARD_ELEMENT_REF
public static final int MSG_FORWARD_ELEMENT_REF- See Also:
-
MSG_MISSING_RULE_ARGS
public static final int MSG_MISSING_RULE_ARGS- See Also:
-
MSG_RULE_HAS_NO_ARGS
public static final int MSG_RULE_HAS_NO_ARGS- See Also:
-
MSG_ARGS_ON_TOKEN_REF
public static final int MSG_ARGS_ON_TOKEN_REF- See Also:
-
MSG_RULE_REF_AMBIG_WITH_RULE_IN_ALT
public static final int MSG_RULE_REF_AMBIG_WITH_RULE_IN_ALT- See Also:
-
MSG_ILLEGAL_OPTION
public static final int MSG_ILLEGAL_OPTION- See Also:
-
MSG_LIST_LABEL_INVALID_UNLESS_RETVAL_STRUCT
public static final int MSG_LIST_LABEL_INVALID_UNLESS_RETVAL_STRUCT- See Also:
-
MSG_UNDEFINED_TOKEN_REF_IN_REWRITE
public static final int MSG_UNDEFINED_TOKEN_REF_IN_REWRITE- See Also:
-
MSG_REWRITE_ELEMENT_NOT_PRESENT_ON_LHS
public static final int MSG_REWRITE_ELEMENT_NOT_PRESENT_ON_LHS- See Also:
-
MSG_UNDEFINED_LABEL_REF_IN_REWRITE
public static final int MSG_UNDEFINED_LABEL_REF_IN_REWRITE- See Also:
-
MSG_NO_GRAMMAR_START_RULE
public static final int MSG_NO_GRAMMAR_START_RULE- See Also:
-
MSG_EMPTY_COMPLEMENT
public static final int MSG_EMPTY_COMPLEMENT- See Also:
-
MSG_UNKNOWN_DYNAMIC_SCOPE
public static final int MSG_UNKNOWN_DYNAMIC_SCOPE- See Also:
-
MSG_UNKNOWN_DYNAMIC_SCOPE_ATTRIBUTE
public static final int MSG_UNKNOWN_DYNAMIC_SCOPE_ATTRIBUTE- See Also:
-
MSG_ISOLATED_RULE_ATTRIBUTE
public static final int MSG_ISOLATED_RULE_ATTRIBUTE- See Also:
-
MSG_INVALID_ACTION_SCOPE
public static final int MSG_INVALID_ACTION_SCOPE- See Also:
-
MSG_ACTION_REDEFINITION
public static final int MSG_ACTION_REDEFINITION- See Also:
-
MSG_DOUBLE_QUOTES_ILLEGAL
public static final int MSG_DOUBLE_QUOTES_ILLEGAL- See Also:
-
MSG_INVALID_TEMPLATE_ACTION
public static final int MSG_INVALID_TEMPLATE_ACTION- See Also:
-
MSG_MISSING_ATTRIBUTE_NAME
public static final int MSG_MISSING_ATTRIBUTE_NAME- See Also:
-
MSG_ARG_INIT_VALUES_ILLEGAL
public static final int MSG_ARG_INIT_VALUES_ILLEGAL- See Also:
-
MSG_REWRITE_OR_OP_WITH_NO_OUTPUT_OPTION
public static final int MSG_REWRITE_OR_OP_WITH_NO_OUTPUT_OPTION- See Also:
-
MSG_NO_RULES
public static final int MSG_NO_RULES- See Also:
-
MSG_WRITE_TO_READONLY_ATTR
public static final int MSG_WRITE_TO_READONLY_ATTR- See Also:
-
MSG_MISSING_AST_TYPE_IN_TREE_GRAMMAR
public static final int MSG_MISSING_AST_TYPE_IN_TREE_GRAMMAR- See Also:
-
MSG_REWRITE_FOR_MULTI_ELEMENT_ALT
public static final int MSG_REWRITE_FOR_MULTI_ELEMENT_ALT- See Also:
-
MSG_RULE_INVALID_SET
public static final int MSG_RULE_INVALID_SET- See Also:
-
MSG_HETERO_ILLEGAL_IN_REWRITE_ALT
public static final int MSG_HETERO_ILLEGAL_IN_REWRITE_ALT- See Also:
-
MSG_NO_SUCH_GRAMMAR_SCOPE
public static final int MSG_NO_SUCH_GRAMMAR_SCOPE- See Also:
-
MSG_NO_SUCH_RULE_IN_SCOPE
public static final int MSG_NO_SUCH_RULE_IN_SCOPE- See Also:
-
MSG_TOKEN_ALIAS_CONFLICT
public static final int MSG_TOKEN_ALIAS_CONFLICT- See Also:
-
MSG_TOKEN_ALIAS_REASSIGNMENT
public static final int MSG_TOKEN_ALIAS_REASSIGNMENT- See Also:
-
MSG_TOKEN_VOCAB_IN_DELEGATE
public static final int MSG_TOKEN_VOCAB_IN_DELEGATE- See Also:
-
MSG_INVALID_IMPORT
public static final int MSG_INVALID_IMPORT- See Also:
-
MSG_IMPORTED_TOKENS_RULE_EMPTY
public static final int MSG_IMPORTED_TOKENS_RULE_EMPTY- See Also:
-
MSG_IMPORT_NAME_CLASH
public static final int MSG_IMPORT_NAME_CLASH- See Also:
-
MSG_AST_OP_WITH_NON_AST_OUTPUT_OPTION
public static final int MSG_AST_OP_WITH_NON_AST_OUTPUT_OPTION- See Also:
-
MSG_AST_OP_IN_ALT_WITH_REWRITE
public static final int MSG_AST_OP_IN_ALT_WITH_REWRITE- See Also:
-
MSG_WILDCARD_AS_ROOT
public static final int MSG_WILDCARD_AS_ROOT- See Also:
-
MSG_CONFLICTING_OPTION_IN_TREE_FILTER
public static final int MSG_CONFLICTING_OPTION_IN_TREE_FILTER- See Also:
-
MSG_ILLEGAL_OPTION_VALUE
public static final int MSG_ILLEGAL_OPTION_VALUE- See Also:
-
MSG_ALL_OPS_NEED_SAME_ASSOC
public static final int MSG_ALL_OPS_NEED_SAME_ASSOC- See Also:
-
MSG_RANGE_OP_ILLEGAL
public static final int MSG_RANGE_OP_ILLEGAL- See Also:
-
MSG_GRAMMAR_NONDETERMINISM
public static final int MSG_GRAMMAR_NONDETERMINISM- See Also:
-
MSG_UNREACHABLE_ALTS
public static final int MSG_UNREACHABLE_ALTS- See Also:
-
MSG_DANGLING_STATE
public static final int MSG_DANGLING_STATE- See Also:
-
MSG_INSUFFICIENT_PREDICATES
public static final int MSG_INSUFFICIENT_PREDICATES- See Also:
-
MSG_DUPLICATE_SET_ENTRY
public static final int MSG_DUPLICATE_SET_ENTRY- See Also:
-
MSG_ANALYSIS_ABORTED
public static final int MSG_ANALYSIS_ABORTED- See Also:
-
MSG_RECURSION_OVERLOW
public static final int MSG_RECURSION_OVERLOW- See Also:
-
MSG_LEFT_RECURSION
public static final int MSG_LEFT_RECURSION- See Also:
-
MSG_UNREACHABLE_TOKENS
public static final int MSG_UNREACHABLE_TOKENS- See Also:
-
MSG_TOKEN_NONDETERMINISM
public static final int MSG_TOKEN_NONDETERMINISM- See Also:
-
MSG_LEFT_RECURSION_CYCLES
public static final int MSG_LEFT_RECURSION_CYCLES- See Also:
-
MSG_NONREGULAR_DECISION
public static final int MSG_NONREGULAR_DECISION- See Also:
-
MSG_CIRCULAR_DEPENDENCY
public static final int MSG_CIRCULAR_DEPENDENCY- See Also:
-
MAX_MESSAGE_NUMBER
public static final int MAX_MESSAGE_NUMBER- See Also:
-
ERRORS_FORCING_NO_ANALYSIS
Do not do perform analysis if one of these happens -
ERRORS_FORCING_NO_CODEGEN
Do not do code gen if one of these happens -
emitSingleError
Only one error can be emitted for any entry in this table. Map<String,Set> where the key is a method name like danglingState. The set is whatever that method accepts or derives like a DFA. -
locale
Messages should be sensitive to the locale. -
formatName
-
threadToListenerMap
Each thread might need it's own error listener; e.g., a GUI with multiple window frames holding multiple grammars. -
threadToErrorStateMap
Track the number of errors regardless of the listener but track per thread. -
threadToToolMap
Each thread has its own ptr to a Tool object, which knows how to panic, for example. In a GUI, the thread might just throw an Error to exit rather than the suicide System.exit. -
messages
private static org.stringtemplate.v4.STGroup messagesThe group of templates that represent all possible ANTLR errors. -
format
private static org.stringtemplate.v4.STGroup formatThe group of templates that represent the current message format. -
idToMessageTemplateName
From a msgID how can I get the name of the template that describes the error or warning? -
theDefaultErrorListener
-
initSTListener
static org.stringtemplate.v4.STErrorListener initSTListenerHandle all ST error listeners here (code gen, Grammar, and this class use templates. -
blankSTListener
static org.stringtemplate.v4.STErrorListener blankSTListenerDuring verification of the messages group file, don't gen errors. I'll handle them here. This is used only after file has loaded ok and only for the messages STG. -
theDefaultSTListener
static org.stringtemplate.v4.STErrorListener theDefaultSTListenerErrors during initialization related to ST must all go to System.err.
-
-
Constructor Details
-
ErrorManager
public ErrorManager()
-
-
Method Details
-
getSTErrorListener
public static org.stringtemplate.v4.STErrorListener getSTErrorListener() -
setLocale
We really only need a single locale for entire running ANTLR code in a single VM. Only pay attention to the language, not the country so that French Canadians and French Frenchies all get the same template file, fr.stg. Just easier this way. -
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". -
setErrorListener
In general, you'll want all errors to go to a single spot. However, in a GUI, you might have two frames up with two different grammars. Two threads might launch to process the grammars--you would want errors to go to different objects depending on the thread. I store a single listener per thread. -
removeErrorListener
public static void removeErrorListener() -
setTool
-
getMessage
public static org.stringtemplate.v4.ST getMessage(int msgID) Given a message ID, return a ST that somebody can fill with data. We need to convert the int ID to the name of a template in the messages ST group. -
getMessageType
-
getLocationFormat
public static org.stringtemplate.v4.ST getLocationFormat()Return a ST that refers to the current format used for emitting messages. -
getReportFormat
public static org.stringtemplate.v4.ST getReportFormat() -
getMessageFormat
public static org.stringtemplate.v4.ST getMessageFormat() -
formatWantsSingleLineMessage
public static boolean formatWantsSingleLineMessage() -
getErrorListener
-
getErrorState
-
getNumErrors
public static int getNumErrors() -
resetErrorState
public static void resetErrorState() -
info
-
error
public static void error(int msgID) -
error
-
error
-
error
-
error
-
warning
-
nondeterminism
-
danglingState
-
analysisAborted
-
unreachableAlts
-
insufficientPredicates
-
nonLLStarDecision
-
recursionOverflow
public static void recursionOverflow(DecisionProbe probe, DFAState sampleBadState, int alt, Collection<String> targetRules, Collection<? extends Collection<? extends NFAState>> callSiteStates) -
leftRecursionCycles
-
grammarError
-
grammarError
-
grammarError
-
grammarWarning
-
grammarWarning
-
grammarWarning
-
syntaxError
public static void syntaxError(int msgID, Grammar grammar, Token token, Object arg, RecognitionException re) -
internalError
-
internalError
-
doNotAttemptAnalysis
public static boolean doNotAttemptAnalysis() -
doNotAttemptCodeGen
public static boolean doNotAttemptCodeGen() -
getLastNonErrorManagerCodeLocation
Return first non ErrorManager code location for generating messages -
assertTrue
-
initIdToMessageNameMapping
protected static boolean initIdToMessageNameMapping() -
verifyMessages
protected static boolean verifyMessages()Use reflection to find list of MSG_ fields and then verify a template exists for each one from the locale's group. -
verifyFormat
protected static 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
public static void panic()I *think* this will allow Tool subclasses to exit gracefully for GUIs etc...
-