When adding error messages, also add a description of the message to the Wiki with a location under the Wiki page Errors Reported by the ANTLR Tool.
| Modifier and Type | Field and Description |
|---|---|
| public static final ErrorType | ACTION_REDEFINITION
Compiler Error 94. |
| public static final ErrorType | ALL_OPS_NEED_SAME_ASSOC
Compiler Warning 118. |
| public static final ErrorType | ALT_LABEL_CONFLICTS_WITH_RULE
Compiler Error 124. |
| public static final ErrorType | ALT_LABEL_REDEF
Compiler Error 123. |
| public static final ErrorType | ARG_CONFLICTS_WITH_RULE
Compiler Error 138. |
| public static final ErrorType | ARG_CONFLICTS_WITH_TOKEN
Compiler Error 139. |
| public static final ErrorType | ASSIGNMENT_TO_LIST_LABEL
Compiler Error 135. |
| public static final ErrorType | ATTRIBUTE_IN_LEXER_ACTION
Compiler Error 128. |
| public static final ErrorType | BAD_OPTION_SET_SYNTAX
Compiler Error 9. |
| public static final ErrorType | CANNOT_CREATE_TARGET_GENERATOR
Compiler Error 31. |
| public static final ErrorType | CANNOT_FIND_ATTRIBUTE_NAME_IN_DECL
Compiler Error 121. |
| public static final ErrorType | CANNOT_FIND_IMPORTED_GRAMMAR
Compiler Error 110. |
| public static final ErrorType | CANNOT_FIND_TOKENS_FILE_GIVEN_ON_CMDLINE
Compiler Error 3. |
| public static final ErrorType | CANNOT_FIND_TOKENS_FILE_REFD_IN_GRAMMAR
Compiler Error 114. |
| public static final ErrorType | CANNOT_OPEN_FILE
Compiler Error 7. |
| public static final ErrorType | CANNOT_WRITE_FILE
Compiler Error 1. |
| public static final ErrorType | CHANNEL_CONFLICTS_WITH_COMMON_CONSTANTS
Compiler Error 172. |
| public static final ErrorType | CHANNEL_CONFLICTS_WITH_MODE
Compiler Error 162. |
| public static final ErrorType | CHANNEL_CONFLICTS_WITH_TOKEN
Compiler Error 161. |
| public static final ErrorType | CHANNELS_BLOCK_IN_COMBINED_GRAMMAR
Compiler Error 164. |
| public static final ErrorType | CHANNELS_BLOCK_IN_PARSER_GRAMMAR
Compiler Error 163. |
| public static final ErrorType | CHARACTERS_COLLISION_IN_SET
Compiler Warning 180. |
| public final int | code
The error or warning number. |
| public static final ErrorType | CODE_GEN_TEMPLATES_INCOMPLETE
Compiler Error 33. |
| public static final ErrorType | CODE_TEMPLATE_ARG_ISSUE
Compiler Error 32. |
| public static final ErrorType | CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_CHANNEL_NAME
Compiler Error 177. |
| public static final ErrorType | CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_MODE_NAME
Compiler Error 176. |
| public static final ErrorType | CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_TOKEN_NAME
Compiler Error 175. |
| public static final ErrorType | DIR_NOT_FOUND
Compiler Error 5. |
| public static final ErrorType | |
| public static final ErrorType | EMPTY_STRINGS_AND_SETS_NOT_ALLOWED
Compiler Error 174. |
| public static final ErrorType | EOF_CLOSURE
rule rule contains a closure with at least one alternative that can match EOF A rule contains a closure ( |
| public static final ErrorType | EPSILON_CLOSURE
Compiler Error 153. |
| public static final ErrorType | EPSILON_LR_FOLLOW
Compiler Error 148. |
| public static final ErrorType | EPSILON_OPTIONAL
Compiler Warning 154. |
| public static final ErrorType | EPSILON_TOKEN
Compiler Warning 146. |
| public static final ErrorType | ERROR_READING_IMPORTED_GRAMMAR
Compiler Error 11. |
| public static final ErrorType | ERROR_READING_TOKENS_FILE
Compiler Error 4. |
| public static final ErrorType | EXPECTED_NON_GREEDY_WILDCARD_BLOCK
Compiler Warning 131. |
| public static final ErrorType | FILE_AND_GRAMMAR_NAME_DIFFER
Compiler Error 8. |
| public static final ErrorType | FRAGMENT_ACTION_IGNORED
Compiler Warning 158. |
| public static final ErrorType | ILLEGAL_OPTION
Compiler Warning 83. |
| public static final ErrorType | ILLEGAL_OPTION_VALUE
Compiler Warning 84. |
| public static final ErrorType | IMPLICIT_STRING_DEFINITION
Compiler Error 126. |
| public static final ErrorType | IMPLICIT_TOKEN_DEFINITION
Compiler Warning 125. |
| public static final ErrorType | IMPORT_NAME_CLASH
Compiler Error 113. |
| public static final ErrorType | |
| public static final ErrorType | INCOMPATIBLE_TOOL_AND_TEMPLATES
Compiler Error 35. |
| public static final ErrorType | INTERNAL_ERROR
Compiler Error 20. |
| public static final ErrorType | INVALID_CMDLINE_ARG
Compiler Error 2. |
| public static final ErrorType | INVALID_ESCAPE_SEQUENCE
Compiler Error 156. |
| public static final ErrorType | INVALID_IMPORT
Compiler Error 111. |
| public static final ErrorType | INVALID_LEXER_COMMAND
Compiler Error 149. |
| public static final ErrorType | INVALID_LITERAL_IN_LEXER_SET
Compiler Error 144. |
| public static final ErrorType | INVALID_RULE_PARAMETER_REF
Compiler Error 64. |
| public static final ErrorType | ISOLATED_RULE_REF
Compiler Error 67. |
| public static final ErrorType | LABEL_BLOCK_NOT_A_SET
Compiler Error 130. |
| public static final ErrorType | LABEL_CONFLICTS_WITH_ARG
Compiler Error 72. |
| public static final ErrorType | LABEL_CONFLICTS_WITH_LOCAL
Compiler Error 74. |
| public static final ErrorType | LABEL_CONFLICTS_WITH_RETVAL
Compiler Error 73. |
| public static final ErrorType | LABEL_CONFLICTS_WITH_RULE
Compiler Error 69. |
| public static final ErrorType | LABEL_CONFLICTS_WITH_TOKEN
Compiler Error 70. |
| public static final ErrorType | LABEL_TYPE_CONFLICT
Compiler Error 75. |
| public static final ErrorType | LEFT_RECURSION_CYCLES
Compiler Error 119. |
| public static final ErrorType | LEXER_ACTION_PLACEMENT_ISSUE
Compiler Error 132. |
| public static final ErrorType | LEXER_COMMAND_PLACEMENT_ISSUE
Compiler Error 133. |
| public static final ErrorType | LEXER_RULES_NOT_ALLOWED
Compiler Error 52. |
| public static final ErrorType | LOCAL_CONFLICTS_WITH_ARG
Compiler Error 142. |
| public static final ErrorType | LOCAL_CONFLICTS_WITH_RETVAL
Compiler Error 143. |
| public static final ErrorType | LOCAL_CONFLICTS_WITH_RULE
Compiler Error 140. |
| public static final ErrorType | LOCAL_CONFLICTS_WITH_TOKEN
Compiler Error 141. |
| public static final ErrorType | MISSING_CODE_GEN_TEMPLATES
Compiler Error 30. |
| public static final ErrorType | MISSING_LEXER_COMMAND_ARGUMENT
Compiler Error 150. |
| public static final ErrorType | MISSING_RULE_ARGS
Compiler Error 79. |
| public static final ErrorType | MODE_CONFLICTS_WITH_COMMON_CONSTANTS
Compiler Error 173. |
| public static final ErrorType | MODE_CONFLICTS_WITH_TOKEN
Compiler Error 170. |
| public static final ErrorType | MODE_NOT_IN_LEXER
Compiler Error 120. |
| public static final ErrorType | MODE_WITHOUT_RULES
Compiler Error 145. |
| public final String | msg
The error or warning message, in StringTemplate 4 format using |
| public static final ErrorType | NO_MODEL_TO_TEMPLATE_MAPPING
Compiler Error 34. |
| public static final ErrorType | NO_NON_LR_ALTS
Compiler Error 147. |
| public static final ErrorType | NO_RULES
Compiler Error 99. |
| public static final ErrorType | NO_SUCH_GRAMMAR_SCOPE
Compiler Error 105. |
| public static final ErrorType | NO_SUCH_RULE_IN_SCOPE
Compiler Error 106. |
| public static final ErrorType | |
| public static final ErrorType | OPTIONS_IN_DELEGATE
Compiler Warning 109. |
| public static final ErrorType | OUTPUT_DIR_IS_FILE
Compiler Error 6. |
| public static final ErrorType | PARSER_RULE_REF_IN_LEXER_RULE
Compiler Error 160. |
| public static final ErrorType | PARSER_RULES_NOT_ALLOWED
Compiler Error 53. |
| public static final ErrorType | RANGE_PROBABLY_CONTAINS_NOT_IMPLIED_CHARACTERS
Range probably contains not implied characters. |
| public static final ErrorType | REDUNDANT_CASE_INSENSITIVE_LEXER_RULE_OPTION
Redundant caseInsensitive lexer rule option
options { caseInsensitive=true; }
TOKEN options { caseInsensitive=true; } : [a-z]+ -> caseInsensitive(true); // warning
|
| public static final ErrorType | REPEATED_PREQUEL
Compiler Error 54. |
| public static final ErrorType | RESERVED_RULE_NAME
Compiler Error 159. |
| public static final ErrorType | RETVAL_CONFLICTS_WITH_ARG
Compiler Error 76. |
| public static final ErrorType | RETVAL_CONFLICTS_WITH_RULE
Compiler Error 136. |
| public static final ErrorType | RETVAL_CONFLICTS_WITH_TOKEN
Compiler Error 137. |
| public static final ErrorType | RULE_HAS_NO_ARGS
Compiler Error 80. |
| public static final ErrorType | RULE_REDEFINITION
Compiler Error 51. |
| public static final ErrorType | RULE_WITH_TOO_FEW_ALT_LABELS
Compiler Error 122. |
| public final ErrorSeverity | severity
The error severity. |
| public static final ErrorType | STRING_TEMPLATE_WARNING
Compiler Warning 22. |
| public static final ErrorType | SYNTAX_ERROR
Compiler Error 50. |
| public static final ErrorType | TOKEN_CONFLICTS_WITH_COMMON_CONSTANTS
Compiler Error 171. |
| public static final ErrorType | TOKEN_NAME_REASSIGNMENT
Compiler Warning 108. |
| public static final ErrorType | TOKEN_NAMES_MUST_START_UPPER
Compiler Error 60. |
| public static final ErrorType | TOKEN_RANGE_IN_PARSER
Compiler Warning 181 The token range operator makes no sense in the parser as token types are not ordered (except in implementation). |
| public static final ErrorType | TOKEN_UNREACHABLE
Compiler Warning 184. |
| public static final ErrorType | TOKENS_FILE_SYNTAX_ERROR
Compiler Error 21. |
| public static final ErrorType | UNDEFINED_RULE_IN_NONLOCAL_REF
Compiler Error 57. |
| public static final ErrorType | UNDEFINED_RULE_REF
Compiler Error 56. |
| public static final ErrorType | UNICODE_PROPERTY_NOT_ALLOWED_IN_RANGE
Compiler Error 182. |
| public static final ErrorType | UNKNOWN_ATTRIBUTE_IN_SCOPE
Compiler Error 66. |
| public static final ErrorType | UNKNOWN_LEXER_CONSTANT
Compiler Warning 155. |
| public static final ErrorType | UNKNOWN_RULE_ATTRIBUTE
Compiler Error 65. |
| public static final ErrorType | UNKNOWN_SIMPLE_ATTRIBUTE
Compiler Error 63. |
| public static final ErrorType | UNRECOGNIZED_ASSOC_OPTION
Compiler Warning 157. |
| public static final ErrorType | UNSUPPORTED_REFERENCE_IN_LEXER_SET
Compiler Error 183. |
| public static final ErrorType | UNTERMINATED_STRING_LITERAL
Compiler Error 152. |
| public static final ErrorType | UNWANTED_LEXER_COMMAND_ARGUMENT
Compiler Error 151. |
| public static final ErrorType | USE_OF_BAD_WORD
Compiler Error 134. |
| public static final ErrorType | V3_ASSIGN_IN_TOKENS
Compiler Error 203. |
| public static final ErrorType | V3_GATED_SEMPRED
Compiler Warning 204. |
| public static final ErrorType | V3_LEXER_LABEL
Compiler Warning 201. |
| public static final ErrorType | V3_SYNPRED
Compiler Error 205. |
| public static final ErrorType | V3_TOKENS_SYNTAX
Compiler Warning 202. |
| public static final ErrorType | V3_TREE_GRAMMAR
Compiler Error 200. |
| public static final ErrorType | WARNING_TREATED_AS_ERROR
Compiler Error 10. |
| Access | Constructor and Description |
|---|---|
| private | ErrorType(int
The unique error number. code, String The error message template. msg, ErrorSeverity The error severity. severity)Constructs a new |
| Modifier and Type | Method and Description |
|---|---|
| public static ErrorType | |
| public static ErrorType[] |
| ACTION_REDEFINITION | back to summary |
|---|---|
| public static final ErrorType ACTION_REDEFINITION Compiler Error 94. redefinition of action action | |
| ALL_OPS_NEED_SAME_ASSOC | back to summary |
|---|---|
| public static final ErrorType ALL_OPS_NEED_SAME_ASSOC
Deprecated This warning is no longer applicable with the current syntax for specifying associativity. Compiler Warning 118. all operators of alt alt of left-recursive rule must have same associativity | |
| ALT_LABEL_CONFLICTS_WITH_RULE | back to summary |
|---|---|
| public static final ErrorType ALT_LABEL_CONFLICTS_WITH_RULE Compiler Error 124. rule alt label label conflicts with rule rule | |
| ALT_LABEL_REDEF | back to summary |
|---|---|
| public static final ErrorType ALT_LABEL_REDEF Compiler Error 123. rule alt label label redefined in rule rule1, originally in rule rule2 | |
| ARG_CONFLICTS_WITH_RULE | back to summary |
|---|---|
| public static final ErrorType ARG_CONFLICTS_WITH_RULE Compiler Error 138. parameter parameter conflicts with rule with same name | |
| ARG_CONFLICTS_WITH_TOKEN | back to summary |
|---|---|
| public static final ErrorType ARG_CONFLICTS_WITH_TOKEN Compiler Error 139. parameter parameter conflicts with token with same name | |
| ASSIGNMENT_TO_LIST_LABEL | back to summary |
|---|---|
| public static final ErrorType ASSIGNMENT_TO_LIST_LABEL Compiler Error 135. cannot assign a value to list label label | |
| ATTRIBUTE_IN_LEXER_ACTION | back to summary |
|---|---|
| public static final ErrorType ATTRIBUTE_IN_LEXER_ACTION Compiler Error 128. attribute references not allowed in lexer actions: expression | |
| BAD_OPTION_SET_SYNTAX | back to summary |
|---|---|
| public static final ErrorType BAD_OPTION_SET_SYNTAX Compiler Error 9. invalid | |
| CANNOT_CREATE_TARGET_GENERATOR | back to summary |
|---|---|
| public static final ErrorType CANNOT_CREATE_TARGET_GENERATOR Compiler Error 31. ANTLR cannot generate language code as of version version | |
| CANNOT_FIND_ATTRIBUTE_NAME_IN_DECL | back to summary |
|---|---|
| public static final ErrorType CANNOT_FIND_ATTRIBUTE_NAME_IN_DECL Compiler Error 121. cannot find an attribute name in attribute declaration | |
| CANNOT_FIND_IMPORTED_GRAMMAR | back to summary |
|---|---|
| public static final ErrorType CANNOT_FIND_IMPORTED_GRAMMAR Compiler Error 110. can't find or load grammar grammar from filename | |
| CANNOT_FIND_TOKENS_FILE_GIVEN_ON_CMDLINE | back to summary |
|---|---|
| public static final ErrorType CANNOT_FIND_TOKENS_FILE_GIVEN_ON_CMDLINE Compiler Error 3. cannot find tokens file filename | |
| CANNOT_FIND_TOKENS_FILE_REFD_IN_GRAMMAR | back to summary |
|---|---|
| public static final ErrorType CANNOT_FIND_TOKENS_FILE_REFD_IN_GRAMMAR Compiler Error 114. cannot find tokens file filename | |
| CANNOT_OPEN_FILE | back to summary |
|---|---|
| public static final ErrorType CANNOT_OPEN_FILE Compiler Error 7. cannot find or open file: filename | |
| CANNOT_WRITE_FILE | back to summary |
|---|---|
| public static final ErrorType CANNOT_WRITE_FILE Compiler Error 1. cannot write file filename: reason | |
| CHANNEL_CONFLICTS_WITH_COMMON_CONSTANTS | back to summary |
|---|---|
| public static final ErrorType CHANNEL_CONFLICTS_WITH_COMMON_CONSTANTS Compiler Error 172. can not use or declare channel with reserved name Reserved names: DEFAULT_MODE, SKIP, MORE, EOF, MAX_CHAR_VALUE, MIN_CHAR_VALUE. Can be used but cannot be declared: HIDDEN, DEFAULT_TOKEN_CHANNEL | |
| CHANNEL_CONFLICTS_WITH_MODE | back to summary |
|---|---|
| public static final ErrorType CHANNEL_CONFLICTS_WITH_MODE Compiler Error 162. channel name conflicts with mode with same name | |
| CHANNEL_CONFLICTS_WITH_TOKEN | back to summary |
|---|---|
| public static final ErrorType CHANNEL_CONFLICTS_WITH_TOKEN Compiler Error 161. channel name conflicts with token with same name | |
| CHANNELS_BLOCK_IN_COMBINED_GRAMMAR | back to summary |
|---|---|
| public static final ErrorType CHANNELS_BLOCK_IN_COMBINED_GRAMMAR Compiler Error 164. custom channels are not supported in combined grammars | |
| CHANNELS_BLOCK_IN_PARSER_GRAMMAR | back to summary |
|---|---|
| public static final ErrorType CHANNELS_BLOCK_IN_PARSER_GRAMMAR Compiler Error 163. custom channels are not supported in parser grammars | |
| CHARACTERS_COLLISION_IN_SET | back to summary |
|---|---|
| public static final ErrorType CHARACTERS_COLLISION_IN_SET Compiler Warning 180. chars "a-f" used multiple times in set [a-fc-m] A: [aa-z]; // warning B: [a-fc-m]; // warningTODO: Does not work with fragment rules. | |
| code | back to summary |
|---|---|
| public final int code The error or warning number. The code should be unique, and following its use in a release should not be altered or reassigned. | |
| CODE_GEN_TEMPLATES_INCOMPLETE | back to summary |
|---|---|
| public static final ErrorType CODE_GEN_TEMPLATES_INCOMPLETE Compiler Error 33. missing code generation template template | |
| CODE_TEMPLATE_ARG_ISSUE | back to summary |
|---|---|
| public static final ErrorType CODE_TEMPLATE_ARG_ISSUE Compiler Error 32. code generation template template has missing, misnamed, or incomplete arg list; missing field | |
| CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_CHANNEL_NAME | back to summary |
|---|---|
| public static final ErrorType CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_CHANNEL_NAME Compiler Error 177. name is not a recognized channel name TOKEN: 'a' -> channel(TOKEN1); // error 177 | |
| CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_MODE_NAME | back to summary |
|---|---|
| public static final ErrorType CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_MODE_NAME Compiler Error 176. nameis not a recognized mode name TOKEN: 'a' -> mode(MODE1); // error 176 | |
| CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_TOKEN_NAME | back to summary |
|---|---|
| public static final ErrorType CONSTANT_VALUE_IS_NOT_A_RECOGNIZED_TOKEN_NAME Compiler Error 175. name is not a recognized token name TOKEN: 'a' -> type(CHANNEL1); // error 175 | |
| DIR_NOT_FOUND | back to summary |
|---|---|
| public static final ErrorType DIR_NOT_FOUND Compiler Error 5. directory not found: directory | |
| DUPLICATED_COMMAND | back to summary |
|---|---|
| public static final ErrorType DUPLICATED_COMMAND | |
| EMPTY_STRINGS_AND_SETS_NOT_ALLOWED | back to summary |
|---|---|
| public static final ErrorType EMPTY_STRINGS_AND_SETS_NOT_ALLOWED Compiler Error 174. empty strings and sets not allowed A: '''test'''; B: ''; C: 'test' ''; D: []; E: [f-a]; | |
| EOF_CLOSURE | back to summary |
|---|---|
| public static final ErrorType EOF_CLOSURE rule rule contains a closure with at least one alternative that can match EOF A rule contains a closure ( The following rule produces this error. x : EOF*; // error y : EOF+; // error z : EOF; // ok | |
| EPSILON_CLOSURE | back to summary |
|---|---|
| public static final ErrorType EPSILON_CLOSURE Compiler Error 153. rule rule contains a closure with at least one alternative that can match an empty string A rule contains a closure ( The following rule produces this error.
x : ;
y : x+; // error 153
z1 : ('foo' | 'bar'? 'bar2'?)*; // error 153
z2 : ('foo' | 'bar' 'bar2'? | 'bar2')*; // ok
| |
| EPSILON_LR_FOLLOW | back to summary |
|---|---|
| public static final ErrorType EPSILON_LR_FOLLOW Compiler Error 148. left recursive rule rule contains a left recursive alternative which can be followed by the empty string In left-recursive rules, all left-recursive alternatives must match at least one symbol following the recursive rule invocation. The following rule produces this error. a : ID // ok (alternative is not left recursive) | a INT // ok (a must be follow by INT) | a ID? // error 148 (the ID following a is optional) ; | |
| EPSILON_OPTIONAL | back to summary |
|---|---|
| public static final ErrorType EPSILON_OPTIONAL Compiler Warning 154. rule rule contains an optional block with at least one alternative that can match an empty string A rule contains an optional block ( The following rule produces this warning.
x : ;
y : x?; // warning 154
z1 : ('foo' | 'bar'? 'bar2'?)?; // warning 154
z2 : ('foo' | 'bar' 'bar2'? | 'bar2')?; // ok
| |
| EPSILON_TOKEN | back to summary |
|---|---|
| public static final ErrorType EPSILON_TOKEN Compiler Warning 146. non-fragment lexer rule rule can match the empty string All non-fragment lexer rules must match at least one character. The following example shows this error. Whitespace : [ \t]+; // ok Whitespace : [ \t]; // ok fragment WS : [ \t]*; // ok Whitespace : [ \t]*; // error 146 | |
| ERROR_READING_IMPORTED_GRAMMAR | back to summary |
|---|---|
| public static final ErrorType ERROR_READING_IMPORTED_GRAMMAR Compiler Error 11. cannot find tokens file filename: reason | |
| ERROR_READING_TOKENS_FILE | back to summary |
|---|---|
| public static final ErrorType ERROR_READING_TOKENS_FILE Compiler Error 4. cannot find tokens file filename: reason | |
| EXPECTED_NON_GREEDY_WILDCARD_BLOCK | back to summary |
|---|---|
| public static final ErrorType EXPECTED_NON_GREEDY_WILDCARD_BLOCK Compiler Warning 131. This warning may take any of the following forms.
| |
| FILE_AND_GRAMMAR_NAME_DIFFER | back to summary |
|---|---|
| public static final ErrorType FILE_AND_GRAMMAR_NAME_DIFFER Compiler Error 8. grammar name name and file name filename differ | |
| FRAGMENT_ACTION_IGNORED | back to summary |
|---|---|
| public static final ErrorType FRAGMENT_ACTION_IGNORED Compiler Warning 158. fragment rule rule contains an action or command which can never be executed A lexer rule which is marked with the The following rule produces this warning.
X1 : 'x' -> more // ok
;
Y1 : 'x' {more();} // ok
;
fragment
X2 : 'x' -> more // warning 158
;
fragment
Y2 : 'x' {more();} // warning 158
;
| |
| ILLEGAL_OPTION | back to summary |
|---|---|
| public static final ErrorType ILLEGAL_OPTION Compiler Warning 83. unsupported option option | |
| ILLEGAL_OPTION_VALUE | back to summary |
|---|---|
| public static final ErrorType ILLEGAL_OPTION_VALUE Compiler Warning 84. unsupported option value name=value | |
| IMPLICIT_STRING_DEFINITION | back to summary |
|---|---|
| public static final ErrorType IMPLICIT_STRING_DEFINITION Compiler Error 126. cannot create implicit token for string literal in non-combined grammar: literal | |
| IMPLICIT_TOKEN_DEFINITION | back to summary |
|---|---|
| public static final ErrorType IMPLICIT_TOKEN_DEFINITION Compiler Warning 125. implicit definition of token Token in parser | |
| IMPORT_NAME_CLASH | back to summary |
|---|---|
| public static final ErrorType IMPORT_NAME_CLASH Compiler Error 113. grammartype grammar grammar1 and imported grammartype grammar grammar2 both generate recognizer | |
| INCOMPATIBLE_COMMANDS | back to summary |
|---|---|
| public static final ErrorType INCOMPATIBLE_COMMANDS | |
| INCOMPATIBLE_TOOL_AND_TEMPLATES | back to summary |
|---|---|
| public static final ErrorType INCOMPATIBLE_TOOL_AND_TEMPLATES Compiler Error 35. templates/target and tool aren't compatible | |
| INTERNAL_ERROR | back to summary |
|---|---|
| public static final ErrorType INTERNAL_ERROR Compiler Error 20. internal error: message | |
| INVALID_CMDLINE_ARG | back to summary |
|---|---|
| public static final ErrorType INVALID_CMDLINE_ARG Compiler Error 2. unknown command-line option option | |
| INVALID_ESCAPE_SEQUENCE | back to summary |
|---|---|
| public static final ErrorType INVALID_ESCAPE_SEQUENCE Compiler Error 156. invalid escape sequence The grammar contains a string literal with an invalid escape sequence. The following rule produces this error. x : 'x'; // ok y : '\u'; // error 156
| |
| INVALID_IMPORT | back to summary |
|---|---|
| public static final ErrorType INVALID_IMPORT Compiler Error 111. grammartype grammar grammar1 cannot import grammartype grammar grammar2 | |
| INVALID_LEXER_COMMAND | back to summary |
|---|---|
| public static final ErrorType INVALID_LEXER_COMMAND Compiler Error 149. lexer command command does not exist or is not supported by the current target Each lexer command requires an explicit implementation in the target templates. This error indicates that the command was incorrectly written or is not supported by the current target. The following rule produces this error. X : 'foo' -> type(Foo); // ok Y : 'foo' -> token(Foo); // error 149 (token is not a supported lexer command)
| |
| INVALID_LITERAL_IN_LEXER_SET | back to summary |
|---|---|
| public static final ErrorType INVALID_LITERAL_IN_LEXER_SET Compiler Error 144. multi-character literals are not allowed in lexer sets: literal | |
| INVALID_RULE_PARAMETER_REF | back to summary |
|---|---|
| public static final ErrorType INVALID_RULE_PARAMETER_REF Compiler Error 64. parameter parameter of rule rule is not accessible in this scope: expression | |
| ISOLATED_RULE_REF | back to summary |
|---|---|
| public static final ErrorType ISOLATED_RULE_REF Compiler Error 67. missing attribute access on rule reference rule in expression | |
| LABEL_BLOCK_NOT_A_SET | back to summary |
|---|---|
| public static final ErrorType LABEL_BLOCK_NOT_A_SET Compiler Error 130. label label assigned to a block which is not a set | |
| LABEL_CONFLICTS_WITH_ARG | back to summary |
|---|---|
| public static final ErrorType LABEL_CONFLICTS_WITH_ARG Compiler Error 72. label label conflicts with parameter with same name | |
| LABEL_CONFLICTS_WITH_LOCAL | back to summary |
|---|---|
| public static final ErrorType LABEL_CONFLICTS_WITH_LOCAL Compiler Error 74. label label conflicts with local with same name | |
| LABEL_CONFLICTS_WITH_RETVAL | back to summary |
|---|---|
| public static final ErrorType LABEL_CONFLICTS_WITH_RETVAL Compiler Error 73. label label conflicts with return value with same name | |
| LABEL_CONFLICTS_WITH_RULE | back to summary |
|---|---|
| public static final ErrorType LABEL_CONFLICTS_WITH_RULE Compiler Error 69. label label conflicts with rule with same name | |
| LABEL_CONFLICTS_WITH_TOKEN | back to summary |
|---|---|
| public static final ErrorType LABEL_CONFLICTS_WITH_TOKEN Compiler Error 70. label label conflicts with token with same name | |
| LABEL_TYPE_CONFLICT | back to summary |
|---|---|
| public static final ErrorType LABEL_TYPE_CONFLICT Compiler Error 75. label label type mismatch with previous definition: message | |
| LEFT_RECURSION_CYCLES | back to summary |
|---|---|
| public static final ErrorType LEFT_RECURSION_CYCLES Compiler Error 119. The following sets of rules are mutually left-recursive [rules] | |
| LEXER_ACTION_PLACEMENT_ISSUE | back to summary |
|---|---|
| public static final ErrorType LEXER_ACTION_PLACEMENT_ISSUE
Deprecated This error is no longer issued by ANTLR 4.2. Compiler Error 132. action in lexer rule rule must be last element of single outermost alt | |
| LEXER_COMMAND_PLACEMENT_ISSUE | back to summary |
|---|---|
| public static final ErrorType LEXER_COMMAND_PLACEMENT_ISSUE Compiler Error 133.
| |
| LEXER_RULES_NOT_ALLOWED | back to summary |
|---|---|
| public static final ErrorType LEXER_RULES_NOT_ALLOWED Compiler Error 52. lexer rule rule not allowed in parser | |
| LOCAL_CONFLICTS_WITH_ARG | back to summary |
|---|---|
| public static final ErrorType LOCAL_CONFLICTS_WITH_ARG Compiler Error 142. local local conflicts with parameter with same name | |
| LOCAL_CONFLICTS_WITH_RETVAL | back to summary |
|---|---|
| public static final ErrorType LOCAL_CONFLICTS_WITH_RETVAL Compiler Error 143. local local conflicts with return value with same name | |
| LOCAL_CONFLICTS_WITH_RULE | back to summary |
|---|---|
| public static final ErrorType LOCAL_CONFLICTS_WITH_RULE Compiler Error 140. local local conflicts with rule with same name | |
| LOCAL_CONFLICTS_WITH_TOKEN | back to summary |
|---|---|
| public static final ErrorType LOCAL_CONFLICTS_WITH_TOKEN Compiler Error 141. local local conflicts with rule token same name | |
| MISSING_CODE_GEN_TEMPLATES | back to summary |
|---|---|
| public static final ErrorType MISSING_CODE_GEN_TEMPLATES Compiler Error 30. can't find code generation templates: group | |
| MISSING_LEXER_COMMAND_ARGUMENT | back to summary |
|---|---|
| public static final ErrorType MISSING_LEXER_COMMAND_ARGUMENT Compiler Error 150. missing argument for lexer command command Some lexer commands require an argument. The following rule produces this error. X : 'foo' -> type(Foo); // ok Y : 'foo' -> type; // error 150 (the type command requires an argument)
| |
| MISSING_RULE_ARGS | back to summary |
|---|---|
| public static final ErrorType MISSING_RULE_ARGS Compiler Error 79. missing argument(s) on rule reference: rule | |
| MODE_CONFLICTS_WITH_COMMON_CONSTANTS | back to summary |
|---|---|
| public static final ErrorType MODE_CONFLICTS_WITH_COMMON_CONSTANTS Compiler Error 173. can not use or declare mode with reserved name Reserved names: HIDDEN, DEFAULT_TOKEN_CHANNEL, SKIP, MORE, MAX_CHAR_VALUE, MIN_CHAR_VALUE. Can be used and cannot declared: DEFAULT_MODE | |
| MODE_CONFLICTS_WITH_TOKEN | back to summary |
|---|---|
| public static final ErrorType MODE_CONFLICTS_WITH_TOKEN Compiler Error 170. mode M1; A1: 'a'; // ok mode M2; A2: 'a'; // ok M1: 'b'; // error 170 mode name conflicts with token with same name | |
| MODE_NOT_IN_LEXER | back to summary |
|---|---|
| public static final ErrorType MODE_NOT_IN_LEXER Compiler Error 120. lexical modes are only allowed in lexer grammars | |
| MODE_WITHOUT_RULES | back to summary |
|---|---|
| public static final ErrorType MODE_WITHOUT_RULES Compiler Error 145. lexer mode mode must contain at least one non-fragment rule
Every lexer mode must contain at least one rule which is not declared
with the | |
| msg | back to summary |
|---|---|
| public final String msg The error or warning message, in StringTemplate 4 format using
| |
| NO_MODEL_TO_TEMPLATE_MAPPING | back to summary |
|---|---|
| public static final ErrorType NO_MODEL_TO_TEMPLATE_MAPPING Compiler Error 34. no mapping to template name for output model class class | |
| NO_NON_LR_ALTS | back to summary |
|---|---|
| public static final ErrorType NO_NON_LR_ALTS Compiler Error 147. left recursive rule rule must contain an alternative which is not left recursive Left-recursive rules must contain at least one alternative which is not left recursive. The following rule produces this error. // error 147: a : a ID | a INT ; | |
| NO_RULES | back to summary |
|---|---|
| public static final ErrorType NO_RULES Compiler Error 99. This error may take any of the following forms.
| |
| NO_SUCH_GRAMMAR_SCOPE | back to summary |
|---|---|
| public static final ErrorType NO_SUCH_GRAMMAR_SCOPE Compiler Error 105. reference to undefined grammar in rule reference: grammar.rule | |
| NO_SUCH_RULE_IN_SCOPE | back to summary |
|---|---|
| public static final ErrorType NO_SUCH_RULE_IN_SCOPE Compiler Error 106. rule rule is not defined in grammar grammar | |
| NONCONFORMING_LR_RULE | back to summary |
|---|---|
| public static final ErrorType NONCONFORMING_LR_RULE | |
| OPTIONS_IN_DELEGATE | back to summary |
|---|---|
| public static final ErrorType OPTIONS_IN_DELEGATE Compiler Warning 109. options ignored in imported grammar grammar | |
| OUTPUT_DIR_IS_FILE | back to summary |
|---|---|
| public static final ErrorType OUTPUT_DIR_IS_FILE Compiler Error 6. output directory is a file: filename | |
| PARSER_RULE_REF_IN_LEXER_RULE | back to summary |
|---|---|
| public static final ErrorType PARSER_RULE_REF_IN_LEXER_RULE Compiler Error 160. reference to parser rule rule in lexer rule name
| |
| PARSER_RULES_NOT_ALLOWED | back to summary |
|---|---|
| public static final ErrorType PARSER_RULES_NOT_ALLOWED Compiler Error 53. parser rule rule not allowed in lexer | |
| RANGE_PROBABLY_CONTAINS_NOT_IMPLIED_CHARACTERS | back to summary |
|---|---|
| public static final ErrorType RANGE_PROBABLY_CONTAINS_NOT_IMPLIED_CHARACTERS Range probably contains not implied characters. Both bounds should be defined in lower or UPPER case For instance, the range [A-z] (ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy) probably contains not implied characters: [\]^_` Use the following definition: [A-Za-z] If the characters are implied, include them explicitly: [A-Za-z[\\\]^_`] TOKEN: [A-z]; // warning | |
| REDUNDANT_CASE_INSENSITIVE_LEXER_RULE_OPTION | back to summary |
|---|---|
| public static final ErrorType REDUNDANT_CASE_INSENSITIVE_LEXER_RULE_OPTION Redundant caseInsensitive lexer rule option
options { caseInsensitive=true; }
TOKEN options { caseInsensitive=true; } : [a-z]+ -> caseInsensitive(true); // warning
| |
| REPEATED_PREQUEL | back to summary |
|---|---|
| public static final ErrorType REPEATED_PREQUEL Compiler Error 54.
repeated grammar prequel spec ( | |
| RESERVED_RULE_NAME | back to summary |
|---|---|
| public static final ErrorType RESERVED_RULE_NAME Compiler Error 159. cannot declare a rule with reserved name rule A rule was declared with a reserved name. The following rule produces this error.
EOF : ' ' // error 159 (EOF is a reserved name)
;
| |
| RETVAL_CONFLICTS_WITH_ARG | back to summary |
|---|---|
| public static final ErrorType RETVAL_CONFLICTS_WITH_ARG Compiler Error 76. return value name conflicts with parameter with same name | |
| RETVAL_CONFLICTS_WITH_RULE | back to summary |
|---|---|
| public static final ErrorType RETVAL_CONFLICTS_WITH_RULE Compiler Error 136. return value name conflicts with rule with same name | |
| RETVAL_CONFLICTS_WITH_TOKEN | back to summary |
|---|---|
| public static final ErrorType RETVAL_CONFLICTS_WITH_TOKEN Compiler Error 137. return value name conflicts with token with same name | |
| RULE_HAS_NO_ARGS | back to summary |
|---|---|
| public static final ErrorType RULE_HAS_NO_ARGS Compiler Error 80. rule rule has no defined parameters | |
| RULE_REDEFINITION | back to summary |
|---|---|
| public static final ErrorType RULE_REDEFINITION Compiler Error 51. rule rule redefinition; previous at line line | |
| RULE_WITH_TOO_FEW_ALT_LABELS | back to summary |
|---|---|
| public static final ErrorType RULE_WITH_TOO_FEW_ALT_LABELS Compiler Error 122. rule rule: must label all alternatives or none | |
| severity | back to summary |
|---|---|
| public final ErrorSeverity severity The error severity. | |
| STRING_TEMPLATE_WARNING | back to summary |
|---|---|
| public static final ErrorType STRING_TEMPLATE_WARNING Compiler Warning 22. template error: message | |
| SYNTAX_ERROR | back to summary |
|---|---|
| public static final ErrorType SYNTAX_ERROR Compiler Error 50. syntax error: message | |
| TOKEN_CONFLICTS_WITH_COMMON_CONSTANTS | back to summary |
|---|---|
| public static final ErrorType TOKEN_CONFLICTS_WITH_COMMON_CONSTANTS Compiler Error 171. can not use or declare token with reserved name Reserved names: HIDDEN, DEFAULT_TOKEN_CHANNEL, SKIP, MORE, MAX_CHAR_VALUE, MIN_CHAR_VALUE. Can be used but cannot be declared: EOF | |
| TOKEN_NAME_REASSIGNMENT | back to summary |
|---|---|
| public static final ErrorType TOKEN_NAME_REASSIGNMENT Compiler Warning 108. token name Token is already defined | |
| TOKEN_NAMES_MUST_START_UPPER | back to summary |
|---|---|
| public static final ErrorType TOKEN_NAMES_MUST_START_UPPER Compiler Error 60. token names must start with an uppercase letter: name | |
| TOKEN_RANGE_IN_PARSER | back to summary |
|---|---|
| public static final ErrorType TOKEN_RANGE_IN_PARSER Compiler Warning 181 The token range operator makes no sense in the parser as token types are not ordered (except in implementation). grammar T; a : 'A'..'Z' ; | |
| TOKEN_UNREACHABLE | back to summary |
|---|---|
| public static final ErrorType TOKEN_UNREACHABLE Compiler Warning 184. The token value overlapped by another token or self TOKEN1: 'value'; TOKEN2: 'value'; // warning | |
| TOKENS_FILE_SYNTAX_ERROR | back to summary |
|---|---|
| public static final ErrorType TOKENS_FILE_SYNTAX_ERROR Compiler Error 21. .tokens file syntax error filename: message | |
| UNDEFINED_RULE_IN_NONLOCAL_REF | back to summary |
|---|---|
| public static final ErrorType UNDEFINED_RULE_IN_NONLOCAL_REF Compiler Error 57. reference to undefined rule rule in non-local ref reference | |
| UNDEFINED_RULE_REF | back to summary |
|---|---|
| public static final ErrorType UNDEFINED_RULE_REF Compiler Error 56. reference to undefined rule: rule
| |
| UNICODE_PROPERTY_NOT_ALLOWED_IN_RANGE | back to summary |
|---|---|
| public static final ErrorType UNICODE_PROPERTY_NOT_ALLOWED_IN_RANGE Compiler Error 182. Unicode properties cannot be part of a lexer charset range
A: [\\p{Letter}-\\p{Number}];
| |
| UNKNOWN_ATTRIBUTE_IN_SCOPE | back to summary |
|---|---|
| public static final ErrorType UNKNOWN_ATTRIBUTE_IN_SCOPE Compiler Error 66. attribute attribute isn't a valid property in expression | |
| UNKNOWN_LEXER_CONSTANT | back to summary |
|---|---|
| public static final ErrorType UNKNOWN_LEXER_CONSTANT Compiler Warning 155. rule rule contains a lexer command with an unrecognized constant value; lexer interpreters may produce incorrect output A lexer rule contains a standard lexer command, but the constant value argument for the command is an unrecognized string. As a result, the lexer command will be translated as a custom lexer action, preventing the command from executing in some interpreted modes. The output of the lexer interpreter may not match the output of the generated lexer. The following rule produces this warning.
@members {
public static final int CUSTOM = HIDDEN + 1;
}
X : 'foo' -> channel(HIDDEN); // ok
Y : 'bar' -> channel(CUSTOM); // warning 155
| |
| UNKNOWN_RULE_ATTRIBUTE | back to summary |
|---|---|
| public static final ErrorType UNKNOWN_RULE_ATTRIBUTE Compiler Error 65. unknown attribute attribute for rule rule in expression | |
| UNKNOWN_SIMPLE_ATTRIBUTE | back to summary |
|---|---|
| public static final ErrorType UNKNOWN_SIMPLE_ATTRIBUTE Compiler Error 63. unknown attribute reference attribute in expression | |
| UNRECOGNIZED_ASSOC_OPTION | back to summary |
|---|---|
| public static final ErrorType UNRECOGNIZED_ASSOC_OPTION Compiler Warning 157. rule rule contains an assoc element option in an unrecognized location
In ANTLR 4.2, the position of the The following rule produces this warning. x : 'x' | x '+'<assoc=right> x // warning 157 |<assoc=right> x * x // ok ;
| |
| UNSUPPORTED_REFERENCE_IN_LEXER_SET | back to summary |
|---|---|
| public static final ErrorType UNSUPPORTED_REFERENCE_IN_LEXER_SET Compiler Error 183. rule reference rule is not currently supported in a set | |
| UNTERMINATED_STRING_LITERAL | back to summary |
|---|---|
| public static final ErrorType UNTERMINATED_STRING_LITERAL Compiler Error 152. unterminated string literal The grammar contains an unterminated string literal. The following rule produces this error. x : 'x'; // ok y : 'y'; // error 152
| |
| UNWANTED_LEXER_COMMAND_ARGUMENT | back to summary |
|---|---|
| public static final ErrorType UNWANTED_LEXER_COMMAND_ARGUMENT Compiler Error 151. lexer command command does not take any arguments A lexer command which does not take parameters was invoked with an argument. The following rule produces this error. X : 'foo' -> popMode; // ok Y : 'foo' -> popMode(A); // error 151 (the popMode command does not take an argument)
| |
| USE_OF_BAD_WORD | back to summary |
|---|---|
| public static final ErrorType USE_OF_BAD_WORD
Deprecated
Compiler Error 134. symbol symbol conflicts with generated code in target language or runtime | |
| V3_ASSIGN_IN_TOKENS | back to summary |
|---|---|
| public static final ErrorType V3_ASSIGN_IN_TOKENS
Deprecated
Compiler Error 203.
assignments in
ANTLR 3 allowed literal tokens to be declared and assigned a value within
the | |
| V3_GATED_SEMPRED | back to summary |
|---|---|
| public static final ErrorType V3_GATED_SEMPRED
Deprecated
Compiler Warning 204.
ANTLR 4 treats semantic predicates consistently in a manner similar to gated semantic predicates in ANTLR 3. When migrating a grammar from ANTLR 3 to ANTLR 4, all uses of the gated semantic predicate syntax can be safely converted to the standard semantic predicated syntax, which is the only form used by ANTLR 4. | |
| V3_LEXER_LABEL | back to summary |
|---|---|
| public static final ErrorType V3_LEXER_LABEL
Deprecated
Compiler Warning 201.
labels in lexer rules are not supported in ANTLR 4; actions cannot
reference elements of lexical rules but you can use
ANTLR 4 uses a DFA for recognition of entire tokens, resulting in faster and smaller lexers than ANTLR 3 produced. As a result, sub-rules referenced within lexer rules are not tracked independently, and cannot be assigned to labels. | |
| V3_SYNPRED | back to summary |
|---|---|
| public static final ErrorType V3_SYNPRED
Deprecated
Compiler Error 205.
ANTLR 4's improved lookahead algorithms do not require the use of syntactic predicates to disambiguate long lookahead sequences. The syntactic predicates should be removed when migrating a grammar from ANTLR 3 to ANTLR 4. | |
| V3_TOKENS_SYNTAX | back to summary |
|---|---|
| public static final ErrorType V3_TOKENS_SYNTAX
Deprecated
Compiler Warning 202.
ANTLR 4 uses comma-separated token declarations in the Note ANTLR 4 does not allow a trailing comma to appear following the
last token declared in the | |
| V3_TREE_GRAMMAR | back to summary |
|---|---|
| public static final ErrorType V3_TREE_GRAMMAR
Deprecated
Compiler Error 200. tree grammars are not supported in ANTLR 4 This error message is provided as a compatibility notice for users migrating from ANTLR 3. ANTLR 4 does not support tree grammars, but instead offers automatically generated parse tree listeners and visitors as a more maintainable alternative. | |
| WARNING_TREATED_AS_ERROR | back to summary |
|---|---|
| public static final ErrorType WARNING_TREATED_AS_ERROR Compiler Error 10. warning treated as error | |
| ErrorType | back to summary |
|---|---|
| private ErrorType(int code, String msg, ErrorSeverity severity) Constructs a new
| |
| valueOf | back to summary |
|---|---|
| public static ErrorType valueOf(String name) | |
| values | back to summary |
|---|---|
| public static ErrorType[] values() | |