forked from jasder/antlr
Tweak comments and messages in ErrorType
This commit is contained in:
parent
d7bf34d4f4
commit
9865d03347
|
@ -33,13 +33,11 @@ import org.antlr.v4.Tool;
|
|||
|
||||
/**
|
||||
* A complex enumeration of all the error messages that the tool can issue.
|
||||
*
|
||||
* <p/>
|
||||
* When adding error messages, also add a description of the message to the
|
||||
* Wiki with a location under the Wiki page
|
||||
* <a href="http://www.antlr.org/wiki/display/ANTLR4/Errors+Reported+by+the+ANTLR+Tool">Errors Reported by the ANTLR Tool</a>.
|
||||
*
|
||||
* TODO: add notion of single issuance of an error; some don't need to be repeated; AST_OP_IN_ALT_WITH_REWRITE and option issues
|
||||
*
|
||||
* @author Jim Idle <jimi@temporal-wave.com>, Terence Parr
|
||||
* @since 4.0
|
||||
*/
|
||||
|
@ -119,14 +117,14 @@ public enum ErrorType {
|
|||
INVALID_LEXER_SET_ELEMENT(134, "lexer set element <arg> is invalid (either lexer rule ref or literal with > 1 char)", ErrorSeverity.ERROR),
|
||||
|
||||
// Backward incompatibility errors
|
||||
V3_TREE_GRAMMAR(200, "tree grammars are not supported in ANTLR v4", ErrorSeverity.ERROR),
|
||||
V3_LEXER_LABEL(201, "labels in lexer rules are not supported in ANTLR v4; " +
|
||||
V3_TREE_GRAMMAR(200, "tree grammars are not supported in ANTLR 4", ErrorSeverity.ERROR),
|
||||
V3_LEXER_LABEL(201, "labels in lexer rules are not supported in ANTLR 4; " +
|
||||
"actions cannot reference elements of lexical rules but you can use " +
|
||||
"getText() to get the entire text matched for the rule", ErrorSeverity.WARNING_ONE_OFF),
|
||||
V3_TOKENS_SYNTAX(202, "'tokens {A; B;}' syntax is now 'tokens {A, B}' in ANTLR v4", ErrorSeverity.WARNING),
|
||||
V3_ASSIGN_IN_TOKENS(203, "assignments in tokens{} are not supported in ANTLR v4; use lexical rule '<arg> : <arg2>;' instead", ErrorSeverity.ERROR_ONE_OFF),
|
||||
V3_GATED_SEMPRED(204, "{...}?=> gate semantic predicates in v3 behave like normal predicates in ANTLR v4; use {...}? instead", ErrorSeverity.WARNING_ONE_OFF),
|
||||
V3_SYNPRED(205, "(...)=> syntactic predicates are not needed or supported ANTLR v4; just delete them", ErrorSeverity.ERROR_ONE_OFF),
|
||||
V3_TOKENS_SYNTAX(202, "'tokens {A; B;}' syntax is now 'tokens {A, B}' in ANTLR 4", ErrorSeverity.WARNING),
|
||||
V3_ASSIGN_IN_TOKENS(203, "assignments in tokens{} are not supported in ANTLR 4; use lexical rule '<arg> : <arg2>;' instead", ErrorSeverity.ERROR_ONE_OFF),
|
||||
V3_GATED_SEMPRED(204, "{...}?=> explicitly gated semantic predicates are deprecated in ANTLR 4; use {...}? instead", ErrorSeverity.WARNING_ONE_OFF),
|
||||
V3_SYNPRED(205, "(...)=> syntactic predicates are not supported in ANTLR 4", ErrorSeverity.ERROR_ONE_OFF),
|
||||
|
||||
// Dependency sorting errors
|
||||
|
||||
|
|
Loading…
Reference in New Issue