| | 1 | #ifdef RCSID |
| | 2 | static char RCSid[] = |
| | 3 | "$Header$"; |
| | 4 | #endif |
| | 5 | |
| | 6 | /* |
| | 7 | * Copyright (c) 2000, 2002 Michael J. Roberts. All Rights Reserved. |
| | 8 | * |
| | 9 | * Please see the accompanying license file, LICENSE.TXT, for information |
| | 10 | * on using and copying this software. |
| | 11 | */ |
| | 12 | /* |
| | 13 | Name |
| | 14 | tcerrmsg.cpp - TADS 3 Compiler error message text |
| | 15 | Function |
| | 16 | Defines the error message strings for the TADS 3 compiler. The message |
| | 17 | strings are all isolated in this module to allow for easy replacement |
| | 18 | for translated versions. |
| | 19 | Notes |
| | 20 | |
| | 21 | Modified |
| | 22 | 05/13/00 MJRoberts - Creation |
| | 23 | */ |
| | 24 | |
| | 25 | #include "tcerr.h" |
| | 26 | #include "tcerrnum.h" |
| | 27 | |
| | 28 | /* ------------------------------------------------------------------------ */ |
| | 29 | /* |
| | 30 | * Error Messages - fixed English version; these can be replaced at |
| | 31 | * run-time by messages loaded from an external file, but we compile in an |
| | 32 | * English set as a fallback in case there's no message file. |
| | 33 | * |
| | 34 | * The messages must be sorted by message number, so that we can perform a |
| | 35 | * binary search to look up a message by number. |
| | 36 | */ |
| | 37 | const err_msg_t tc_messages_english[] = |
| | 38 | { |
| | 39 | { TCERR_LINE_MEM, |
| | 40 | "out of memory for line source", |
| | 41 | "Out of memory for line source. The source line may be too long, " |
| | 42 | "or you may need to make more memory available to the compiler " |
| | 43 | "by closing other applications." }, |
| | 44 | |
| | 45 | { TCERR_INV_PP_DIR, |
| | 46 | "invalid preprocessor directive", |
| | 47 | "\"%~.*s\" is not a valid preprocessor '#' directive." }, |
| | 48 | |
| | 49 | { TCERR_CANT_LOAD_CHARSET, |
| | 50 | "unable to load #charset", |
| | 51 | "Unable to load the character set specified in the #charset directive. " |
| | 52 | "Check the spelling of the character set name, and make sure that " |
| | 53 | "a character mapping file (with a name ending in \".TCM\") is " |
| | 54 | "available. Refer to the compiler's installation notes for your " |
| | 55 | "type of computer for details." }, |
| | 56 | |
| | 57 | { TCERR_UNEXPECTED_CHARSET, |
| | 58 | "unexpected or invalid #charset", |
| | 59 | "Unexpected or invalid #charset directive. This directive must " |
| | 60 | "be at the very beginning of the file, and must specify a character " |
| | 61 | "set name enclosed in double quotes." }, |
| | 62 | |
| | 63 | { TCERR_BAD_INC_SYNTAX, |
| | 64 | "syntax error in #include", |
| | 65 | "Invalid #include syntax - the filename must be enclosed with " |
| | 66 | "'\"' or '< >' characters." }, |
| | 67 | |
| | 68 | { TCERR_INC_NOT_FOUND, |
| | 69 | "cannot open include file \"%.*s\"", |
| | 70 | "The compiler cannot access the #include file \"%.*s\". " |
| | 71 | "Check the filename to ensure that it's spelled correctly, and check " |
| | 72 | "the compiler's include path setting (command line \"-I\" options) " |
| | 73 | "to ensure that the compiler is searching in the directory or folder " |
| | 74 | "containing the file. If the file exists, make sure that it's not " |
| | 75 | "being used by another application and that you have permission " |
| | 76 | "to read the file." }, |
| | 77 | |
| | 78 | { TCERR_REDUNDANT_INCLUDE, |
| | 79 | "file \"%.*s\" previously included; ignored", |
| | 80 | "The #include file \"%.*s\" has already been included. " |
| | 81 | "This redundant inclusion will be ignored." }, |
| | 82 | |
| | 83 | { TCERR_BAD_DEFINE_SYM, |
| | 84 | "invalid symbol \"%~.*s\" for #define", |
| | 85 | "Invalid symbol \"%~.*s\" for #define. A #define symbol must start " |
| | 86 | "with an ASCII letter or underscore symbol '_', and must contain " |
| | 87 | "only ASCII letters, digits, and underscores." }, |
| | 88 | |
| | 89 | { TCERR_MACRO_NO_RPAR, |
| | 90 | "missing ')' in macro parameter list", |
| | 91 | "The macro parameter list is missing a right parenthesis ')' at " |
| | 92 | "the end of the list." }, |
| | 93 | |
| | 94 | { TCERR_BAD_MACRO_ARG_NAME, |
| | 95 | "invalid macro parameter name \"%~.*s\"", |
| | 96 | "Invalid macro parameter name \"%~.*s\". A macro parameter name must " |
| | 97 | "start with an ASCII letter or underscore symbol '_', and must contain " |
| | 98 | "only ASCII letters, digits, and underscores." }, |
| | 99 | |
| | 100 | { TCERR_MACRO_EXP_COMMA, |
| | 101 | "expected ',' or ')' in macro parameter list (found \"%~.*s\")", |
| | 102 | "Expected a comma ',' or right parenthesis ')' in the macro " |
| | 103 | "parameter list, but found \"%~.*s\"." }, |
| | 104 | |
| | 105 | { TCERR_MACRO_REDEF, |
| | 106 | "redefinition of macro \"%~.*s\"", |
| | 107 | "Macro \"%~.*s\" has been previously defined; this new definition " |
| | 108 | "replaces the previous definition." }, |
| | 109 | |
| | 110 | { TCERR_UNKNOWN_PRAGMA, |
| | 111 | "unrecognized #pragma \"%~.*s\"; ignored", |
| | 112 | "Unrecognized #pragma \"%~.*s\"; ignored. (The compiler ignores " |
| | 113 | "#pragma directives that it doesn't understand, in case you're " |
| | 114 | "using a #pragma meant for another compiler, but if you meant " |
| | 115 | "the #pragma for this compiler, you need to correct a problem " |
| | 116 | "with it.)" }, |
| | 117 | |
| | 118 | { TCERR_BAD_PRAGMA_SYNTAX, |
| | 119 | "invalid syntax for #pragma", |
| | 120 | "Invalid syntax for #pragma." }, |
| | 121 | |
| | 122 | { TCERR_PP_EXTRA, |
| | 123 | "extra characters on line", |
| | 124 | "Extra characters found after the end of the preprocessor directive. " |
| | 125 | "Check the syntax and remove the extraneous characters at the " |
| | 126 | "end of the line." }, |
| | 127 | |
| | 128 | { TCERR_IF_NESTING_OVERFLOW, |
| | 129 | "#if nesting too deep", |
| | 130 | "#if/#ifdef nesting is too deep - you have specified more " |
| | 131 | "#if's within other #if's than the compiler allows. (The compiler " |
| | 132 | "has an internal limit on this nesting; you must simplify the " |
| | 133 | "nested #if structure of your source code.)" }, |
| | 134 | |
| | 135 | { TCERR_PP_ELSE_WITHOUT_IF, |
| | 136 | "#else without #if", |
| | 137 | "#else without a matching #if or #ifdef." }, |
| | 138 | |
| | 139 | { TCERR_PP_ENDIF_WITHOUT_IF, |
| | 140 | "#endif without #if", |
| | 141 | "#endif without a matching #if or #ifdef." }, |
| | 142 | |
| | 143 | { TCERR_PP_ELIF_WITHOUT_IF, |
| | 144 | "#elif without #if", |
| | 145 | "#elif without a matching #if." }, |
| | 146 | |
| | 147 | { TCERR_PP_INT_REQUIRED, |
| | 148 | "integer value required in preprocessor constant expression", |
| | 149 | "Incorrect value in preprocessor constant expression - an integer " |
| | 150 | "value is required." }, |
| | 151 | |
| | 152 | { TCERR_PP_INCOMP_TYPES, |
| | 153 | "incompatible types for comparison operator", |
| | 154 | "Incompatible types for comparison in preprocessor constant " |
| | 155 | "expression." }, |
| | 156 | |
| | 157 | { TCERR_PP_EXPR_EXTRA, |
| | 158 | "extra characters at end of line", |
| | 159 | "Extra characters found after end of preprocessor constant " |
| | 160 | "expression. Check the syntax of the expression and remove any " |
| | 161 | "extraneous characters at the end of the line." }, |
| | 162 | |
| | 163 | { TCERR_PP_DIV_ZERO, |
| | 164 | "divide by zero in constant expression", |
| | 165 | "Division by zero in preprocessor constant expression." }, |
| | 166 | |
| | 167 | { TCERR_PP_INVALID_VALUE, |
| | 168 | "expected number, symbol, or string (found \"%~.*s\")", |
| | 169 | "Expected a number, symbol, or single-quoted string in preprocessor " |
| | 170 | "constant expression, but found \"%~.*s\"." }, |
| | 171 | |
| | 172 | { TCERR_PP_UNTERM_STRING, |
| | 173 | "unterminated string in preprocessor constant expression", |
| | 174 | "Unterminated string found in a preprocessor constant expression. " |
| | 175 | "(A string in a preprocessor expression must be contained entirely " |
| | 176 | "on a single line.)" }, |
| | 177 | |
| | 178 | { TCERR_PP_UNMATCHED_LPAR, |
| | 179 | "unmatched '('", |
| | 180 | "Unmatched left parenthesis '(' in preprocessor constant expression." }, |
| | 181 | |
| | 182 | { TCERR_PP_BAD_NOT_VAL, |
| | 183 | "integer value required for '!' operator", |
| | 184 | "Integer value is required for '!' operator in preprocessor " |
| | 185 | "expression." }, |
| | 186 | |
| | 187 | { TCERR_PP_MACRO_ARG_RPAR_1LINE, |
| | 188 | "missing ')' in argument list for macro \"%~.*s\"", |
| | 189 | "Missing right parenthesis ')' in argument list in invocation of " |
| | 190 | "macro \"%~.*s\". The entire argument list must be on a single " |
| | 191 | "logical line for a line with a preprocessor directive (but you can " |
| | 192 | "extend the logical line over several physical lines by ending each " |
| | 193 | "line but the last with a backslash '\\')." }, |
| | 194 | |
| | 195 | { TCERR_PP_NO_MACRO_ARGS, |
| | 196 | "missing argument list for macro \"%~.*s\"", |
| | 197 | "An argument list must be specified in invocation of macro \"%~.*s\"." }, |
| | 198 | |
| | 199 | { TCERR_PP_FEW_MACRO_ARGS, |
| | 200 | "not enough arguments for macro \"%~.*s\"", |
| | 201 | "Not enough arguments are specified in invocation of macro \"%~.*s\"." }, |
| | 202 | |
| | 203 | { TCERR_PP_MACRO_ARG_RPAR, |
| | 204 | "missing ')' in argument list for macro \"%~.*s\"", |
| | 205 | "Missing right parenthesis ')' in argument list in " |
| | 206 | "invocation of macro \"%~.*s\"." }, |
| | 207 | |
| | 208 | { TCERR_PP_MANY_MACRO_ARGS, |
| | 209 | "too many arguments for macro \"%~.*s\"", |
| | 210 | "Too many arguments found in invocation of macro \"%~.*s\". (The " |
| | 211 | "macro was defined to take fewer arguments. Check the definition " |
| | 212 | "of the macro for proper usage, and make sure that all of the " |
| | 213 | "parentheses in the macro invocation are properly matched.)" }, |
| | 214 | |
| | 215 | { TCERR_PP_DEFINED_NO_SYM, |
| | 216 | "symbol required for defined() (found \"%~.*s\")", |
| | 217 | "Symbol required for defined() preprocessor operator " |
| | 218 | "(found \"%~.*s\" instead.)" }, |
| | 219 | |
| | 220 | { TCERR_PP_DEFINED_RPAR, |
| | 221 | "missing ')' in defined()", |
| | 222 | "Missing right parenthesis ')' in defined() preprocess operator." }, |
| | 223 | |
| | 224 | { TCERR_SYMBOL_TRUNCATED, |
| | 225 | "symbol \"%~.*s\" truncated to \"%~.*s\"", |
| | 226 | "The symbol \"%~.*s\" is too long; it has been truncated to \"%~.*s\". " |
| | 227 | "(The compiler limits the length of each symbol name; you must make " |
| | 228 | "this symbol name shorter.)" }, |
| | 229 | |
| | 230 | { TCERR_TOO_MANY_MAC_PARMS, |
| | 231 | "too many parameters for macro \"%~.*s\" (maximum %d)", |
| | 232 | "Too many formal parameters are defined for macro " |
| | 233 | "\"%~.*s\". (The compiler imposes a limit of %d parameters per macro.)" }, |
| | 234 | |
| | 235 | { TCERR_NO_STRBUF_MEM, |
| | 236 | "out of memory for string buffer", |
| | 237 | "Out of memory for string buffer. You may need to " |
| | 238 | "close other applications to make more memory available for " |
| | 239 | "the compiler." }, |
| | 240 | |
| | 241 | { TCERR_CANT_OPEN_SRC, |
| | 242 | "unable to open source file \"%.*s\"", |
| | 243 | "Unable to open source file \"%.*s\" - check that the filename " |
| | 244 | "is spelled correctly, and check that the file exists and that you " |
| | 245 | "have permission to open the file for reading." }, |
| | 246 | |
| | 247 | { TCERR_ERROR_DIRECTIVE, |
| | 248 | "#error : %.*s", |
| | 249 | "#error : %.*s" }, |
| | 250 | |
| | 251 | { TCERR_OUT_OF_MEM_MAC_EXP, |
| | 252 | "out of memory for macro expansion", |
| | 253 | "Out of memory for macro expansion. You may need to " |
| | 254 | "close other applications to make more memory available for " |
| | 255 | "the compiler." }, |
| | 256 | |
| | 257 | { TCERR_LINE_REQ_INT, |
| | 258 | "integer value required for #line", |
| | 259 | "An integer value is required for the line number in the #line " |
| | 260 | "directive." }, |
| | 261 | |
| | 262 | { TCERR_LINE_FILE_REQ_STR, |
| | 263 | "string value required for #line", |
| | 264 | "A string value is required for the filename in the #line directive." }, |
| | 265 | |
| | 266 | { TCERR_IF_WITHOUT_ENDIF, |
| | 267 | "#if without #endif (line %ld, file %.*s)", |
| | 268 | "The #if directive at line %ld of file %.*s has no matching #endif " |
| | 269 | "(a matching #endif is required in the same file as the #if)." }, |
| | 270 | |
| | 271 | { TCERR_UNSPLICE_NOT_CUR, |
| | 272 | "unsplicing invalid line", |
| | 273 | "Unsplicing invalid line." }, |
| | 274 | |
| | 275 | { TCERR_MULTI_UNSPLICE, |
| | 276 | "too much unsplicing", |
| | 277 | "Too much unsplicing." }, |
| | 278 | |
| | 279 | { TCERR_PP_ELIF_NOT_IN_SAME_FILE, |
| | 280 | "#elif without #if", |
| | 281 | "#elif without #if - an entire #if-#elif-#else-#endif sequence must " |
| | 282 | "all be contained within a single file; this #elif appears to " |
| | 283 | "correspond to a #if in the including file." }, |
| | 284 | |
| | 285 | { TCERR_PP_ELSE_NOT_IN_SAME_FILE, |
| | 286 | "#else without #if", |
| | 287 | "#else without #if - an entire #if-#elif-#else-#endif sequence must " |
| | 288 | "all be contained within a single file; this #else appears to " |
| | 289 | "correspond to a #if in the including file." }, |
| | 290 | |
| | 291 | { TCERR_PP_ENDIF_NOT_IN_SAME_FILE, |
| | 292 | "#endif without #if", |
| | 293 | "#endif without #if - an entire #if-#elif-#else-#endif sequence must " |
| | 294 | "all be contained within a single file; this #endif appears to " |
| | 295 | "correspond to a #if in the including file." }, |
| | 296 | |
| | 297 | { TCERR_REDEF_OP_DEFINED, |
| | 298 | "cannot #define reserved preprocessor symbol \"defined\"", |
| | 299 | "You cannot #define \"defined\" as a macro - this symbol is reserved " |
| | 300 | "as a preprocessor keyword and cannot be defined as a macro name." }, |
| | 301 | |
| | 302 | { TCERR_POSSIBLE_UNTERM_STR, |
| | 303 | "string appears unterminated (';' or '}' appears alone on line %ld)", |
| | 304 | "This string appears unterminated, because ';' or '}' appears on a line " |
| | 305 | "with no other non-blank characters (at line %ld) within the string. " |
| | 306 | "Check the string for proper termination; if the string is " |
| | 307 | "properly terminated and the ';' or '}' is meant to be part of the " |
| | 308 | "string, move the ';' or '}' onto the next or previous line to group " |
| | 309 | "it with at least one other non-whitespace character, so that it " |
| | 310 | "doesn't confuse the compiler" }, |
| | 311 | |
| | 312 | { TCERR_SRCLINE_TOO_LONG, |
| | 313 | "source line too long (exceeds maximum line length %ld bytes)", |
| | 314 | "This source line is too long - it exceeds the internal compiler " |
| | 315 | "limit of %ld bytes per source line. (The compiler's idea of the " |
| | 316 | "length of the logical source line may be longer than the line appears " |
| | 317 | "to be in the source file, because the compiler limit applies to the " |
| | 318 | "line after expansion of macros, assembly of all parts of any string " |
| | 319 | "that runs across several lines into a single line, and splicing of " |
| | 320 | "any lines that end in backslash characters '\\'. You must reduce " |
| | 321 | "the length of the logical source line; check in particular for any " |
| | 322 | "quoted strings that run across several lines. " }, |
| | 323 | |
| | 324 | { TCERR_INVALID_CHAR, |
| | 325 | "invalid character in input \"%~.*s\"", |
| | 326 | "Invalid character in input: \"%~.*s\". This character is not valid " |
| | 327 | "in any symbol name or as punctuation in source code; the character " |
| | 328 | "will be ignored. Check for missing quotes around a string, a missing " |
| | 329 | "ending quote for a string just before this point, or for " |
| | 330 | "a quote mark embedded within an earlier string (if you want to use " |
| | 331 | "a quote mark within a string, you must precede the quote mark with " |
| | 332 | "a backslash '\\')." }, |
| | 333 | |
| | 334 | { TCERR_PP_QC_MISSING_COLON, |
| | 335 | "missing colon ':' after conditional operator '?' in preprocessor " |
| | 336 | "expression", |
| | 337 | "The preprocessor constant conditional expression on this line is " |
| | 338 | "missing the colon ':' part. A question-mark operator '?' must be " |
| | 339 | "followed by the true-part, then a colon ':', then the false-part. " |
| | 340 | "Check the expression to ensure proper placement of parentheses, " |
| | 341 | "and check for other errors in the expression syntax. " }, |
| | 342 | |
| | 343 | { TCERR_PP_EXPR_NOT_CONST, |
| | 344 | "preprocessor expression is not a constant value", |
| | 345 | "The preprocessor expression given does not have a constant value. " |
| | 346 | "A preprocessor expression (in a #if, #elif, or #line directive) " |
| | 347 | "must use only numbers and strings, or #define symbols defined as " |
| | 348 | "numbers or strings. Preprocessor expressions cannot include " |
| | 349 | "variables, function calls, property references, or other values " |
| | 350 | "that do not have a constant value during compilation." }, |
| | 351 | |
| | 352 | { TCERR_CANT_LOAD_DEFAULT_CHARSET, |
| | 353 | "can't load mapping file for default character set \"%s\"", |
| | 354 | "The compiler cannot open the mapping file for the default " |
| | 355 | "character set, \"%s\". Make sure that a mapping file for this " |
| | 356 | "character set (with the same name as the character set plus the " |
| | 357 | "suffix \".TCM\") is properly installed on your system. Refer " |
| | 358 | "to the compiler's installation notes for your type of " |
| | 359 | "computer for details. You might need to re-install the compiler." }, |
| | 360 | |
| | 361 | { TCERR_MACRO_ELLIPSIS_REQ_RPAR, |
| | 362 | "'...' in macro formal parameter list must be followed by ')' - " |
| | 363 | "found \"%~.*s\"", |
| | 364 | "An ellipsis '...' in a macro formal parameter list can only be " |
| | 365 | "used with the last parameter to the macro, so it must be immediately " |
| | 366 | "followed by a close parenthesis ')' - the compiler found \"%~.*s\" " |
| | 367 | "instead. Check the macro definition syntax and insert the missing " |
| | 368 | "parenthesis." }, |
| | 369 | |
| | 370 | { TCERR_PP_FOREACH_TOO_DEEP, |
| | 371 | "#foreach/#ifempty/#ifnempty nesting too deep", |
| | 372 | "This line uses a macro whose expansion has too many nested uses " |
| | 373 | "of #foreach, #ifempty, and #ifnempty for its variable arguments. " |
| | 374 | "You must simplify the expansion text to reduce the nesting (in " |
| | 375 | "other words, you must reduce the number of these constructs that " |
| | 376 | "are contained within the expansion areas of others of these " |
| | 377 | "same constructs)." }, |
| | 378 | |
| | 379 | { TCERR_TRAILING_SP_AFTER_BS, |
| | 380 | "line ends with whitespace following backslash", |
| | 381 | "This line ends with one or more whitespace characters (space, tab, " |
| | 382 | "etc.) following a backslash '\\'. A backslash at the end of a line " |
| | 383 | "is most frequently used to indicate a continuation line, where " |
| | 384 | "a long preprocessor directive is broken up over several lines " |
| | 385 | "in the source file. To indicate line continuation, though, the " |
| | 386 | "backslash must be the very last character on the line; because of " |
| | 387 | "the extra whitespace after the backslash on this line, the " |
| | 388 | "preprocessor must treat the backslash as quoting the whitespace " |
| | 389 | "character that follows. If you meant to indicate line continuation, " |
| | 390 | "remove the trailing whitspace. If you actually intended to escape " |
| | 391 | "the whitespace character, you can suppress this warning by adding " |
| | 392 | "a comment (a simple '//' is adequate) at the end of the line." }, |
| | 393 | |
| | 394 | { TCERR_EXTRA_INC_SYNTAX, |
| | 395 | "extraneous characters following #include filename", |
| | 396 | "This #include line has extra characters after the name of the file. " |
| | 397 | "The only thing allowed on a #include line is the filename, enclosed " |
| | 398 | "in quotes (\"filename\") or angle brackets (<filename>). This line " |
| | 399 | "has extra characters after the filename specification. Check the " |
| | 400 | "syntax and remove the extraneous text. If the extra text is " |
| | 401 | "supposed to be a comment, make sure the comment syntax is correct." }, |
| | 402 | |
| | 403 | { TCERR_NESTED_COMMENT, |
| | 404 | "\"/*\" found within \"/* ... */\" - nested comments are not allowed", |
| | 405 | "The compiler found \"/*\" within a block comment (a \"/* ... */\" " |
| | 406 | "sequence). This type of comment cannot be nested. If you didn't " |
| | 407 | "intend to create a nested comment, the problem could be that the " |
| | 408 | "previous block comment is missing its \"*/\" end marker - you might " |
| | 409 | "want to check the previous comment to make sure it ended properly. " |
| | 410 | "If you did want to create a nested comment, consider using \"//\" " |
| | 411 | "comments instead, or you can use #if 0 ... #endif to comment out " |
| | 412 | "a large block." }, |
| | 413 | |
| | 414 | { TCERR_UNMAPPABLE_CHAR, |
| | 415 | "unmappable character in input", |
| | 416 | "The compiler encountered an \"unmappable\" character in the input. " |
| | 417 | "This is a character that's not defined as part of the source file " |
| | 418 | "character set you're using, so the compiler doesn't know how to " |
| | 419 | "interpret it. This can happen if you've declared the file to be " |
| | 420 | "in plain ASCII, via a #charset \"us-ascii\" directive, but the file " |
| | 421 | "actually contains characters outside of the plain ASCII range. " |
| | 422 | "The same can happen with the ISO-8859 (Latin-1, etc) character sets, " |
| | 423 | "since these do not define all possible character codes. Check for " |
| | 424 | "any accented letters or special symbols. If you don't see any of " |
| | 425 | "these, there might be invisible control characters or spaces causing " |
| | 426 | "the problem. If you are intentionally using accented characters, " |
| | 427 | "add a #charset directive to the start of the file to indicate the " |
| | 428 | "correct character set that your text editor is using when saving " |
| | 429 | "the source file." }, |
| | 430 | |
| | 431 | { TCERR_DECIMAL_IN_OCTAL, |
| | 432 | "decimal digit found in octal constant \"%.*s\"", |
| | 433 | "The compiler found a decimal digit (an 8 or a 9) within the octal " |
| | 434 | "constant value \"%.*s\". When you start a numeric constant with the " |
| | 435 | "digit zero (0), it signifies an octal constant - that is, a number " |
| | 436 | "written in base-8 notation. Octal numbers can only contain the " |
| | 437 | "digits 0 through 7, so you can't use an 8 or a 9 in this type of " |
| | 438 | "constant. If you didn't mean this to be interpreted as an octal " |
| | 439 | "value, simply remove the leading zero. Otherwise, remove the " |
| | 440 | "invalid digits from the octal number." }, |
| | 441 | |
| | 442 | { TCERR_LTGT_OBSOLETE, |
| | 443 | "the '<>' operator is obsolete - use '!=' instead", |
| | 444 | "The '<>' operator is obsolete - use '!=' instead. TADS 2 treated " |
| | 445 | "'<>' as equivalent to '!=', but TADS 3 doesn't allow '<>', because " |
| | 446 | "the varying operator syntax was sometimes confusing to people " |
| | 447 | "reading source code." }, |
| | 448 | |
| | 449 | { TCERR_INTERNAL_EXPLAN, |
| | 450 | "Please report this error to the compiler's maintainer.", |
| | 451 | "This indicates a problem within the compiler itself. Please report " |
| | 452 | "this problem to the compiler's maintainer -- refer to the README file " |
| | 453 | "or release notes for contact information." }, |
| | 454 | |
| | 455 | { TCERR_INTERNAL_ERROR, |
| | 456 | "general internal error", |
| | 457 | "general internal error" }, |
| | 458 | |
| | 459 | { TCERR_MAKE_CANNOT_CREATE_SYM, |
| | 460 | "error creating symbol file \"%s\"", |
| | 461 | "Error creating symbol file \"%s\". Check to make sure the filename " |
| | 462 | "contains only valid characters, that the path is valid, and that " |
| | 463 | "you have the required permissions to create the file." }, |
| | 464 | |
| | 465 | { TCERR_MAKE_CANNOT_CREATE_OBJ, |
| | 466 | "error creating object file \"%s\"", |
| | 467 | "Error creating object file \"%s\". Check to make sure the filename " |
| | 468 | "contains only valid characters, that the path is valid, and that " |
| | 469 | "you have the required permissions to create the file." }, |
| | 470 | |
| | 471 | { TCERR_MAKE_CANNOT_CREATE_IMG, |
| | 472 | "error creating image file \"%s\"", |
| | 473 | "Error creating image file \"%s\". Check to make sure the filename " |
| | 474 | "contains only valid characters, that the path is valid, and that " |
| | 475 | "you have the required permissions to create the file." }, |
| | 476 | |
| | 477 | { TCERR_MAKE_CANNOT_OPEN_SYM, |
| | 478 | "error opening symbol file \"%s\" for reading", |
| | 479 | "Error opening symbol file \"%s\" for reading. Check that the " |
| | 480 | "file exists and that its name and path are valid." }, |
| | 481 | |
| | 482 | { TCERR_MAKE_CANNOT_OPEN_OBJ, |
| | 483 | "error opening object file \"%s\" for reading", |
| | 484 | "Error opening object file \"%s\" for reading. Check that the " |
| | 485 | "file exists and that its name and path are valid." }, |
| | 486 | |
| | 487 | { TCERR_MAKE_CANNOT_OPEN_IMG, |
| | 488 | "error opening image file \"%s\" for reading", |
| | 489 | "Error opening image file \"%s\" for reading. Since this is an " |
| | 490 | "intermediate file created during the build process, this probably " |
| | 491 | "indicates a problem with the filename path, directory permissions, " |
| | 492 | "or disk space." }, |
| | 493 | |
| | 494 | { TCERR_TOO_MANY_ERRORS, |
| | 495 | "too many errors (try fixing the first couple of errors and recompiling)", |
| | 496 | "Too many errors - aborting compilation. Don't panic! Your source " |
| | 497 | "code probably doesn't have nearly as many errors as the compiler " |
| | 498 | "is reporting. In all likelihood, the compiler got tripped up after " |
| | 499 | "the first couple of errors and hasn't been able to get itself " |
| | 500 | "re-synchronized with your code - it thinks there are errors only " |
| | 501 | "because it's trying to interpret the code in the wrong context. You " |
| | 502 | "should simply fix the first few errors, then try compiling your " |
| | 503 | "program again - chances are the compiler will get a lot further " |
| | 504 | "if you fix just the first few errors. If you want, you can save a " |
| | 505 | "copy of the current source code and send it to TADS's author, who " |
| | 506 | "might be able to make the compiler a little smarter about dealing " |
| | 507 | "with whatever is confusing it so badly." }, |
| | 508 | |
| | 509 | { TCERR_MODULE_NAME_COLLISION, |
| | 510 | "module %s the has same name as an existing module", |
| | 511 | "The module \"%s\" has the same name as an existing module elsewhere " |
| | 512 | "in the project. The root filename of each module must be unique, " |
| | 513 | "because the two modules' object files might otherwise overwrite one " |
| | 514 | "another. You must change the name of one of the modules so that " |
| | 515 | "each module has a unique name." }, |
| | 516 | |
| | 517 | { TCERR_MODULE_NAME_COLLISION_WITH_LIB, |
| | 518 | "module %s has the same name as an existing module from library \"%s\"", |
| | 519 | "The module %s has the same name as an existing module included " |
| | 520 | "from the library \"%s\". The root filename of each module must be " |
| | 521 | "unique, even for files included from libraries. If more than one " |
| | 522 | "module has the same root name, the modules' object files would " |
| | 523 | "overwrite one another. You must change the name of this module " |
| | 524 | "to a name not used anywhere else in the project." }, |
| | 525 | |
| | 526 | { TCERR_SOURCE_FROM_LIB, |
| | 527 | "\"%s\" (from library \"%s\")", |
| | 528 | "\"%s\" (from library \"%s\")" }, |
| | 529 | |
| | 530 | { TCERR_CONST_DIV_ZERO, |
| | 531 | "divide by zero in constant expression", |
| | 532 | "Division by zero in constant expression. (The compiler was trying " |
| | 533 | "to calculate the value of this expression because it appears to be " |
| | 534 | "constant. Check for any macros that might expand to zero, and check " |
| | 535 | "for proper placement of parentheses.)" }, |
| | 536 | |
| | 537 | { TCERR_NO_MEM_PRS_TREE, |
| | 538 | "out of memory - cannot allocate parse tree block", |
| | 539 | "Out of memory. (The compiler was trying to allocate space for a " |
| | 540 | "\"parse tree block,\" which stores an intermediate form of your " |
| | 541 | "program source code during compilation. If possible, make more " |
| | 542 | "memory available to the compiler by closing other applications or " |
| | 543 | "reconfiguring any background tasks, services, or device drivers " |
| | 544 | "that can be changed to use less memory.)" }, |
| | 545 | |
| | 546 | { TCERR_PRS_BLK_TOO_BIG, |
| | 547 | "parse block too big (size=%ld)", |
| | 548 | "Parse block too big (size=%ld)." }, |
| | 549 | |
| | 550 | { TCERR_INVALID_LVALUE, |
| | 551 | "invalid lvalue - cannot assign to expression on left of \"%s\"", |
| | 552 | "Invalid \"lvalue\". The expression on the left-hand side of the " |
| | 553 | "operator \"%s\" cannot be used as the destination of an assignment. " |
| | 554 | "You can only assign values to expressions such as local variables, " |
| | 555 | "object properties, and list elements. " |
| | 556 | "Check for missing or extra parentheses and operators. " }, |
| | 557 | |
| | 558 | { TCERR_QUEST_WITHOUT_COLON, |
| | 559 | "missing ':' in '?' conditional expression", |
| | 560 | "The ':' part of a '?' conditional expression is missing. A '?' " |
| | 561 | "expression uses the syntax (condition ? true-part : false-part). " |
| | 562 | "Check for missing parentheses or other errors in the " |
| | 563 | "condition or true-part expression." }, |
| | 564 | |
| | 565 | { TCERR_INVALID_UNARY_LVALUE, |
| | 566 | "invalid lvalue - cannot apply \"%s\" operator to expression", |
| | 567 | "The \"%s\" operator cannot be applied to this expression. This " |
| | 568 | "operator can only be applied to an expression that can be used in " |
| | 569 | "an assignment, such as local variables, object properties, and " |
| | 570 | "list elements. Check for missing or extra parentheses." }, |
| | 571 | |
| | 572 | { TCERR_DELETE_OBSOLETE, |
| | 573 | "operator 'delete' is obsolete; expression has no effect", |
| | 574 | "The 'delete' operator is obsolete. The compiler still accepts " |
| | 575 | "'delete' expressions, but they have no effect at run-time. (The " |
| | 576 | "run-time system now provides automatic deletion of objects as " |
| | 577 | "they become unreachable, so explicit deletion is no longer " |
| | 578 | "necessary. You can simply remove all 'delete' expressions from " |
| | 579 | "your program.)" }, |
| | 580 | |
| | 581 | { TCERR_NO_ADDRESS, |
| | 582 | "invalid address expression - can't apply '&' operator", |
| | 583 | "The unary '&' operator cannot be applied to this expression. You " |
| | 584 | "can only apply the '&' prefix operator to function names and property " |
| | 585 | "names. Check the expression after the '&' to make sure it is a valid " |
| | 586 | "function or property name, and check for other expression errors, " |
| | 587 | "such as unbalanced parentheses." }, |
| | 588 | |
| | 589 | { TCERR_CONST_UNARY_REQ_NUM, |
| | 590 | "unary '%s' operator requires numeric value in constant expression", |
| | 591 | "The '%s' operator must be followed by a numeric value in a constant " |
| | 592 | "expression. The value after the operator is a constant value, but " |
| | 593 | "is not a number." }, |
| | 594 | |
| | 595 | { TCERR_CONST_BINARY_REQ_NUM, |
| | 596 | "binary '%s' operator requires numeric value in constant expression", |
| | 597 | "The '%s' operator must be applied only to numeric values in a constant " |
| | 598 | "expression. Both of the values are constants, but both are not " |
| | 599 | "numbers." }, |
| | 600 | |
| | 601 | { TCERR_CONST_BINPLUS_INCOMPAT, |
| | 602 | "incompatible constant types for two-operand '+' operator", |
| | 603 | "The constant types in this expression are not compatible for use " |
| | 604 | "with the two-operand '+' operator. You can add two numbers, or add a " |
| | 605 | "non-list value to a string, or add a value to a list; other " |
| | 606 | "combinations are not allowed." }, |
| | 607 | |
| | 608 | { TCERR_EXPR_MISSING_RPAR, |
| | 609 | "expected ')' but found \"%~.*s\"", |
| | 610 | "This expression is missing a right parenthesis ')' - \"%~.*s\" is " |
| | 611 | "where the ')' should go. The parenthesis is required to " |
| | 612 | "match an earlier left parenthesis '('. Check to make sure the " |
| | 613 | "parentheses are properly balanced, and check for unterminated " |
| | 614 | "strings and missing operators." }, |
| | 615 | |
| | 616 | { TCERR_BAD_PRIMARY_EXPR, |
| | 617 | "expected integer, string, symbol, '[', or '(', but found \"%~.*s\"", |
| | 618 | "Invalid expression; expected an integer value, a string value (in " |
| | 619 | "single or double quotes), a symbolic name (such as a function, " |
| | 620 | "object, or property name), a list constant enclosed in square " |
| | 621 | "brackets '[ ]', or an expression in parentheses '( )', but " |
| | 622 | "found \"%~.*s\"." }, |
| | 623 | |
| | 624 | { TCERR_CONST_BAD_COMPARE, |
| | 625 | "incompatible types for comparison in constant expression", |
| | 626 | "This constant expression contains a comparison operator ('<', '<=', " |
| | 627 | "'>', or '>=') that attempts to compare values of incompatible types " |
| | 628 | "(you can compare an integer to an integer, a string to a string, " |
| | 629 | "or a floating-point value to another floating point value). Check " |
| | 630 | "the expression and correct the invalid comparison." }, |
| | 631 | |
| | 632 | { TCERR_EXPECTED_SEMI, |
| | 633 | "expected ';', but found \"%~.*s\"", |
| | 634 | "Expected a semicolon ';' but found \"%~.*s\". Please add the " |
| | 635 | "required semicolon. If a semicolon is already present, check " |
| | 636 | "for unbalanced parentheses or other expression errors." }, |
| | 637 | |
| | 638 | { TCERR_EXPECTED_DSTR_CONT, |
| | 639 | "expected '>>' and the string continuation, but found \"%~.*s\"", |
| | 640 | "Expected '>>' after the embedded expression, followed by the " |
| | 641 | "continuation of the string, but found \"%~.*s\" instead. Check the " |
| | 642 | "embedded expression (between '<<' and '>>') for errors, such as " |
| | 643 | "unbalanced parentheses, and check that the string is properly " |
| | 644 | "continued after a '>>' sequence." }, |
| | 645 | |
| | 646 | { TCERR_EXPECTED_ARG_COMMA, |
| | 647 | "expected ',' or ')' in argument list, but found \"%~.*s\"", |
| | 648 | "Expected a comma ',' or right parenthesis ')' in an argument list, " |
| | 649 | "but found \"%~.*s\". Arguments must be separated by commas, and " |
| | 650 | "the entire list must be enclosed in parentheses '( )'. Check for " |
| | 651 | "errors and unbalanced parentheses in the argument expression." }, |
| | 652 | |
| | 653 | { TCERR_EXPECTED_SUB_RBRACK, |
| | 654 | "expected ']' at end of subscript, but found \"%~.*s\"", |
| | 655 | "Expected a right square bracket ']' at the end of the subscript " |
| | 656 | "(index) expression, but found \"%~.*s\" instead. A ']' is required " |
| | 657 | "to match the '[' at the start of the subscript. Check for errors " |
| | 658 | "and unbalanced parentheses in the subscript expression." }, |
| | 659 | |
| | 660 | { TCERR_INVALID_PROP_EXPR, |
| | 661 | "expected property name or parenthesized expression after '.', " |
| | 662 | "found \"%~.*s\"", |
| | 663 | "Expected a property name or a parenthesized expression (which must " |
| | 664 | "evaluate at run-time to a property address value) after '.', but " |
| | 665 | "found \"%~.*s\", which is not a valid property-valued expression." }, |
| | 666 | |
| | 667 | { TCERR_LIST_MISSING_RBRACK, |
| | 668 | "expected ']' or a list element, but found \"%~.*s\"", |
| | 669 | "Expected to find a list element expression or a right square " |
| | 670 | "bracket ']' ending the list, but found \"%~.*s\" instead. " |
| | 671 | "The compiler will assume that this is the end of the list. " |
| | 672 | "Please insert the missing ']', or check for errors in the list " |
| | 673 | "expressions." }, |
| | 674 | |
| | 675 | { TCERR_LIST_EXTRA_RPAR, |
| | 676 | "found extraneous ')' in list; ignored", |
| | 677 | "Found an extra right parenthesis ')' where a list element " |
| | 678 | "expression or a right square bracket ']' ending the list should be. " |
| | 679 | "The compiler will assume that the ')' is extraneous and will " |
| | 680 | "ignore it. Please remove the extra ')' or check the list " |
| | 681 | "for unbalanced parentheses or other expression errors." }, |
| | 682 | |
| | 683 | { TCERR_LIST_EXPECT_COMMA, |
| | 684 | "expected ',' separating list elements, but found \"%~.*s\"", |
| | 685 | "A comma ',' must be used to separate each element of a list. " |
| | 686 | "The compiler found \"%~.*s\" where a comma should be. Please insert " |
| | 687 | "the missing comma between the list elements, or check for an " |
| | 688 | "error in the preceding list element expression." }, |
| | 689 | |
| | 690 | { TCERR_CONST_IDX_NOT_INT, |
| | 691 | "index value must be an integer in constant list index expression", |
| | 692 | "The list index expression has a constant value, but the list index " |
| | 693 | "is not a number. A list index must have a numeric value. Check " |
| | 694 | "the expression in the square brackets '[ ]' and correct any errors." }, |
| | 695 | |
| | 696 | { TCERR_CONST_IDX_RANGE, |
| | 697 | "index value out of range in constant list index expression", |
| | 698 | "The list index expression is out of range for the list. The index " |
| | 699 | "value must be a number from 1 to the number of elements in the " |
| | 700 | "list. Check the expression in the square brackets '[ ]' and " |
| | 701 | "correct the value." }, |
| | 702 | |
| | 703 | { TCERR_UNTERM_STRING, |
| | 704 | "unterminated string literal: string started with %c%~.*s%c", |
| | 705 | "Unterminated string. The string starting with %c%~.*s%c does not have a " |
| | 706 | "matching close quote before the end of the file. Please insert the " |
| | 707 | "missing quote mark. If the string looks properly terminated, check " |
| | 708 | "the previous string (or the previous few strings), since an unbalanced " |
| | 709 | "quote mark in an earlier string can sometimes propagate to later " |
| | 710 | "strings." }, |
| | 711 | |
| | 712 | { TCERR_EXPECTED_ARG_RPAR, |
| | 713 | "expected ')' at end of argument list, but found \"%~.*s\"", |
| | 714 | "Expected a right parenthesis ')' at the end of an argument list, " |
| | 715 | "but found \"%~.*s\". The compiler is assuming that this is the end " |
| | 716 | "of the statement. Please insert the missing parenthesis, or check " |
| | 717 | "the argument list for unbalanced parentheses or other errors." }, |
| | 718 | |
| | 719 | { TCERR_EXTRA_RPAR, |
| | 720 | "unexpected ')' found - ignored", |
| | 721 | "The expression contains an unbalanced right parenthesis ')'. " |
| | 722 | "The compiler will ignore the extra ')'. Remove the extra ')', " |
| | 723 | "or check the expression for other errors." }, |
| | 724 | |
| | 725 | { TCERR_EXTRA_RBRACK, |
| | 726 | "unexpected ']' found - ignored", |
| | 727 | "The expression contains an unbalanced right square bracket ']'. " |
| | 728 | "The compiler will ignore the extra ']'. Remove the extra ']', " |
| | 729 | "or check the expression for other errors." }, |
| | 730 | |
| | 731 | { TCERR_EXPECTED_OPERAND, |
| | 732 | "expected an operand, but found \"%~.*s\"", |
| | 733 | "The expression is missing an operand value - the compiler found " |
| | 734 | "\"%~.*s\" instead of a valid operand. Please check the expression and " |
| | 735 | "correct the error." }, |
| | 736 | |
| | 737 | { TCERR_PROPSET_REQ_STR, |
| | 738 | "expected property name pattern string after 'propertyset' - " |
| | 739 | "found \"%~.*s\"", |
| | 740 | "A property name pattern string, enclosed in single quotes, is " |
| | 741 | "required after the 'propertyset' keyword, but the compiler found " |
| | 742 | "\"%~.*s\" instead. Add the missing pattern string." }, |
| | 743 | |
| | 744 | { TCERR_INH_CLASS_SYNTAX, |
| | 745 | "\"inherited superclass\" syntax - expected '.', found \"%~.*s\"", |
| | 746 | "Invalid syntax in \"inherited class\" expression. The class name " |
| | 747 | "must be followed by '.', but the compiler found \"%~.*s\" instead. " |
| | 748 | "Check and correct the syntax." }, |
| | 749 | |
| | 750 | { TCERR_UNDEF_SYM, |
| | 751 | "undefined symbol \"%~.*s\"", |
| | 752 | "The symbol \"%~.*s\" is not defined. Check the spelling of the " |
| | 753 | "symbol name, and make sure that the corresponding local variable, " |
| | 754 | "object, or function definition is entered correctly. This error " |
| | 755 | "could be the result of a syntax error in the original declaration " |
| | 756 | "of the symbol; if the declaration has an error, correct that error " |
| | 757 | "first, then try recompiling." }, |
| | 758 | |
| | 759 | { TCERR_ASSUME_SYM_PROP, |
| | 760 | "undefined symbol \"%~.*s\" - assuming this is a property name", |
| | 761 | "The symbol \"%~.*s\" is undefined, but appears from context to be " |
| | 762 | "a property name. The compiler is assuming that this is a property. " |
| | 763 | "Check the spelling of the symbol. If this assumption is correct, " |
| | 764 | "you can avoid this warning by explicitly declaring a value to the " |
| | 765 | "property in an object definition rather than in method code." }, |
| | 766 | |
| | 767 | { TCERR_CONST_BINMINUS_INCOMPAT, |
| | 768 | "incompatible constant types for two-operand '-' operator", |
| | 769 | "The constant types in this expression are not compatible for use " |
| | 770 | "with the two-operand '-' operator. You can subtract one number " |
| | 771 | "from another, or subtract a value from a list; other combinations " |
| | 772 | "are not allowed." }, |
| | 773 | |
| | 774 | { TCERR_REQ_SYM_FORMAL, |
| | 775 | "expected a symbol in formal parameter list, but found \"%~.*s\"", |
| | 776 | "A symbol name is required for each formal parameter. The compiler " |
| | 777 | "found \"%~.*s\" instead of a symbol for the parameter name." }, |
| | 778 | |
| | 779 | { TCERR_REQ_COMMA_FORMAL, |
| | 780 | "expected a comma in formal parameter list, but found \"%~.*s\"", |
| | 781 | "The formal parameter list is missing a comma between two parameter " |
| | 782 | "names - a comma should come before \"%~.*s\" in the parameter list." }, |
| | 783 | |
| | 784 | { TCERR_MISSING_LAST_FORMAL, |
| | 785 | "missing parameter name at end of formal parameter list", |
| | 786 | "The last parameter name in the formal parameter list is missing. " |
| | 787 | "Insert a parameter name before the ')', or remove the extra comma " |
| | 788 | "at the end of the list." }, |
| | 789 | |
| | 790 | { TCERR_MISSING_RPAR_FORMAL, |
| | 791 | "missing right parenthesis ')' at end of formal parameter list - " |
| | 792 | "found \"%~.*s\"", |
| | 793 | "The right parenthesis ')' at the end of the formal parameter list " |
| | 794 | "is missing. The parenthesis should come before \"%~.*s\". " }, |
| | 795 | |
| | 796 | { TCERR_FORMAL_REDEF, |
| | 797 | "formal parameter \"%~.*s\" defined more than once", |
| | 798 | "The formal parameter name \"%~.*s\" is defined more than once in the " |
| | 799 | "parameter list. Each parameter name can be used only once in the " |
| | 800 | "same list. Remove the redundant variable, or change its name." }, |
| | 801 | |
| | 802 | { TCERR_EQ_WITH_METHOD_OBSOLETE, |
| | 803 | "'=' is not allowed with a method definition", |
| | 804 | "An equals sign '=' is not allowed in a method definition. You can " |
| | 805 | "only use '=' when defining a simple value for a property, not to " |
| | 806 | "define method code. (TADS 2 used '=' in methods, but this syntax is " |
| | 807 | "now obsolete.) Remove the '='." }, |
| | 808 | |
| | 809 | { TCERR_REQ_LBRACE_CODE, |
| | 810 | "expected '{' at start of method code body, but found \"%~.*s\"", |
| | 811 | "An open brace '{' was expected before a method's program code body, " |
| | 812 | "but the compiler found \"%~.*s\" instead." }, |
| | 813 | |
| | 814 | { TCERR_EOF_IN_CODE, |
| | 815 | "unexpected end of file in code block - '}' missing", |
| | 816 | "The compiler reached the end of the file before the current function " |
| | 817 | "or method was finished. A close brace '}' is probably missing - " |
| | 818 | "insert the close brace at the end of the function or method." }, |
| | 819 | |
| | 820 | { TCERR_REQ_LPAR_IF, |
| | 821 | "expected '(' after \"if\", but found \"%~.*s\"", |
| | 822 | "An open parenthesis '(' is required after the keyword \"if\" - " |
| | 823 | "the compiler found \"%~.*s\" instead. The compiler will assume " |
| | 824 | "that a parenthesis was intended. Please correct the syntax " |
| | 825 | "by inserting a parenthesis." }, |
| | 826 | |
| | 827 | { TCERR_MISPLACED_ELSE, |
| | 828 | "misplaced \"else\" - no corresponding \"if\" statement", |
| | 829 | "This \"else\" clause is invalid because it is not properly associated " |
| | 830 | "with an \"if\" statement. Most likely, this is because the group of " |
| | 831 | "statements following the \"if\" is not properly enclosed in braces " |
| | 832 | "'{ }', or because the braces just before the \"else\" aren't properly " |
| | 833 | "balanced, or because there are too many or too few semicolons ';' after " |
| | 834 | "the statement following the \"if\" and before the \"else\". Check " |
| | 835 | "braces to make sure they're properly balanced, and check the statement " |
| | 836 | "or statements before the \"else\" for proper syntax, especially " |
| | 837 | "for the correct number of terminating semicolons." }, |
| | 838 | |
| | 839 | { TCERR_MISPLACED_CASE, |
| | 840 | "misplaced \"case\" keyword - not in a \"switch\" statement", |
| | 841 | "This \"case\" clause is invalid because it is not part of a \"switch\" " |
| | 842 | "statement. The most likely cause is that braces before this \"case\" " |
| | 843 | "keyword aren't properly balanced. \"case\" labels must be enclosed " |
| | 844 | "directly by the \"switch\" - they cannot be enclosed within statements " |
| | 845 | "or braces inside the \"switch\". Check code preceding the \"case\" " |
| | 846 | "clause for proper syntax and balanced braces." }, |
| | 847 | |
| | 848 | { TCERR_MISPLACED_DEFAULT, |
| | 849 | "misplaced \"default\" keyword - not in a \"switch\" statement", |
| | 850 | "This \"default\" clause is invalid because it is not part of a " |
| | 851 | "\"switch\" statement. The most likely cause is that braces before " |
| | 852 | "this \"default\" keyword aren't properly balanced. A \"default\" " |
| | 853 | "label must be enclosed directly by the \"switch\" - it cannot be " |
| | 854 | "enclosed within a statement or braces within the \"switch\" body. " |
| | 855 | "Check code preceding the \"default\" clause for proper syntax " |
| | 856 | "and balanced braces." }, |
| | 857 | |
| | 858 | { TCERR_ELLIPSIS_NOT_LAST, |
| | 859 | "'...' cannot be followed by additional formal parameters", |
| | 860 | "An ellipsis '...' cannot be followed by additional parameters " |
| | 861 | "in an argument list. Move the '...' to the end of the parameter " |
| | 862 | "list, or remove the extraneous parameters after the ellipsis." }, |
| | 863 | |
| | 864 | { TCERR_LOCAL_REQ_COMMA, |
| | 865 | "expected ',' or ';' after local variable, but found \"%~.*s\"", |
| | 866 | "The compiler expected a comma ',' or semicolon ';' after a local " |
| | 867 | "variable declaration, but found \"%~.*s\" instead. If you're " |
| | 868 | "defining an additional variable, add a comma before the additional " |
| | 869 | "variable; if not, check for a missing semicolon." }, |
| | 870 | |
| | 871 | { TCERR_LOCAL_REQ_SYM, |
| | 872 | "expected symbol name in local variable declaration, but found \"%~.*s\"", |
| | 873 | "A symbol name is required in the local variable declaration, " |
| | 874 | "but the compiler found \"%~.*s\" instead. Check the syntax " |
| | 875 | "and correct the error." }, |
| | 876 | |
| | 877 | { TCERR_FUNC_REQ_SYM, |
| | 878 | "expected symbol after 'function', but found \"%~.*s\"", |
| | 879 | "A symbol name is required after the 'function' keyword, but the " |
| | 880 | "compiler found \"%~.*s\" instead. Check the function definition " |
| | 881 | "syntax." }, |
| | 882 | |
| | 883 | { TCERR_REQ_CODE_BODY, |
| | 884 | "expected ';', '(', or '{', but found \"%~.*s\"", |
| | 885 | "The compiler expected a left parenthesis '(' starting a formal " |
| | 886 | "parameter list, a left brace '{' starting a code body, or a semicolon " |
| | 887 | "';' terminating the statement, but found \"%~.*s\". Check the function " |
| | 888 | "definition syntax." }, |
| | 889 | |
| | 890 | { TCERR_REQ_FUNC_OR_OBJ, |
| | 891 | "expected function or object definition, but found \"%~.*s\"", |
| | 892 | "The compiler expected a function or object definition, but " |
| | 893 | "found \"%~.*s\". Check the syntax, and check for unbalanced " |
| | 894 | "braces '{ }' and other syntax errors preceding this line." }, |
| | 895 | |
| | 896 | { TCERR_RET_REQ_EXPR, |
| | 897 | "expected ';' or expression after \"return\", but found \"%~.*s\"", |
| | 898 | "The \"return\" keyword must be followed by an expression giving the " |
| | 899 | "value to return, or by a semicolon ';' if there is no value to " |
| | 900 | "return; the compiler found \"%~.*s\" instead. Check the syntax, and " |
| | 901 | "insert the missing semicolon or expression as appropriate." }, |
| | 902 | |
| | 903 | { TCERR_UNREACHABLE_CODE, |
| | 904 | "unreachable statement", |
| | 905 | "This statement cannot be reached, because the previous statement " |
| | 906 | "returns or throws an exception. This code will never be executed. " |
| | 907 | "Check the logic to determine if the code is necessary; if not, " |
| | 908 | "remove the code. If the code is necessary, you must determine " |
| | 909 | "why the code is unreachable and correct the program logic." }, |
| | 910 | |
| | 911 | { TCERR_RET_VAL_AND_VOID, |
| | 912 | "code has \"return\" statements both with and without values", |
| | 913 | "This code has \"return\" statements both with and without values. " |
| | 914 | "A function or method's \"return\" statements should consistently " |
| | 915 | "return values or not; these should not be mixed in a single " |
| | 916 | "function or method, because callers will not have predictable " |
| | 917 | "results when using the function's return value." }, |
| | 918 | |
| | 919 | { TCERR_RET_VAL_AND_IMP_VOID, |
| | 920 | "code has \"return\" with value but also falls off end", |
| | 921 | "This code has one or more \"return\" statements that explicitly " |
| | 922 | "return a value from the function, but also \"falls off\" the end " |
| | 923 | "of the function without a \"return\" statement, which will result " |
| | 924 | "in a return without a value. The last statement in the function " |
| | 925 | "or method should be a \"return\" with a value, for consistency " |
| | 926 | "with the other \"return\" statements." }, |
| | 927 | |
| | 928 | { TCERR_REQ_INTRINS_NAME, |
| | 929 | "expected function set name string after \"intrinsic\", " |
| | 930 | "but found \"%~.*s\"", |
| | 931 | "The \"intrinsic\" keyword must be followed by the global name of the " |
| | 932 | "function set, enclosed in single-quotes, but the compiler found " |
| | 933 | "\"%~.*s\" instead. Check the \"intrinsic\" statement syntax." }, |
| | 934 | |
| | 935 | { TCERR_REQ_INTRINS_LBRACE, |
| | 936 | "expected '{' after intrinsic name, but found \"%~.*s\"", |
| | 937 | "The function set listing for an \"intrinsic\" statement must be " |
| | 938 | "closed in braces '{ }'. The compiler found \"%~.*s\" after the " |
| | 939 | "function set name, where the open brace '{' should be. Check the " |
| | 940 | "syntax." }, |
| | 941 | |
| | 942 | { TCERR_EOF_IN_INTRINS, |
| | 943 | "end of file in \"intrinsic\" list - '}' is probably missing", |
| | 944 | "The compiler reached the end of the file while still scanning " |
| | 945 | "an \"intrinsic\" statement's function set listing. The closing " |
| | 946 | "brace '}' of the function set list is probably missing; check " |
| | 947 | "for the missing brace." }, |
| | 948 | |
| | 949 | { TCERR_REQ_INTRINS_LPAR, |
| | 950 | "expected '(' after function name in intrinsic list, but found \"%~.*s\"", |
| | 951 | "An open parenthesis '(' is required after the name of a function " |
| | 952 | "in an intrinsic function list, but the compiler found \"%~.*s\" " |
| | 953 | "instead. Check the syntax and insert the missing parenthesis." }, |
| | 954 | |
| | 955 | { TCERR_REQ_INTRINS_SYM, |
| | 956 | "expected function name in intrinsic list, but found \"%~.*s\"", |
| | 957 | "The compiler expected the name of a function in the intrinsic " |
| | 958 | "function list, but found \"%~.*s\" instead. Check the syntax of " |
| | 959 | "the statement, and check for unbalanced parentheses and braces." }, |
| | 960 | |
| | 961 | { TCERR_REQ_FOR_LPAR, |
| | 962 | "expected '(' after \"for\", but found \"%~.*s\"", |
| | 963 | "An open parenthesis '(' is required after the \"for\" keyword, " |
| | 964 | "but the compiler found \"%~.*s\" instead. Check the syntax " |
| | 965 | "and insert the missing parenthesis." }, |
| | 966 | |
| | 967 | { TCERR_LOCAL_REDEF, |
| | 968 | "local variable \"%~.*s\" defined more than once", |
| | 969 | "The local variable name \"%~.*s\" is defined more than once in this " |
| | 970 | "scope. Each local variable name can be used only once at the same " |
| | 971 | "level of braces '{ }'. Remove the redundant variable, or change its " |
| | 972 | "name." }, |
| | 973 | |
| | 974 | { TCERR_REQ_FOR_LOCAL_INIT, |
| | 975 | "initializer expected after local variable name in \"for\", but found " |
| | 976 | "\"%~.*s\"", |
| | 977 | "A local variable defined within a \"for\" statement's initialization " |
| | 978 | "clause requires an initializer expression. The compiler expected to " |
| | 979 | "find an assignment operator after the local variable name, but found " |
| | 980 | "\"%~.*s\" instead. Check the syntax, and add the missing initializer " |
| | 981 | "to the local variable definition." }, |
| | 982 | |
| | 983 | { TCERR_MISSING_FOR_INIT_EXPR, |
| | 984 | "missing expression after comma in \"for\" initializer", |
| | 985 | "An expression must follow a comma in a \"for\" initializer list. " |
| | 986 | "Check the expression, and remove the extra comma before the " |
| | 987 | "semicolon, or supply the missing expression." }, |
| | 988 | |
| | 989 | { TCERR_MISSING_FOR_PART, |
| | 990 | "missing expression in \"for\" statement - \"%~.*s\" unexpected", |
| | 991 | "A \"for\" statement requires three expressions, separated by " |
| | 992 | "semicolons ';'. This statement does not have all of the required " |
| | 993 | "expressions, but ends unexpectedly at \"%~.*s\". Add the missing " |
| | 994 | "parts or correct the syntax." }, |
| | 995 | |
| | 996 | { TCERR_REQ_FOR_INIT_COMMA, |
| | 997 | "expected ',' or ';' in \"for\" initializer, but found \"%~.*s\"", |
| | 998 | "A comma ',' or semicolon ';' was expected in the \"for\" statement's " |
| | 999 | "initializer list, but the compiler found \"%~.*s\" instead. Check " |
| | 1000 | "the expression syntax." }, |
| | 1001 | |
| | 1002 | { TCERR_REQ_FOR_COND_SEM, |
| | 1003 | "expected ';' after \"for\" condition, but found \"%~.*s\"", |
| | 1004 | "A semicolon ';' was expected after the \"for\" statement's " |
| | 1005 | "condition expression, but the compiler found \"%~.*s\" instead. " |
| | 1006 | "Check the expression syntax." }, |
| | 1007 | |
| | 1008 | { TCERR_REQ_FOR_RPAR, |
| | 1009 | "missing ')' at end of \"for\" expression list - found \"%~.*s\"", |
| | 1010 | "A closing parenthesis ')' is required at the end of the \"for\" " |
| | 1011 | "statement's expression list, but the compiler found \"%~.*s\" instead. " |
| | 1012 | "Check the syntax, and insert the missing parenthesis, or correct " |
| | 1013 | "unbalanced parentheses or other syntax errors earlier in the " |
| | 1014 | "expression list." }, |
| | 1015 | |
| | 1016 | { TCERR_FOR_COND_FALSE, |
| | 1017 | "\"for\" condition is always false - body and reinitializer are " |
| | 1018 | "unreachable", |
| | 1019 | "The condition of this \"for\" statement is always false, so the " |
| | 1020 | "body and reinitialization expression will never be executed." }, |
| | 1021 | |
| | 1022 | { TCERR_REQ_WHILE_LPAR, |
| | 1023 | "missing '(' after \"while\" - found \"%~.*s\"", |
| | 1024 | "An open parenthesis '(' is required after the \"while\" keyword, but " |
| | 1025 | "the compiler found \"%~.*s\" instead. Check the syntax and insert " |
| | 1026 | "the missing parenthesis." }, |
| | 1027 | |
| | 1028 | { TCERR_REQ_WHILE_RPAR, |
| | 1029 | "missing ')' after \"while\" expression - found \"%~.*s\"", |
| | 1030 | "A close parenthesis ')' is required after the expression condition " |
| | 1031 | "in a \"while\" statement, but the compiler found \"%~.*s\" instead. " |
| | 1032 | "Check the syntax and insert the missing parenthesis." }, |
| | 1033 | |
| | 1034 | { TCERR_WHILE_COND_FALSE, |
| | 1035 | "\"while\" condition is always false - loop body is unreachable", |
| | 1036 | "The condition of this \"while\" statement is always false, so the " |
| | 1037 | "body of the loop will never be executed." }, |
| | 1038 | |
| | 1039 | { TCERR_REQ_DO_WHILE, |
| | 1040 | "expected \"while\" in \"do\" statement, but found \"%~.*s\"", |
| | 1041 | "This \"do\" statement is missing the required \"while\" keyword " |
| | 1042 | "immediately after the loop body. The compiler found \"%~.*s\" where " |
| | 1043 | "the \"while\" keyword shuld be. Check the syntax and insert the " |
| | 1044 | "missing \"while\" keyword." }, |
| | 1045 | |
| | 1046 | { TCERR_MISPLACED_CATCH, |
| | 1047 | "misplaced \"catch\" clause - must be associated with \"try\"", |
| | 1048 | "This \"catch\" clause is invalid because it is not part of a \"try\"" |
| | 1049 | " statement. The most likely cause is that braces before this \"catch\"" |
| | 1050 | " keyword aren't properly balanced. Check braces preceding the " |
| | 1051 | "\"catch\" clause for proper syntax." }, |
| | 1052 | |
| | 1053 | { TCERR_MISPLACED_FINALLY, |
| | 1054 | "misplaced \"finally\" clause - must be associated with \"try\"", |
| | 1055 | "This \"finally\" clause is invalid because it is not part of a \"try\"" |
| | 1056 | " statement. The most likely cause is that braces before this " |
| | 1057 | "\"finally\" keyword aren't properly balanced. Check braces " |
| | 1058 | "preceding the \"finally\" clause for proper syntax." }, |
| | 1059 | |
| | 1060 | { TCERR_REQ_SWITCH_LPAR, |
| | 1061 | "missing '(' after \"switch\" - found \"%~.*s\"", |
| | 1062 | "An open parenthesis '(' is required after the \"switch\" keyword, but " |
| | 1063 | "the compiler found \"%~.*s\" instead. Check the syntax and insert " |
| | 1064 | "the missing parenthesis." }, |
| | 1065 | |
| | 1066 | { TCERR_REQ_SWITCH_RPAR, |
| | 1067 | "missing ')' after \"switch\" expression - found \"%~.*s\"", |
| | 1068 | "A close parenthesis ')' is required after the controlling expression " |
| | 1069 | "of a \"switch\" statement, but the compiler found \"%~.*s\" instead. " |
| | 1070 | "Check the syntax and insert the missing parenthesis." }, |
| | 1071 | |
| | 1072 | { TCERR_REQ_SWITCH_LBRACE, |
| | 1073 | "missing '{' after \"switch\" expression - found \"%~.*s\"", |
| | 1074 | "An open brace '{' is required after the controlling expression " |
| | 1075 | "of a \"switch\" statement, but the compiler found \"%~.*s\" instead. " |
| | 1076 | "The body of the \"switch\" must be enclosed in braces '{ }'. " |
| | 1077 | "Check the syntax and insert the missing parenthesis." }, |
| | 1078 | |
| | 1079 | { TCERR_UNREACHABLE_CODE_IN_SWITCH, |
| | 1080 | "code before first \"case\" or \"default\" label in \"switch\" is " |
| | 1081 | "not allowed", |
| | 1082 | "This statement precedes the first \"case\" or \"default\" label " |
| | 1083 | "in the \"switch\" body - all code within a \"switch\" body must " |
| | 1084 | "be reachable from a \"case\" or \"default\" label. Even \"local\" " |
| | 1085 | "declarations must be within a labelled section of the \"switch\" " |
| | 1086 | "body. Check for a missing \"case\" label, or move the code so that " |
| | 1087 | "it is outside the \"switch\" body or after a \"case\" label." }, |
| | 1088 | |
| | 1089 | { TCERR_EOF_IN_SWITCH, |
| | 1090 | "end of file in \"switch\" body", |
| | 1091 | "End of file found in \"switch\" body. The \"switch\" body's " |
| | 1092 | "braces '{ }' are probably not properly balanced. Check the code " |
| | 1093 | "within the \"switch\" body for unbalanced braces and other errors." }, |
| | 1094 | |
| | 1095 | { TCERR_CODE_LABEL_REDEF, |
| | 1096 | "code label \"%~.*s\" already defined in this function or method", |
| | 1097 | "The code label \"%~.*s\" is already defined in this function or " |
| | 1098 | "method. A code label can be used only once within each function " |
| | 1099 | "or method; code labels always have function- or method-level scope, " |
| | 1100 | "even when they're nested within braces. Change the name of one of " |
| | 1101 | "the conflicting labels so that the two labels have different names." }, |
| | 1102 | |
| | 1103 | { TCERR_REQ_CASE_COLON, |
| | 1104 | "missing ':' after \"case\" expression - found \"%~.*s\"", |
| | 1105 | "A colon ':' is required after the \"case\" expression, but the " |
| | 1106 | "compiler found \"%~.*s\" instead. Check the expression for errors, " |
| | 1107 | "and insert the missing colon after the expression." }, |
| | 1108 | |
| | 1109 | { TCERR_CASE_NOT_CONSTANT, |
| | 1110 | "\"case\" expression has a non-constant value", |
| | 1111 | "The expression in this \"case\" label does not have a constant " |
| | 1112 | "value. \"case\" expressions must always be constants or expressions " |
| | 1113 | "involving only constants. Check the expression and remove " |
| | 1114 | "references to local variables, object properties, or any other " |
| | 1115 | "non-constant values." }, |
| | 1116 | |
| | 1117 | { TCERR_REQ_DEFAULT_COLON, |
| | 1118 | "missing ':' after \"default\" - found \"%~.*s\"", |
| | 1119 | "A colon ':' is required after the \"default\" keyword, but the " |
| | 1120 | "compiler found \"%~.*s\" instead. Insert the missing colon " |
| | 1121 | "after the keyword." }, |
| | 1122 | |
| | 1123 | { TCERR_DEFAULT_REDEF, |
| | 1124 | "this \"switch\" already has a \"default:\" label", |
| | 1125 | "This \"switch\" statement already has a \"default:\" label. A " |
| | 1126 | "\"switch\" statement can have at most one \"default:\" label. Remove " |
| | 1127 | "the redundant label." }, |
| | 1128 | |
| | 1129 | { TCERR_TRY_WITHOUT_CATCH, |
| | 1130 | "\"try\" statement has no \"catch\" or \"finally\" clauses", |
| | 1131 | "This \"try\" statement has no \"catch\" or \"finally\" clauses. A " |
| | 1132 | "\"try\" statement must have at least one such clause, since it is " |
| | 1133 | "otherwise superfluous. Check for unbalanced braces in the body of " |
| | 1134 | "the \"try\" block." }, |
| | 1135 | |
| | 1136 | { TCERR_REQ_CATCH_LPAR, |
| | 1137 | "missing '(' after \"catch\" - found \"%~.*s\"", |
| | 1138 | "An open parenthesis '(' is required after the \"catch\" keyword, but " |
| | 1139 | "the compiler found \"%~.*s\" instead. Check the syntax and insert " |
| | 1140 | "the missing parenthesis." }, |
| | 1141 | |
| | 1142 | { TCERR_REQ_CATCH_RPAR, |
| | 1143 | "missing ')' after \"catch\" variable name - found \"%~.*s\"", |
| | 1144 | "A close parenthesis ')' is required after the variable name " |
| | 1145 | "of a \"switch\" clause, but the compiler found \"%~.*s\" instead. " |
| | 1146 | "Check the syntax and insert the missing parenthesis." }, |
| | 1147 | |
| | 1148 | { TCERR_REQ_CATCH_CLASS, |
| | 1149 | "expected class name in \"catch\" clause - found \"%~.*s\"", |
| | 1150 | "The class name of the exception to catch is required in the " |
| | 1151 | "\"catch\" clause, but the compiler found \"%~.*s\" instead. Check " |
| | 1152 | "and correct the syntax." }, |
| | 1153 | |
| | 1154 | { TCERR_REQ_CATCH_VAR, |
| | 1155 | "expected variable name in \"catch\" clause - found \"%~.*s\"", |
| | 1156 | "The name of a local variable (which can either be an existing " |
| | 1157 | "variable or can be a new variable implicitly defined by this use) " |
| | 1158 | "is required in the \"catch\" clause, but the compiler found \"%~.*s\" " |
| | 1159 | "instead. Check and correct the syntax." }, |
| | 1160 | |
| | 1161 | { TCERR_CATCH_VAR_NOT_LOCAL, |
| | 1162 | "\"%~.*s\" is not a local variable, so is not a valid \"catch\" target " |
| | 1163 | "variable", |
| | 1164 | "The symbol \"%~.*s\" is defined as something other than a local " |
| | 1165 | "variable, so it cannot be used as the target of this \"catch\" clause. " |
| | 1166 | "Check for a conflicting symbol, and either remove the conflicting " |
| | 1167 | "symbol or rename the \"catch\" variable." }, |
| | 1168 | |
| | 1169 | { TCERR_BREAK_REQ_LABEL, |
| | 1170 | "label name expected after \"break\", but found \"%~.*s\"", |
| | 1171 | "A label name was expected after the \"break\" keyword, but the " |
| | 1172 | "compiler found \"%~.*s\" instead. This might indicate that a " |
| | 1173 | "semicolon after \"break\" is missing. Check the syntax." }, |
| | 1174 | |
| | 1175 | { TCERR_CONT_REQ_LABEL, |
| | 1176 | "label name expected after \"continue\", but found \"%~.*s\"", |
| | 1177 | "A label name was expected after the \"continue\" keyword, but the " |
| | 1178 | "compiler found \"%~.*s\" instead. This might indicate that a " |
| | 1179 | "semicolon after \"continue\" is missing. Check the syntax." }, |
| | 1180 | |
| | 1181 | { TCERR_GOTO_REQ_LABEL, |
| | 1182 | "label name expected after \"goto\", but found \"%~.*s\"", |
| | 1183 | "A label name was expected after the \"goto\" keyword, but the " |
| | 1184 | "compiler found \"%~.*s\" instead. Check the syntax and insert " |
| | 1185 | "the missing label name." }, |
| | 1186 | |
| | 1187 | { TCERR_REDEF_AS_FUNC, |
| | 1188 | "symbol \"%~.*s\" is already defined - can't redefine as function", |
| | 1189 | "The symbol \"%~.*s\" is already defined, so you cannot use it " |
| | 1190 | "as the name of a function here. This symbol is already being " |
| | 1191 | "used as the name of an object or property elsewhere " |
| | 1192 | "in your program. Change the name to a unique symbol." }, |
| | 1193 | |
| | 1194 | { TCERR_INVAL_EXTERN, |
| | 1195 | "invalid \"extern\" type specifier \"%~.*s\"", |
| | 1196 | "Invalid keyword \"%~.*s\" following \"extern\". The \"extern\" " |
| | 1197 | "keyword must be followed by \"function\" or \"object\" to indicate " |
| | 1198 | "the type of the external symbol to declare." }, |
| | 1199 | |
| | 1200 | { TCERR_EXTERN_NO_CODE_BODY, |
| | 1201 | "code body is not allowed in an \"extern function\" declaration", |
| | 1202 | "This \"extern function\" declaration is not valid because it has " |
| | 1203 | "a left brace introducing a code body after the function prototype. " |
| | 1204 | "An extern function declaration can have only the prototype, because " |
| | 1205 | "it specifies that the actual code body of the function is defined " |
| | 1206 | "in another module. Either remove the \"extern\" keyword or remove " |
| | 1207 | "the code body." }, |
| | 1208 | |
| | 1209 | { TCERR_FUNC_REDEF, |
| | 1210 | "function \"%~.*s\" is already defined", |
| | 1211 | "The function \"%~.*s\" is already defined earlier in the program. " |
| | 1212 | "Each function must have a unique name. Remove the redundant " |
| | 1213 | "definition or change the name of one of the functions." }, |
| | 1214 | |
| | 1215 | { TCERR_INCOMPAT_FUNC_REDEF, |
| | 1216 | "function \"%~.*s\" has an incompatible previous declaration", |
| | 1217 | "The function \"%~.*s\" has an incompatible declaration previously " |
| | 1218 | "in the program. The earlier definition could be from an \"extern\" " |
| | 1219 | "declaration in this source file, or it could come from a symbol " |
| | 1220 | "file for another module in your program. Each definition of " |
| | 1221 | "a function must declare the same parameter list for the function. " |
| | 1222 | "Check for other declarations of this function and correct the " |
| | 1223 | "inconsistency." }, |
| | 1224 | |
| | 1225 | { TCERR_OBJDEF_REQ_COLON, |
| | 1226 | "expected ':' after object name in object definition, but found \"%~.*s\"", |
| | 1227 | "A colon ':' is required after the object name in an object " |
| | 1228 | "definition, but the compiler found \"%~.*s\" instead. Check the " |
| | 1229 | "object syntax and insert the missing colon." }, |
| | 1230 | |
| | 1231 | { TCERR_OBJDEF_REQ_SC, |
| | 1232 | "expected superclass name in object definition, but found \"%~.*s\"", |
| | 1233 | "The name of a superclass was expected in the object definition, " |
| | 1234 | "but the compiler found \"%~.*s\". Check the object syntax; add or " |
| | 1235 | "correct the superclass name, or correct other syntax errors." }, |
| | 1236 | |
| | 1237 | { TCERR_OBJDEF_OBJ_NO_SC, |
| | 1238 | "superclasses cannot be specified with \"object\" as the base class", |
| | 1239 | "This object specifies \"object\" as the base class, but also lists " |
| | 1240 | "named superclasses. This is not valid -- a basic \"object\" " |
| | 1241 | "definition cannot also specify named superclasses." }, |
| | 1242 | |
| | 1243 | { TCERR_REDEF_AS_OBJ, |
| | 1244 | "symbol \"%~.*s\" is already defined - can't redefine as object", |
| | 1245 | "The symbol \"%~.*s\" is already defined, so you cannot use it " |
| | 1246 | "as the name of an object here. This symbol is already being " |
| | 1247 | "used as the name of a function or property elsewhere " |
| | 1248 | "in your program. Change the name to a unique symbol." }, |
| | 1249 | |
| | 1250 | { TCERR_OBJ_REDEF, |
| | 1251 | "object \"%~.*s\" is already defined - can't redefine as object", |
| | 1252 | "The object \"%~.*s\" is already defined earlier in the program. " |
| | 1253 | "Each object must have a unique name. Remove the redundant " |
| | 1254 | "definition or change the name of one of the objects." }, |
| | 1255 | |
| | 1256 | { TCERR_OBJDEF_REQ_PROP, |
| | 1257 | "expected property name in object definition, but found \"%~.*s\"", |
| | 1258 | "A property name was expected in the object definition, but the " |
| | 1259 | "compiler found \"%~.*s\" instead. Check for a missing semicolon at the " |
| | 1260 | "end of the object definition, and check for unbalanced " |
| | 1261 | "braces prior to this line." }, |
| | 1262 | |
| | 1263 | { TCERR_REDEF_AS_PROP, |
| | 1264 | "symbol \"%~.*s\" is already defined - can't redefine as property", |
| | 1265 | "The symbol \"%~.*s\" is already defined, so you cannot use it as " |
| | 1266 | "the name of a property here. The symbol is already being " |
| | 1267 | "used as the name of an object or function elsewhere in the program. " |
| | 1268 | "Change the name to a unique symbol." }, |
| | 1269 | |
| | 1270 | { TCERR_OBJDEF_REQ_PROPVAL, |
| | 1271 | "expected property value or method after property name \"%~.*s\", " |
| | 1272 | "but found \"%~.*s\"", |
| | 1273 | "A property value or method was expected after the property " |
| | 1274 | "name \"%~.*s\", but the compiler found \"%~.*s\". Check the syntax " |
| | 1275 | "and supply a property value expression or method code in braces '{ }'."}, |
| | 1276 | |
| | 1277 | { TCERR_REPLACE_REQ_OBJ_OR_FUNC, |
| | 1278 | "expected \"function\" or object name after \"replace\", but found " |
| | 1279 | "\"%~.*s\"", |
| | 1280 | "The keyword \"replace\" must be followed by \"function\" or by an " |
| | 1281 | "object name, but the compiler found \"%~.*s\" instead." }, |
| | 1282 | |
| | 1283 | { TCERR_REPMODOBJ_UNDEF, |
| | 1284 | "replace/modify cannot be used with an object not previously defined", |
| | 1285 | "The \"replace\" and \"modify\" keywords cannot be used with an object " |
| | 1286 | "that is not previously defined. The object must at least be defined " |
| | 1287 | "as an \"extern\" object before it can be replaced or modified." }, |
| | 1288 | |
| | 1289 | { TCERR_DQUOTE_IN_EXPR, |
| | 1290 | "a double-quoted string (\"%~.*s\") is not valid within an expression", |
| | 1291 | "The double-quoted string value (\"%~.*s\") cannot be used within an " |
| | 1292 | "expression, because a double-quoted string has no value. A " |
| | 1293 | "double-quoted string indicates that you simply want to display " |
| | 1294 | "the text of the string. Change " |
| | 1295 | "the string's quotes to single quotes (') if you meant to use the " |
| | 1296 | "string as a value in an expression." }, |
| | 1297 | |
| | 1298 | { TCERR_ASI_IN_COND, |
| | 1299 | "assignment in condition (possible use of '=' where '==' was intended)", |
| | 1300 | "The condition expression contains an assignment. This frequently " |
| | 1301 | "indicates that the '=' (assignment) operator was used where the " |
| | 1302 | "'==' (equality comparison) operator was intended. Check the condition " |
| | 1303 | "to ensure that an assignment was actually intended. If the assignment " |
| | 1304 | "is intentional, you can remove this warning by modifying the " |
| | 1305 | "condition expression from the current form (x = y) to the form " |
| | 1306 | "((x = y) != nil) or ((x = y) != 0) as appropriate, which will not " |
| | 1307 | "change the meaning but will make it clear that the assignment is " |
| | 1308 | "intentional." }, |
| | 1309 | |
| | 1310 | { TCERR_REPFUNC_UNDEF, |
| | 1311 | "\"replace\"/\"modify\" cannot be used with a function not " |
| | 1312 | "previously defined", |
| | 1313 | "The \"replace\" and \"modify\" keywords cannot be used with a function " |
| | 1314 | "that is not previously defined. The function must at least be defined " |
| | 1315 | "as an \"extern\" function before it can be replaced." }, |
| | 1316 | |
| | 1317 | { TCERR_REPLACE_PROP_REQ_MOD_OBJ, |
| | 1318 | "\"replace\" can be used with a property only in a \"modify\" object", |
| | 1319 | "The \"replace\" keyword can be used with a property only in an " |
| | 1320 | "object defined with the \"modify\" keyword. This object is not " |
| | 1321 | "defined with \"modify\", so \"replace\" is not allowed with its " |
| | 1322 | "property definitions." }, |
| | 1323 | |
| | 1324 | { TCERR_EXTERN_OBJ_REQ_SYM, |
| | 1325 | "expected object name symbol in \"extern\" statement but found \"%~.*s\"", |
| | 1326 | "An object name symbol is required after \"extern object\" or " |
| | 1327 | "\"extern class\", but the compiler found \"%~.*s\". Check the syntax " |
| | 1328 | "and supply the missing object name." }, |
| | 1329 | |
| | 1330 | { TCERR_PROP_REDEF_IN_OBJ, |
| | 1331 | "property \"%~.*s\" already defined in object", |
| | 1332 | "The property \"%~.*s\" is already defined in this object. An " |
| | 1333 | "object can have at most one definition for a given property. Remove " |
| | 1334 | "the redundant property definition." }, |
| | 1335 | |
| | 1336 | { TCERR_PROP_REQ_EQ, |
| | 1337 | "'=' required between property name and value - found \"%~.*s\"", |
| | 1338 | "An equals sign '=' is required to separate the property name and " |
| | 1339 | "its value; the parser found \"%~.*s\" where the '=' should go. " |
| | 1340 | "Check the syntax and supply the missing '='." }, |
| | 1341 | |
| | 1342 | { TCERR_LIST_EXPECT_ELEMENT, |
| | 1343 | "extra list element expected after comma, but found end of list", |
| | 1344 | "An additional list element was expected after the last comma in the " |
| | 1345 | "list, but the compiler found the end of the list (a closing bracket " |
| | 1346 | "']') instead. Check the list and either remove the unnecessary " |
| | 1347 | "extra comma or add the missing list element." }, |
| | 1348 | |
| | 1349 | { TCERR_REQ_INTRINS_CLASS_NAME, |
| | 1350 | "expected class name string after class name symbol, but found \"%~.*s\"", |
| | 1351 | "The \"intrinsic class\" name must be followed by the global name " |
| | 1352 | "of the metaclass, enclosed in single-quotes, but the compiler found " |
| | 1353 | "\"%~.*s\" instead. Check the statement syntax." }, |
| | 1354 | |
| | 1355 | { TCERR_REQ_INTRINS_CLASS_LBRACE, |
| | 1356 | "expected '{' after intrinsic class name, but found \"%~.*s\"", |
| | 1357 | "The property listing for an \"intrinsic class\" statement must be " |
| | 1358 | "closed in braces '{ }'. The compiler found \"%~.*s\" after the " |
| | 1359 | "metaclass name, where the open brace '{' should be. Check the " |
| | 1360 | "syntax." }, |
| | 1361 | |
| | 1362 | { TCERR_EOF_IN_INTRINS_CLASS, |
| | 1363 | "end of file in \"intrinsic class\" list - '}' is probably missing", |
| | 1364 | "The compiler reached the end of the file while still scanning " |
| | 1365 | "an \"intrinsic class\" statement's property listing. The closing " |
| | 1366 | "brace '}' of the list is probably missing; check " |
| | 1367 | "for the missing brace." }, |
| | 1368 | |
| | 1369 | { TCERR_REQ_INTRINS_CLASS_PROP, |
| | 1370 | "expected property name in intrinsic class list, but found \"%~.*s\"", |
| | 1371 | "The compiler expected the name of a property in the intrinsic " |
| | 1372 | "class property list, but found \"%~.*s\" instead. Check the syntax of " |
| | 1373 | "the statement, and check for unbalanced braces." }, |
| | 1374 | |
| | 1375 | { TCERR_REQ_INTRINS_CLASS_NAME_SYM, |
| | 1376 | "expected class name symbol after \"intrinsic class\", " |
| | 1377 | "but found \"%~.*s\"", |
| | 1378 | "The \"intrinsic class\" keywords must be followed by the class " |
| | 1379 | "name symbol, but the compiler found \"%~.*s\" instead. Check " |
| | 1380 | "the statement syntax." }, |
| | 1381 | |
| | 1382 | { TCERR_REDEF_INTRINS_NAME, |
| | 1383 | "symbol \"%~.*s\" is already defined - can't redefine as intrinsic class", |
| | 1384 | "The symbol \"%~.*s\" is already defined, so you cannot use it as " |
| | 1385 | "the name of this intrinsic class. The symbol is already being " |
| | 1386 | "used as the name of an object, function, or property elsewhere " |
| | 1387 | "in the program. Change the name to a unique symbol." }, |
| | 1388 | |
| | 1389 | { TCERR_CANNOT_EVAL_METACLASS, |
| | 1390 | "\"%~.*s\" is an intrinsic class name and cannot be evaluated " |
| | 1391 | "in an expression", |
| | 1392 | "The symbol \"%~.*s\" is an intrinsic class name. This symbol cannot " |
| | 1393 | "be evaluated in an expression, because it has no value. You can " |
| | 1394 | "only use this symbol in specific contexts where class names " |
| | 1395 | "are permitted, such as with 'new'." }, |
| | 1396 | |
| | 1397 | { TCERR_DICT_SYNTAX, |
| | 1398 | "expected 'property' or object name after 'dictionary', " |
| | 1399 | "but found \"%~.*s\"", |
| | 1400 | "The keyword 'property' or an object name symbol must follow " |
| | 1401 | "the 'dictionary' keyword, but the compiler found \"%~.*s\" instead. " |
| | 1402 | "Check the 'dictionary' statement syntax." }, |
| | 1403 | |
| | 1404 | { TCERR_DICT_PROP_REQ_SYM, |
| | 1405 | "expected property name in 'dictionary property' list, but " |
| | 1406 | "found \"%~.*s\"", |
| | 1407 | "The name of a property was expected in the 'dictionary property' " |
| | 1408 | "list, but the compiler found \"%~.*s\" instead. Check the " |
| | 1409 | "statement syntax." }, |
| | 1410 | |
| | 1411 | { TCERR_DICT_PROP_REQ_COMMA, |
| | 1412 | "expected comma in 'dictionary property' list, but found \"%~.*s\"", |
| | 1413 | "A comma was expected after a property name symbol in a " |
| | 1414 | "'dictionary property' list, but the compiler found \"%~.*s\" " |
| | 1415 | "instead. Check the syntax of the property list and ensure that " |
| | 1416 | "each item is separated from the next by a comma, and that the " |
| | 1417 | "list ends with a semicolon." }, |
| | 1418 | |
| | 1419 | { TCERR_REDEF_AS_DICT, |
| | 1420 | "redefining symbol \"%~.*s\" as dictionary object", |
| | 1421 | "The symbol \"%~.*s\" cannot be used as a dictionary object, because " |
| | 1422 | "it is already defined as a different type of object. You must change " |
| | 1423 | "the name of this dictionary object, or change the name of the " |
| | 1424 | "conflicting object definition." }, |
| | 1425 | |
| | 1426 | { TCERR_UNDEF_SYM_SC, |
| | 1427 | "undefined symbol \"%~.*s\" (used as superclass of \"%~.*s\")", |
| | 1428 | "The symbol \"%~.*s\" is undefined. This symbol is used as a superclass " |
| | 1429 | "in the definition of the object \"%~.*s\". Check the object definition " |
| | 1430 | "to ensure that the superclass name is spelled correctly, and check " |
| | 1431 | "that the superclass's object definition is correct." }, |
| | 1432 | |
| | 1433 | { TCERR_VOCAB_REQ_SSTR, |
| | 1434 | "vocabulary property requires string value, but found \"%~.*s\"", |
| | 1435 | "A vocabulary property value must be one or more single-quoted " |
| | 1436 | "string values, but the compiler found \"%~.*s\" instead. Check the " |
| | 1437 | "property definition and use a single-quoted string value." }, |
| | 1438 | |
| | 1439 | { TCERR_VOCAB_NO_DICT, |
| | 1440 | "vocabulary property cannot be defined - no dictionary is active", |
| | 1441 | "A vocabulary property cannot be defined for this object because " |
| | 1442 | "no dictionary is active. Insert a 'dictionary' statement prior " |
| | 1443 | "to this object definition to establish the dictionary object that " |
| | 1444 | "will be used to store this object's vocabulary." }, |
| | 1445 | |
| | 1446 | { TCERR_LISTPAR_NOT_LAST, |
| | 1447 | "variable-argument list parameter must be the last parameter", |
| | 1448 | "A variable-argument list parameter (a parameter enclosed in square " |
| | 1449 | "brackets '[ ]') is required to be the last parameter in the " |
| | 1450 | "parameter list. Remove the parameters following the list parameter." }, |
| | 1451 | |
| | 1452 | { TCERR_LISTPAR_REQ_RBRACK, |
| | 1453 | "expected ']' after variable-argument list parameter, but found \"%~.*s\"", |
| | 1454 | "A closing square bracket ']' was expected following the " |
| | 1455 | "variable-argument list parameter name, but the compiler found " |
| | 1456 | "\"%~.*s\" instead. Insert the missing bracket." }, |
| | 1457 | |
| | 1458 | { TCERR_LISTPAR_REQ_SYM, |
| | 1459 | "variable-argument list parameter name expected, but found \"%~.*s\"", |
| | 1460 | "A parameter name symbol was expected after the left square bracket '[', " |
| | 1461 | "but the compiler found \"%~.*s\" instead. Check the syntax." }, |
| | 1462 | |
| | 1463 | { TCERR_DBG_NO_ANON_FUNC, |
| | 1464 | "anonymous functions are not allowed in the debugger", |
| | 1465 | "Anonymous functions are not allowed in the debugger." }, |
| | 1466 | |
| | 1467 | { TCERR_ANON_FUNC_REQ_NEW, |
| | 1468 | "anonymous function requires 'new' before 'function' keyword", |
| | 1469 | "An anonymous function definition requires the keyword 'new' " |
| | 1470 | "before the keyword 'function'. This definition does not contain " |
| | 1471 | "the 'new' keyword. Insert 'new' before 'function' in the " |
| | 1472 | "definition." }, |
| | 1473 | |
| | 1474 | { TCERR_GRAMMAR_REQ_SYM, |
| | 1475 | "expected symbol name after 'grammar', but found \"%~.*s\"", |
| | 1476 | "A symbol giving the name of a production is required after " |
| | 1477 | "the 'grammar' keyword, but the compiler found \"%~.*s\" instead. " |
| | 1478 | "Check the statement syntax." }, |
| | 1479 | |
| | 1480 | { TCERR_GRAMMAR_REQ_COLON, |
| | 1481 | "expected ':' after production name, but found \"%~.*s\"", |
| | 1482 | "A colon ':' is required after the name of the production in " |
| | 1483 | "a 'grammar' statement, but the compiler found \"%~.*s\" instead. " |
| | 1484 | "Check the statement syntax and insert the missing colon." }, |
| | 1485 | |
| | 1486 | { TCERR_GRAMMAR_REQ_OBJ_OR_PROP, |
| | 1487 | "object or property symbol required in 'grammar' token list " |
| | 1488 | "(found \"%~.*s\")", |
| | 1489 | "Symbols used in a token list in a 'grammar' statement must " |
| | 1490 | "be property or object names. The symbol \"%~.*s\" is not a " |
| | 1491 | "property or object name, so it cannot be used in the token list. " |
| | 1492 | "Remove this symbol from the list or replace it with a symbol " |
| | 1493 | "of the appropriate type." }, |
| | 1494 | |
| | 1495 | { TCERR_GRAMMAR_ARROW_REQ_PROP, |
| | 1496 | "'->' in 'grammar' token list must be followed by a property name " |
| | 1497 | "(found \"%~.*s\")", |
| | 1498 | "An arrow '->' in a 'grammar' statement's token list must be " |
| | 1499 | "followed by a property name, but the compiler found \"%~.*s\" " |
| | 1500 | "instead. Check the statement syntax." }, |
| | 1501 | |
| | 1502 | { TCERR_GRAMMAR_INVAL_TOK, |
| | 1503 | "invalid token \"%~.*s\" in 'grammar' token list", |
| | 1504 | "The token \"%~.*s\" is not valid in a 'grammar' statement's token " |
| | 1505 | "list. The token list must consist of property names, object names, " |
| | 1506 | "and literal strings (in single quotes). Check the statement syntax." }, |
| | 1507 | |
| | 1508 | { TCERR_REDEF_AS_GRAMPROD, |
| | 1509 | "redefining symbol \"%~.*s\" as grammar production object", |
| | 1510 | "The symbol \"%~.*s\" cannot be used as a grammar production, because " |
| | 1511 | "it is already defined as a different type of object. You must change " |
| | 1512 | "the name of this production object, or change the name of the " |
| | 1513 | "conflicting object definition." }, |
| | 1514 | |
| | 1515 | { TCERR_GRAMMAR_REQ_PROD, |
| | 1516 | "object \"%~.*s\" is not valid in a grammar rule - only production " |
| | 1517 | "names are allowed", |
| | 1518 | "The object \"%~.*s\" cannot be used in a grammar rule. Only " |
| | 1519 | "production names are allowed. A production name is a symbol " |
| | 1520 | "that is used immediately after the 'grammar' keyword in a " |
| | 1521 | "grammar rule definition." }, |
| | 1522 | |
| | 1523 | { TCERR_ENUM_REQ_SYM, |
| | 1524 | "symbol expected in 'enum' list - found \"%~.*s\"", |
| | 1525 | "A symbol name was expected in the 'enum' statement's list of " |
| | 1526 | "enumerator symbols to define, but the compiler found \"%~.*s\" " |
| | 1527 | "instead. Check the statement syntax." }, |
| | 1528 | |
| | 1529 | { TCERR_REDEF_AS_ENUM, |
| | 1530 | "symbol \"%~.*s\" is already defined - can't be used as an enum name", |
| | 1531 | "The symbol \"%~.*s\" is already defined, so it can't be used as an " |
| | 1532 | "'enum' name. An 'enum' name cannot be used for any other global " |
| | 1533 | "symbol, such as an object, function, or property name. Change the " |
| | 1534 | "enum name, or change the conflicting symbol definition." }, |
| | 1535 | |
| | 1536 | { TCERR_ENUM_REQ_COMMA, |
| | 1537 | "comma expected in 'enum' symbol list, but found \"%~.*s\"", |
| | 1538 | "A comma was expected after a symbol name in the 'enum' statement's " |
| | 1539 | "list of enumerator symbols, but the compiler found \"%~.*s\" " |
| | 1540 | "instead. Check the statement syntax and insert the missing " |
| | 1541 | "comma." }, |
| | 1542 | |
| | 1543 | { TCERR_GRAMMAR_BAD_ENUM, |
| | 1544 | "enumerator \"%~.*s\" in 'grammar' list is not declared with " |
| | 1545 | "'enum token'", |
| | 1546 | "The enumerator \"%~.*s\" in the 'grammar' list was not originally " |
| | 1547 | "declared with 'enum token'. Only 'enum token' enumerators can be " |
| | 1548 | "used in 'grammar' token lists. Check the original definition of " |
| | 1549 | "the enumerator and change it to 'enum token', or remove the " |
| | 1550 | "enumerator from this 'grammar' list." }, |
| | 1551 | |
| | 1552 | { TCERR_GRAMMAR_STAR_NOT_END, |
| | 1553 | "'*' must be the last token in a 'grammar' alternative list " |
| | 1554 | "(found \"%~.*s\")", |
| | 1555 | "A '*' must be the last token in a 'grammar' alternative list, " |
| | 1556 | "because this specifies a match for any remaining input tokens. " |
| | 1557 | "The compiler found \"%~.*s\" after the '*'. Check the grammar " |
| | 1558 | "definition, and end the alternative immediately after the '*'." }, |
| | 1559 | |
| | 1560 | { TCERR_GRAMMAR_QUAL_NOT_FIRST, |
| | 1561 | "grammar qualifiers must precede all tokens", |
| | 1562 | "Grammar qualifiers (sequences enclosed in square brackets '[ ]' " |
| | 1563 | "within a 'grammar' statement's item list) must precede all " |
| | 1564 | "token items in an alternative. This statement contains a qualifier " |
| | 1565 | "that appears after one or more token items. Move the qualifier " |
| | 1566 | "to the start of the alternative's token list." }, |
| | 1567 | |
| | 1568 | { TCERR_GRAMMAR_QUAL_REQ_SYM, |
| | 1569 | "keyword required after '[' in grammar qualifier - found \"%~.*s\"", |
| | 1570 | "A keyword is required after the open bracket '[' in a grammar " |
| | 1571 | "qualifier, but the compiler found \"%~.*s\" instead. The keyword " |
| | 1572 | "must specify a valid grammar qualifier." }, |
| | 1573 | |
| | 1574 | { TCERR_BAD_GRAMMAR_QUAL, |
| | 1575 | "invalid grammar qualifier \"%~.*s\"", |
| | 1576 | "The grammar qualifier \"%~.*s\" is not valid. Check the statement " |
| | 1577 | "syntax." }, |
| | 1578 | |
| | 1579 | { TCERR_GRAMMAR_QUAL_REQ_INT, |
| | 1580 | "grammar qualifier \"[%s]\" requires integer constant value", |
| | 1581 | "The grammar qualifier \"[%s]\" requires an integer constant value. " |
| | 1582 | "The expression is missing, invalid, or does not evaluate to a " |
| | 1583 | "constant integer value. Check the qualifier syntax." }, |
| | 1584 | |
| | 1585 | { TCERR_GRAMMAR_QUAL_REQ_RBRACK, |
| | 1586 | "']' required after grammar qualifier - found \"%~.*s\"", |
| | 1587 | "A closing bracket ']' is required at the end of a grammar " |
| | 1588 | "qualifier, but the compiler found \"%~.*s\" instead. Check the " |
| | 1589 | "syntax, and add the missing ']' or remove extraneous extra text." }, |
| | 1590 | |
| | 1591 | { TCERR_PLUSPROP_REQ_SYM, |
| | 1592 | "symbol expected after '+ property', but found \"%~.*s\" instead", |
| | 1593 | "A property symbol is required for the '+ property' statement, but the " |
| | 1594 | "compiler found \"%~.*s\" instead. Check the syntax." }, |
| | 1595 | |
| | 1596 | { TCERR_PLUSOBJ_TOO_MANY, |
| | 1597 | "too many '+' signs in object definition - location not defined", |
| | 1598 | "This object definition has too many '+' signs. The immediately " |
| | 1599 | "preceding object is not at a deep enough containment level for " |
| | 1600 | "this many '+' signs. Check the previous object's location " |
| | 1601 | "definition. You might need to move the immediately preceding " |
| | 1602 | "object definition so that it doesn't come between this object " |
| | 1603 | "and the preceding container you wish to refer to." }, |
| | 1604 | |
| | 1605 | { TCERR_OBJ_TPL_OP_REQ_PROP, |
| | 1606 | "property name required after \"%s\" in object template - found \"%~.*s\"", |
| | 1607 | "A property name is required after the \"%s\" token in the 'object " |
| | 1608 | "template' statement, but the compiler found \"%~.*s\" instead. Check " |
| | 1609 | "the statement syntax." }, |
| | 1610 | |
| | 1611 | { TCERR_OBJ_TPL_STR_REQ_PROP, |
| | 1612 | "property name required in object template string - found %~.*s", |
| | 1613 | "The contents of each string in an 'object " |
| | 1614 | "template' statement must be a property name symbol, but the compiler " |
| | 1615 | "found %~.*s in a string instead. Check the statement syntax." }, |
| | 1616 | |
| | 1617 | { TCERR_OBJ_TPL_REQ_RBRACK, |
| | 1618 | "expected ']' after object template property name - found \"%~.*s\"", |
| | 1619 | "A matching right square bracket ']' is required after a list property " |
| | 1620 | "name in an 'object template' statement, but the compiler found " |
| | 1621 | "\"%~.*s\" instead. Check the statement syntax." }, |
| | 1622 | |
| | 1623 | { TCERR_OBJ_TPL_BAD_TOK, |
| | 1624 | "unexpected token \"%~.*s\" in object template", |
| | 1625 | "The token \"%~.*s\" is invalid in an 'object template' statement. " |
| | 1626 | "Each entry in the statement must be a property name in single or " |
| | 1627 | "double quotes or square brackets, or one of the allowed operators " |
| | 1628 | "('@', '+', '-', etc) followed by a property name." }, |
| | 1629 | |
| | 1630 | { TCERR_OBJ_TPL_SYM_NOT_PROP, |
| | 1631 | "symbol \"%~.*s\" in object template is not a property", |
| | 1632 | "The symbol \"%~.*s\" is used in an 'object template' statement where " |
| | 1633 | "a property is required, but the symbol is not a property. Check " |
| | 1634 | "for conflicting usage of the symbol (as an object or function name, " |
| | 1635 | "for example)." }, |
| | 1636 | |
| | 1637 | { TCERR_OBJ_DEF_NO_TEMPLATE, |
| | 1638 | "object definition does not match any template", |
| | 1639 | "This object definition appears to use template notation, but it doesn't " |
| | 1640 | "match any defined object template. Check your 'object template' " |
| | 1641 | "definitions to make sure this object syntax is defined, or correct " |
| | 1642 | "this object definition to match one of the defined templates. If " |
| | 1643 | "this object is not intended to use a template at all, the object's " |
| | 1644 | "first property definition probably has a syntax error, so check " |
| | 1645 | "the object's property list syntax." }, |
| | 1646 | |
| | 1647 | { TCERR_OBJ_TPL_NO_VOCAB, |
| | 1648 | "property \"%~.*s\" is a dictionary property - not valid in templates", |
| | 1649 | "Property \"%~.*s\" is a dictionary property, which cannot be used " |
| | 1650 | "in an object template." }, |
| | 1651 | |
| | 1652 | { TCERR_OBJ_TPL_PROP_DUP, |
| | 1653 | "property \"%~.*s\" duplicated in object template", |
| | 1654 | "The property \"%~.*s\" appears more than once in this 'object template' " |
| | 1655 | "list. A given property can be used only once in a template." }, |
| | 1656 | |
| | 1657 | { TCERR_META_ALREADY_DEF, |
| | 1658 | "intrinsic class has been previously defined as \"%~.*s\"", |
| | 1659 | "This same intrinsic class has been previously defined with " |
| | 1660 | "the name \"%~.*s\". An intrinsic class may only be defined with " |
| | 1661 | "one class symbol. Remove one of the conflicting definitions." }, |
| | 1662 | |
| | 1663 | { TCERR_OBJ_DEF_REQ_SEM, |
| | 1664 | "missing semicolon at end of object definition - found \"%~.*s\"", |
| | 1665 | "This object definition is missing its closing semicolon ';' - the " |
| | 1666 | "compiler found \"%~.*s\", which the compiler must assume is the start " |
| | 1667 | "of a new statement or object definition. Insert the missing " |
| | 1668 | "semicolon. If this is actually meant to be part of the object " |
| | 1669 | "definition, there is a syntax error here - check and correct the " |
| | 1670 | "syntax." }, |
| | 1671 | |
| | 1672 | { TCERR_EXPECTED_STMT_START, |
| | 1673 | "expected start of statement, but found \"%~.*s\"", |
| | 1674 | "The compiler expected to find the beginning of a statement, " |
| | 1675 | "but found \"%~.*s\" instead. Check the statement syntax; check " |
| | 1676 | "for preceding strings that weren't properly terminated, or extra " |
| | 1677 | "or missing braces." }, |
| | 1678 | |
| | 1679 | { TCERR_MISSING_COLON_FORMAL, |
| | 1680 | "missing colon at end of anonymous function formal list - found \"%~.*s\"", |
| | 1681 | "The short-form of the anonymous function definition requires a colon " |
| | 1682 | "':' at the end of the formal parameter list, but the compiler " |
| | 1683 | "found \"%~.*s\" instead. Even if the function has no arguments, it " |
| | 1684 | "still requires a colon immediately following the open brace '{'. " }, |
| | 1685 | |
| | 1686 | { TCERR_SEM_IN_SHORT_ANON_FN, |
| | 1687 | "semicolon is not allowed in a short anonymous function", |
| | 1688 | "This short-form anonymous function contains a semicolon, which is " |
| | 1689 | "not allowed. A short-form anonymous function must consist of " |
| | 1690 | "a single expression, and is terminated with the closing brace '}' " |
| | 1691 | "with no semicolon between the expression and the brace." }, |
| | 1692 | |
| | 1693 | { TCERR_SHORT_ANON_FN_REQ_RBRACE, |
| | 1694 | "semicolon is not allowed in a short-form anonymous function", |
| | 1695 | "This short-form anonymous function's expression is followed by a " |
| | 1696 | "semicolon, which is not allowed. A short-form anonymous function " |
| | 1697 | "can contain only an expression, and ends with a right brace '}'." }, |
| | 1698 | |
| | 1699 | { TCERR_SHORT_ANON_FN_REQ_RBRACE, |
| | 1700 | "missing '}' at end of anonymous function expression - found \"%~.*s\"", |
| | 1701 | "There is no right brace '}' at the end of this short-form " |
| | 1702 | "anonymous function. A short-form anonymous function must contain " |
| | 1703 | "only an expression and end with '}'. Check the syntax." }, |
| | 1704 | |
| | 1705 | { TCERR_IN_REQ_LPAR, |
| | 1706 | "missing '(' after 'in' operator - found \"%~.*s\"", |
| | 1707 | "An open parenthesis '(' is required after the 'in' operator, but " |
| | 1708 | "the compiler found \"%~.*s\". Check the syntax and insert the " |
| | 1709 | "missing parenthesis." }, |
| | 1710 | |
| | 1711 | { TCERR_EXPECTED_IN_COMMA, |
| | 1712 | "expected ',' or ')' in 'in' list, but found \"%~.*s\"", |
| | 1713 | "Expected a comma ',' or right parenthesis ')' in the 'in' list, " |
| | 1714 | "but found \"%~.*s\". The expressions in an 'in' list must be " |
| | 1715 | "separated by commas, and the entire list must be enclosed in " |
| | 1716 | "parentheses '( )'. Check for errors and unbalanced parentheses " |
| | 1717 | "in the argument expression." }, |
| | 1718 | |
| | 1719 | { TCERR_EXPECTED_IN_RPAR, |
| | 1720 | "expected ')' at end of 'in' list, but found \"%~.*s\"", |
| | 1721 | "Expected a right parenthesis ')' at the end of the 'in' list, " |
| | 1722 | "but found \"%~.*s\". The compiler is assuming that this is the end " |
| | 1723 | "of the statement. Please insert the missing parenthesis, or check " |
| | 1724 | "the argument list for unbalanced parentheses or other errors." }, |
| | 1725 | |
| | 1726 | { TCERR_CANNOT_MOD_OR_REP_TYPE, |
| | 1727 | "objects of this type cannot be modified or replaced", |
| | 1728 | "You cannot use 'modify' or 'replace' with an object of this type. " |
| | 1729 | "Only objects and classes originally defined as ordinary objects " |
| | 1730 | "can be modified or replaced." }, |
| | 1731 | |
| | 1732 | { TCERR_REQ_FOREACH_LPAR, |
| | 1733 | "expected '(' after \"foreach\", but found \"%~.*s\"", |
| | 1734 | "An open parenthesis '(' is required after the \"foreach\" keyword, " |
| | 1735 | "but the compiler found \"%~.*s\" instead. Check the syntax " |
| | 1736 | "and insert the missing parenthesis." }, |
| | 1737 | |
| | 1738 | { TCERR_MISSING_FOREACH_EXPR, |
| | 1739 | "missing expression in \"foreach\" - found \"%~.*s\"", |
| | 1740 | "This \"foreach\" statement is missing its iteration expression; " |
| | 1741 | "the compiler found \"%~.*s\" when it was expecting the iteration " |
| | 1742 | "expression of the form 'x in <collectionExpression>'. Check the " |
| | 1743 | "syntax." }, |
| | 1744 | |
| | 1745 | { TCERR_FOREACH_REQ_IN, |
| | 1746 | "\"in\" required in \"foreach\" - found \"%~.*s\"", |
| | 1747 | "The keyword \"in\" was expected after the iteration variable " |
| | 1748 | "expression in the this \"foreach\" statement, but the compiler " |
| | 1749 | "found \"%~.*s\" instead. Check the syntax." }, |
| | 1750 | |
| | 1751 | { TCERR_REQ_FOREACH_RPAR, |
| | 1752 | "missing ')' at end of \"foreach\" expression - found \"%~.*s\"", |
| | 1753 | "A closing parenthesis ')' is required at the end of the \"foreach\" " |
| | 1754 | "statement's expression, but the compiler found \"%~.*s\" instead. " |
| | 1755 | "Check the syntax, and insert the missing parenthesis, or correct " |
| | 1756 | "unbalanced parentheses or other syntax errors earlier in the " |
| | 1757 | "expression." }, |
| | 1758 | |
| | 1759 | { TCERR_PROPDECL_REQ_SYM, |
| | 1760 | "expected property name in 'property' list, but found \"%~.*s\"", |
| | 1761 | "The name of a property was expected in the 'property' " |
| | 1762 | "list, but the compiler found \"%~.*s\" instead. Check the " |
| | 1763 | "statement syntax." }, |
| | 1764 | |
| | 1765 | { TCERR_PROPDECL_REQ_COMMA, |
| | 1766 | "expected comma in 'property' list, but found \"%~.*s\"", |
| | 1767 | "A comma was expected after a property name symbol in a " |
| | 1768 | "'property' list, but the compiler found \"%~.*s\" " |
| | 1769 | "instead. Check the syntax of the list and ensure that " |
| | 1770 | "each item is separated from the next by a comma, and that the " |
| | 1771 | "list ends with a semicolon." }, |
| | 1772 | |
| | 1773 | { TCERR_EXPORT_REQ_SYM, |
| | 1774 | "expected symbol in 'export' statement, but found \"%~.*s\"", |
| | 1775 | "A symbol name must follow the 'export' keyword, but the compiler " |
| | 1776 | "found \"%~.*s\" instead. Check the syntax of the statement." }, |
| | 1777 | |
| | 1778 | { TCERR_EXPORT_EXT_TOO_LONG, |
| | 1779 | "external name \"%~.*s\" in 'export' is too long", |
| | 1780 | "The external name \"%~.*s\" in this 'export' statement is too long. " |
| | 1781 | "External names are limited to the same maximum length as regular " |
| | 1782 | "symbol names." }, |
| | 1783 | |
| | 1784 | { TCERR_UNTERM_OBJ_DEF, |
| | 1785 | "unterminated object definition", |
| | 1786 | "This object definition is not properly terminated - a semicolon ';' or " |
| | 1787 | "closing brace '}' should appear at the end of the definition. The " |
| | 1788 | "compiler found a new object definition or a statement that cannot " |
| | 1789 | "be part of an object definition, but did not find the end of the " |
| | 1790 | "current object definition. Insert the appropriate terminator, or " |
| | 1791 | "check the syntax of the property definition. Note that this error " |
| | 1792 | "is normally reported at the END of the unterminated object, so if " |
| | 1793 | "the line number of the error refers to the start of a new object, " |
| | 1794 | "it's probably the preceding object that is not property terminated." }, |
| | 1795 | |
| | 1796 | { TCERR_OBJ_DEF_REQ_RBRACE, |
| | 1797 | "missing right brace at end of object definition - found \"%~.*s\"", |
| | 1798 | "This object definition is missing its closing brace '}' - the " |
| | 1799 | "compiler found \"%~.*s\", which the compiler must assume is the start " |
| | 1800 | "of a new statement or object definition. Insert the missing " |
| | 1801 | "brace. If this is actually meant to be part of the object " |
| | 1802 | "definition, there is a syntax error here - check and correct the " |
| | 1803 | "syntax." }, |
| | 1804 | |
| | 1805 | { TCERR_GRAMMAR_REQ_NAME_RPAR, |
| | 1806 | "missing right parenthesis after name in 'grammar' - found \"%~.*s\"", |
| | 1807 | "A right parenthsis ')' is required after the name tag in a 'grammar' " |
| | 1808 | "statement, but the compiler found \"%~.*s\". Check the syntax and " |
| | 1809 | "insert the missing parenthesis." }, |
| | 1810 | |
| | 1811 | { TCERR_PROPSET_REQ_LBRACE, |
| | 1812 | "missing open brace '{' in propertyset definition - found \"%~.*s\"", |
| | 1813 | "An open brace '{' is required to group the properties in the " |
| | 1814 | "propertyset definition. The compiler found \"%~.*s\" where the " |
| | 1815 | "open brace should be. Check the syntax and remove any extraneous " |
| | 1816 | "characters or insert the missing open brace, as appropriate." }, |
| | 1817 | |
| | 1818 | { TCERR_GRAMMAR_REQ_RPAR_AFTER_GROUP, |
| | 1819 | "missing right parentheses after group in 'grammar' - found \"%~.*s\"", |
| | 1820 | "A right parenthesis ')' is required at the end of a parenthesized " |
| | 1821 | "token group in a 'grammar' statement, but the compiler found " |
| | 1822 | "\"%~.*s\". Check the syntax and insert the missing parenthesis." }, |
| | 1823 | |
| | 1824 | { TCERR_GRAMMAR_GROUP_ARROW_NOT_ALLOWED, |
| | 1825 | "'->' is not allowed after parenthesized group in 'grammar' statement", |
| | 1826 | "The arrow operator '->' is not allowed after a parenthesized group " |
| | 1827 | "in a 'grammar' statement. A group is not a true sub-production, so " |
| | 1828 | "it has no match object to assign to a property. If you want to " |
| | 1829 | "create a run-time match object for the group, make the group into " |
| | 1830 | "a rule for a separate, named production, and use the name of the " |
| | 1831 | "production instead of the group in this rule." }, |
| | 1832 | |
| | 1833 | { TCERR_OBJ_DEF_CANNOT_USE_TEMPLATE, |
| | 1834 | "cannot use template with an unimported extern class as superclass", |
| | 1835 | "This object cannot be defined with template notation (property value " |
| | 1836 | "constants immediately after the superclass name or names) because " |
| | 1837 | "one or more of its superclasses are unimported 'extern' classes, or " |
| | 1838 | "inherit from unimported extern classes. The compiler does not have " |
| | 1839 | "any class relationship information about classes that are explicitly " |
| | 1840 | "defined as external ('extern') and not imported from a symbol file " |
| | 1841 | "that is part of the current build, so it cannot determine which " |
| | 1842 | "class's template definition to use. You must define this object's " |
| | 1843 | "properties using the normal 'name = value' notation rather than " |
| | 1844 | "using a template." }, |
| | 1845 | |
| | 1846 | { TCERR_REPLACE_OBJ_REQ_SC, |
| | 1847 | "base class list required for object 'replace' definition", |
| | 1848 | "This 'replace' statement replaces an object with a new definition, " |
| | 1849 | "but it does not have a superclass list. A superclass list is " |
| | 1850 | "required for the replacement object definition." }, |
| | 1851 | |
| | 1852 | { TCERR_PROPSET_TOO_DEEP, |
| | 1853 | "'propertyset' nesting is too deep", |
| | 1854 | "This 'propertyset' definition is too deeply nested - it's inside " |
| | 1855 | "too many other 'propertyset' definitions. You must reduce " |
| | 1856 | "the nesting depth." }, |
| | 1857 | |
| | 1858 | { TCERR_PROPSET_TOK_TOO_LONG, |
| | 1859 | "expanded property name in propertyset is too long", |
| | 1860 | "This property name, expanded into its full name using the " |
| | 1861 | "propertyset pattern string, is too long. You must shorten the " |
| | 1862 | "fully expanded name by shortening the propertyset pattern, " |
| | 1863 | "shortening this property's name, or reducing the propertyset " |
| | 1864 | "nesting depth." }, |
| | 1865 | |
| | 1866 | { TCERR_PROPSET_INVAL_PAT, |
| | 1867 | "propertyset pattern string \"%~.*s\" is invalid", |
| | 1868 | "The propertyset pattern string \"%~.*s\" is not valid. A propertyset " |
| | 1869 | "pattern string must consist of valid symbol characters plus " |
| | 1870 | "exactly one asterisk '*' (which specifies where the property " |
| | 1871 | "names within the propertyset are inserted into the pattern)." }, |
| | 1872 | |
| | 1873 | { TCERR_PROPSET_INVAL_FORMALS, |
| | 1874 | "invalid formal parameters in propertyset definition", |
| | 1875 | "The propertyset formal parameter list is invalid. The parameters " |
| | 1876 | "must contain exactly one asterisk '*', specifying the argument " |
| | 1877 | "position where additional per-property parameters are inserted " |
| | 1878 | "into the common parameter list." }, |
| | 1879 | |
| | 1880 | { TCERR_CIRCULAR_CLASS_DEF, |
| | 1881 | "circular class definition: %~.*s is a subclass of %~.*s", |
| | 1882 | "This class is defined circularly: %~.*s is a subclass of %~.*s, " |
| | 1883 | "so the latter cannot also be a subclass of the former. Check the " |
| | 1884 | "definition of the base class. " }, |
| | 1885 | |
| | 1886 | { TCERR_GRAMMAR_LIST_REQ_PROP, |
| | 1887 | "property name required in list in 'grammar', but found \"%~.*s\"", |
| | 1888 | "A part-of-speech list within a 'grammar' rule definition is only " |
| | 1889 | "allowed to contain property names, but the compiler found \"%~.*s\" " |
| | 1890 | "instead. Check the syntax. " }, |
| | 1891 | |
| | 1892 | { TCERR_GRAMMAR_LIST_UNCLOSED, |
| | 1893 | "missing '>' in 'grammar' property list - found \"%~.*s\"", |
| | 1894 | "The grammar property list is missing the closing angle bracket '>'; " |
| | 1895 | "the compiler found \"%~.*s\" in the list and will assume that the '>' " |
| | 1896 | "was accidentally omitted. Insert the missing '>' or remove the " |
| | 1897 | "extraneous text from the list. " }, |
| | 1898 | |
| | 1899 | { TCERR_CONST_IDX_INV_TYPE, |
| | 1900 | "invalid indexed type in constant expression - list required", |
| | 1901 | "Only a list value can be indexed in a constant expression. The " |
| | 1902 | "constant value being indexed in this expression is not a list. " }, |
| | 1903 | |
| | 1904 | { TCERR_INVAL_TRANSIENT, |
| | 1905 | "'transient' is not allowed here", |
| | 1906 | "The 'transient' keyword is not allowed in this context. 'transient' " |
| | 1907 | "can only be used to modify an object definition; it cannot be used " |
| | 1908 | "with classes, functions, templates, or any other definitions. " }, |
| | 1909 | |
| | 1910 | { TCERR_GRAMMAR_MOD_REQ_TAG, |
| | 1911 | "'modify/replace grammar' requires name-tag", |
| | 1912 | "'modify grammar' and 'replace grammar' can only be used with a grammar " |
| | 1913 | "rule that includes a name-tag (in parentheses after the production " |
| | 1914 | "name). The name-tag must match a grammar rule defined previously. " }, |
| | 1915 | |
| | 1916 | { TCERR_REQ_INTRINS_SUPERCLASS_NAME, |
| | 1917 | "expected intrinsic superclass name after colon, but found \"%~.*s\"", |
| | 1918 | "The name of the intrinsic class's superclass was expected after " |
| | 1919 | "the colon, but the compiler found \"%~.*s\" instead. Add the " |
| | 1920 | "superclass name (or remove the colon). " }, |
| | 1921 | |
| | 1922 | { TCERR_INTRINS_SUPERCLASS_UNDEF, |
| | 1923 | "intrinsic class superclass \"%~.*s\" is not defined", |
| | 1924 | "The intrinsic class superclass \"%~.*s\" is not defined. You must " |
| | 1925 | "define the superclass before you define any subclasses. " }, |
| | 1926 | |
| | 1927 | { TCERR_GRAMMAR_ENDS_WITH_OR, |
| | 1928 | "grammar rule ends with '|' (add '()' if empty last rule is " |
| | 1929 | "intentional)", |
| | 1930 | "The grammar rule ends with '|'. This indicates that the rule matches " |
| | 1931 | "a completely empty input. This is legal, but it's uncommon. " |
| | 1932 | "If you really intend for this rule to match empty input, " |
| | 1933 | "you can eliminate this warning by making the empty rule " |
| | 1934 | "explicit, by using '()' for the empty match rule. " }, |
| | 1935 | |
| | 1936 | { TCERR_GRAMMAR_EMPTY, |
| | 1937 | "grammar rule is empty (add '()' if this is intentional)", |
| | 1938 | "The grammar rule is empty, which indicates that the rule matches " |
| | 1939 | "a completely empty input. This is legal, but it's uncommon. " |
| | 1940 | "If you really intend for this rule to match empty input, " |
| | 1941 | "you can eliminate this warning by making the empty rule " |
| | 1942 | "explicit, by using '()' for the empty match rule. " }, |
| | 1943 | |
| | 1944 | { TCERR_TEMPLATE_EMPTY, |
| | 1945 | "empty template definition", |
| | 1946 | "The template is empty. A template definition must include at " |
| | 1947 | "least one property name." }, |
| | 1948 | |
| | 1949 | { TCERR_REQ_RPAR_IF, |
| | 1950 | "expected ')' after the \"if\" condition, but found \"%~.*s\"", |
| | 1951 | "A close parenthesis ')' is required after the condition expression " |
| | 1952 | "in the \"if\" statement, to balance the required open parenthesis, " |
| | 1953 | "but the compiler found \"%~.*s\" instead. The compiler will assume " |
| | 1954 | "that a parenthesis was intended. Please correct the syntax " |
| | 1955 | "by inserting a parenthesis." }, |
| | 1956 | |
| | 1957 | { TCERR_INTRINS_SUPERCLASS_NOT_INTRINS, |
| | 1958 | "intrinsic class superclass \"%~.*s\" is not an intrinsic class", |
| | 1959 | "The intrinsic class superclass \"%~.*s\" is not itself an intrinsic " |
| | 1960 | "class. An intrinsic class can only be derived from another intrinsic " |
| | 1961 | "class. " }, |
| | 1962 | |
| | 1963 | { TCERR_FUNC_REDEF_AS_MULTIMETHOD, |
| | 1964 | "function \"%.*s\" is already defined - can't redefine as a multi-method", |
| | 1965 | "The function \"%.*s\" is already defined as an ordinary function, " |
| | 1966 | "so it can't be redefined here with typed parameters. If you intended " |
| | 1967 | "for the original version to be a multi-method, add the 'multimethod' " |
| | 1968 | "modifier to its definition, immediately after the closing parenthesis " |
| | 1969 | "of the parameter list in the function definition, as in " |
| | 1970 | "\"foo(x) multimethod { ... }\"." }, |
| | 1971 | |
| | 1972 | { TCERR_MULTIMETHOD_NOT_ALLOWED, |
| | 1973 | "'multimethod' is not allowed here", |
| | 1974 | "The 'multimethod' modifier is not allowed in this context. " |
| | 1975 | "This modifier can only be used for top-level function definitions." }, |
| | 1976 | |
| | 1977 | { TCERR_MMPARAM_NOT_OBJECT, |
| | 1978 | "parameter type \"%~.*s\" is not an object", |
| | 1979 | "The declared parameter type \"%~.*s\" is not an object. Only object " |
| | 1980 | "or class names can be used to declare parameter types. Check the " |
| | 1981 | "definition of the function and make sure the type name is correct, " |
| | 1982 | "and that the same name isn't used elsewhere as a non-object type." }, |
| | 1983 | |
| | 1984 | { TCERR_MMINH_MISSING_ARG_TYPE, |
| | 1985 | "expected a type name in inherited<> type list, but found \"%~.*s\"", |
| | 1986 | "An inherited<> type list requires a type name (a class or object " |
| | 1987 | "name, or '*' or '...') in each position. The compiler found " |
| | 1988 | "\"%~.*s\" where it expected to find a type. The type must be " |
| | 1989 | "written as a simple name, with no parentheses or other punctuation." }, |
| | 1990 | |
| | 1991 | { TCERR_MMINH_MISSING_COMMA, |
| | 1992 | "expected a comma in inherited<> type list, but found \"%~.*s\"", |
| | 1993 | "The compiler found \"%~.*s\" where it expected to find a comma " |
| | 1994 | "in an inherited<> type list. Each element in the list must be " |
| | 1995 | "separated by a comma." }, |
| | 1996 | |
| | 1997 | { TCERR_MMINH_MISSING_GT, |
| | 1998 | "missing '>' in inherited<> type list (found \"%~.*s\")", |
| | 1999 | "An inherited<> type list must end with a '>'. The compiler " |
| | 2000 | "found \"%~.*s\", and is assuming that the list ends here. If " |
| | 2001 | "this isn't the end of the type list, check the syntax; otherwise, " |
| | 2002 | "just add '>' at the end of the list." }, |
| | 2003 | |
| | 2004 | { TCERR_MMINH_MISSING_ARG_LIST, |
| | 2005 | "argument list missing in inherited<> (expected '(', found \"%~.*s\")", |
| | 2006 | "An inherited<> expression requires an argument list. The compiler " |
| | 2007 | "found \"%~.*s\" it expected the opening '(' of the argument list. " |
| | 2008 | "If the function doesn't take any arguments, use empty parentheses, " |
| | 2009 | "'()', to indicate the empty argument list." }, |
| | 2010 | |
| | 2011 | { TCERR_CODEGEN_NO_MEM, |
| | 2012 | "out of memory for code generation", |
| | 2013 | "Out of memory. The compiler cannot allocate memory to generate " |
| | 2014 | "the compiled code for the program. Make more memory available, " |
| | 2015 | "if possible (by closing other applications, for example), then " |
| | 2016 | "try running the compiler again." }, |
| | 2017 | |
| | 2018 | { TCERR_UNRES_TMP_FIXUP, |
| | 2019 | "%d unresolved branches", |
| | 2020 | "%d unresolved branches." }, |
| | 2021 | |
| | 2022 | { TCERR_WRITEAT_PAST_END, |
| | 2023 | "attempting to write past end of code stream", |
| | 2024 | "The compiler's code generator is attempting to " |
| | 2025 | "write past the end of the code stream." }, |
| | 2026 | |
| | 2027 | { TCERR_SELF_NOT_AVAIL, |
| | 2028 | "'self' is not valid in this context", |
| | 2029 | "The 'self' object is not available in this context. You can only " |
| | 2030 | "refer to 'self' within a method associated with an object; you cannot " |
| | 2031 | "use 'self' in a function or in other code that is not part of an " |
| | 2032 | "object's method." }, |
| | 2033 | |
| | 2034 | { TCERR_INH_NOT_AVAIL, |
| | 2035 | "'inherited' is not valid in this context", |
| | 2036 | "The 'inherited' construct is not available in this context. You " |
| | 2037 | "can only use 'inherited' within a method associated with an object " |
| | 2038 | "with a superclass." }, |
| | 2039 | |
| | 2040 | { TCERR_NO_ADDR_SYM, |
| | 2041 | "cannot take address of \"%~.*s\"", |
| | 2042 | "You cannot take the address of \"%~.*s\". You can only take the " |
| | 2043 | "address of a function or a property." }, |
| | 2044 | |
| | 2045 | { TCERR_CANNOT_ASSIGN_SYM, |
| | 2046 | "cannot assign to \"%~.*s\"", |
| | 2047 | "You cannot assign a value to \"%~.*s\". You can only assign a value " |
| | 2048 | "to an object property, to a local variable or parameter, or to a " |
| | 2049 | "subscripted element of a list." }, |
| | 2050 | |
| | 2051 | { TCERR_CANNOT_EVAL_LABEL, |
| | 2052 | "\"%~.*s\" is a label and cannot be evaluated in an expression", |
| | 2053 | "The symbol \"%~.*s\" is a code label; this symbol cannot be " |
| | 2054 | "evaluated in an expression. You can only use this symbol " |
| | 2055 | "in a 'goto' statement." }, |
| | 2056 | |
| | 2057 | { TCERR_CANNOT_CALL_SYM, |
| | 2058 | "cannot call \"%~.*s\" as a method or function", |
| | 2059 | "The symbol \"%~.*s\" is not a valid method, function, or expression " |
| | 2060 | "value. You cannot invoke this symbol as a method or function call. " |
| | 2061 | "Check spelling, and check for missing operators or mismatched " |
| | 2062 | "parentheses." }, |
| | 2063 | |
| | 2064 | { TCERR_PROP_NEEDS_OBJ, |
| | 2065 | "cannot call property \"%~.*s\" without \"object.\" prefix - no \"self\"", |
| | 2066 | "You cannot call the property \"%~.*s\" in this context without an " |
| | 2067 | "explicit \"object.\" prefix, because no implied \"self\" object " |
| | 2068 | "exists in this context. A \"self\" object exists only inside object " |
| | 2069 | "method code. Check spelling and syntax to ensure you meant to call " |
| | 2070 | "a property, and add the object qualifier if so." }, |
| | 2071 | |
| | 2072 | { TCERR_VOID_RETURN_IN_EXPR, |
| | 2073 | "\"%~.*s\" has no return value - cannot use in an expression", |
| | 2074 | "\"%~.*s\" has no return value, so it cannot be used in an expression " |
| | 2075 | "(there's no value to use in further calculations). Check the " |
| | 2076 | "definition of the function or method." }, |
| | 2077 | |
| | 2078 | { TCERR_INVAL_FUNC_ADDR, |
| | 2079 | "'&' cannot be used with a function name (\"%~.*s\")", |
| | 2080 | "The '&' operator cannot be used with function name \"%~.*s\". If you " |
| | 2081 | "want a reference to the function, simply use the name by itself with " |
| | 2082 | "no argument list. If you want to call the function, put the argument " |
| | 2083 | "list in parentheses '( )' after the function name; if the function " |
| | 2084 | "takes no arguments, use empty parentheses '()' after the function's " |
| | 2085 | "name." }, |
| | 2086 | |
| | 2087 | { TCERR_INVAL_NEW_EXPR, |
| | 2088 | "cannot apply operator 'new' to this expression", |
| | 2089 | "You cannot apply operator 'new' to this expression. 'new' can " |
| | 2090 | "only be applied to an object or metaclass name, followed by an " |
| | 2091 | "optional argument list. Check for syntax errors." }, |
| | 2092 | |
| | 2093 | { TCERR_TOO_FEW_FUNC_ARGS, |
| | 2094 | "too few arguments to function \"%~.*s\"", |
| | 2095 | "Not enough arguments are specified in the call to the " |
| | 2096 | "function \"%~.*s\". Check the definition of the function, " |
| | 2097 | "and check for unbalanced parentheses or other syntax errors." }, |
| | 2098 | |
| | 2099 | { TCERR_TOO_MANY_FUNC_ARGS, |
| | 2100 | "too many arguments to function \"%~.*s\"", |
| | 2101 | "Too many arguments are specified in the call to the " |
| | 2102 | "function \"%~.*s\". Check the definition of the function, " |
| | 2103 | "and check for unbalanced parentheses or other syntax errors." }, |
| | 2104 | |
| | 2105 | { TCERR_SETPROP_NEEDS_OBJ, |
| | 2106 | "cannot assign to property \"%~.*s\" without \"object.\" prefix - " |
| | 2107 | "no \"self\"", |
| | 2108 | "You cannot assign to the property \"%~.*s\" in this context without an " |
| | 2109 | "explicit \"object.\" prefix, because no implied \"self\" object " |
| | 2110 | "exists in this context. A \"self\" object exists only inside object " |
| | 2111 | "method code. Check spelling and syntax to ensure you meant to assign " |
| | 2112 | "to a property, and add the object qualifier if so." }, |
| | 2113 | |
| | 2114 | { TCERR_SYM_NOT_PROP, |
| | 2115 | "invalid '.' expression - symbol \"%~.*s\" is not a property", |
| | 2116 | "The symbol \"%~.*s\" cannot be used after a period '.' because this " |
| | 2117 | "symbol is not a property. The period in a member evaluation " |
| | 2118 | "expression must be followed by a property name, or by an expression " |
| | 2119 | "that yields a property pointer value. Check spelling and check" |
| | 2120 | "for syntax errors." }, |
| | 2121 | |
| | 2122 | { TCERR_INVAL_PROP_EXPR, |
| | 2123 | "invalid '.' expression - right side is not a property", |
| | 2124 | "This property evaluation expression is invalid. The period '.' " |
| | 2125 | "in a property expression must be followed by a property name, " |
| | 2126 | "or by an expression that yields a property pointer value. Check " |
| | 2127 | "spelling and check for syntax errors." }, |
| | 2128 | |
| | 2129 | { TCERR_INH_NOT_OBJ, |
| | 2130 | "illegal 'inherited' - \"%~.*s\" is not a class", |
| | 2131 | "This 'inherited' expression is not valid, because \"%~.*s\" is not " |
| | 2132 | "a class. 'inherited' must be followed by a period '.' or by the " |
| | 2133 | "name of a superclass of this method's object. Check spelling and " |
| | 2134 | "expression syntax." }, |
| | 2135 | |
| | 2136 | { TCERR_INVAL_OBJ_EXPR, |
| | 2137 | "illegal expression - left of '.' is not an object", |
| | 2138 | "The expression on the left of the period '.' is not an object value. " |
| | 2139 | "The left of a '.' expression must be an object name, or an expression " |
| | 2140 | "that evaluates to an object value. Check spelling and syntax." }, |
| | 2141 | |
| | 2142 | { TCERR_SYM_NOT_OBJ, |
| | 2143 | "symbol \"%~.*s\" is not an object - illegal on left of '.'", |
| | 2144 | "The symbol \"%~.*s\" is not an object, so you cannot use this " |
| | 2145 | "symbol on the left side of a period '.' expression. The left side of a " |
| | 2146 | "'.' expression must be an object name or an expression that evaluates " |
| | 2147 | "to an object value. Check the spelling and syntax." }, |
| | 2148 | |
| | 2149 | { TCERR_IF_ALWAYS_TRUE, |
| | 2150 | "\"if\" condition is always true - \"else\" part is unreachable", |
| | 2151 | "The condition in this \"if\" statement is always true, which means " |
| | 2152 | "that the code in the \"else\" clause will never be executed. If this " |
| | 2153 | "is unintentional, check the condition to ensure it's correct." }, |
| | 2154 | |
| | 2155 | { TCERR_IF_ALWAYS_FALSE, |
| | 2156 | "\"if\" condition is always false", |
| | 2157 | "The condition in this \"if\" statement is always false, which means " |
| | 2158 | "that the statement or statements following the \"if\" will never " |
| | 2159 | "be executed. If this is unintentional, check the condition to " |
| | 2160 | "ensure it's correct." }, |
| | 2161 | |
| | 2162 | { TCERR_INVALID_BREAK, |
| | 2163 | "invalid \"break\" - not in a for/while/do/switch", |
| | 2164 | "This \"break\" statement is invalid. A \"break\" can only appear " |
| | 2165 | "in the body of a loop (\"for\", \"while\", or \"do\") or within a " |
| | 2166 | "case in a \"switch\" statement." }, |
| | 2167 | |
| | 2168 | { TCERR_INVALID_CONTINUE, |
| | 2169 | "invalid \"continue\" - not in a for/while/do", |
| | 2170 | "This \"continue\" statement is invalid. A \"continue\" can only appear " |
| | 2171 | "in the body of a loop (\"for\", \"while\", or \"do\")." }, |
| | 2172 | |
| | 2173 | { TCERR_MAIN_NOT_DEFINED, |
| | 2174 | "function _main() is not defined", |
| | 2175 | "No function named _main() is defined. This function must be defined, " |
| | 2176 | "because _main() is the entrypoint to the program at run-time." }, |
| | 2177 | |
| | 2178 | { TCERR_MAIN_NOT_FUNC, |
| | 2179 | "_main is not a function", |
| | 2180 | "The global symbol \"_main\" does not refer to a function. This symbol " |
| | 2181 | "must be defined as a function, because _main() is the entrypoint " |
| | 2182 | "to the program at run-time." }, |
| | 2183 | |
| | 2184 | { TCERR_CATCH_EXC_NOT_OBJ, |
| | 2185 | "exception class symbol \"%~.*s\" in \"catch\" clause is not an object", |
| | 2186 | "The exception class symbol \"%~.*s\" used in this \"catch\" clause " |
| | 2187 | "is not an object class. Only an object class can be used to " |
| | 2188 | "specify the type of exception to catch." }, |
| | 2189 | |
| | 2190 | { TCERR_INVALID_BREAK_LBL, |
| | 2191 | "invalid \"break\" - no label \"%~.*s\" on any enclosing statement", |
| | 2192 | "This \"break\" is invalid because the label \"%~.*s\" does not " |
| | 2193 | "refer to an enclosing statement. When a label is used with " |
| | 2194 | "\"break\", the label must refer to an enclosing statement. " |
| | 2195 | "Check for unbalanced braces, and check that the label is correct." }, |
| | 2196 | |
| | 2197 | { TCERR_INVALID_CONT_LBL, |
| | 2198 | "invalid \"continue\" - no label \"%~.*s\" on any enclosing loop", |
| | 2199 | "This \"continue\" is invalid because the label \"%~.*s\" does not " |
| | 2200 | "refer to an enclosing statement. When a label is used with " |
| | 2201 | "\"continue\", the label must refer directly to an enclosing loop " |
| | 2202 | "(\"while\", \"for\", or \"do\") statement. Check for unbalanced " |
| | 2203 | "braces, and check that the label is correct." }, |
| | 2204 | |
| | 2205 | { TCERR_INVALID_GOTO_LBL, |
| | 2206 | "invalid \"goto\" - label \"%~.*s\" is not defined in this function " |
| | 2207 | "or method", |
| | 2208 | "This \"goto\" is invalid because the label \"%~.*s\" is not defined " |
| | 2209 | "in this function or method. Check the label name and correct " |
| | 2210 | "any misspelling, or insert the missing label definition." }, |
| | 2211 | |
| | 2212 | { TCERR_UNRESOLVED_EXTERN, |
| | 2213 | "unresolved external reference \"%~.*s\"", |
| | 2214 | "The symbol \"%~.*s\" was defined as an external reference but " |
| | 2215 | "is not defined anywhere in the program. Determine where this " |
| | 2216 | "symbol should be defined, and make sure that the source file " |
| | 2217 | "that contains the definition is included in the compilation." }, |
| | 2218 | |
| | 2219 | { TCERR_UNREFERENCED_LABEL, |
| | 2220 | "label \"%~.*s\" is not referenced", |
| | 2221 | "The statement label \"%~.*s\" is not referenced in any \"goto\", " |
| | 2222 | "\"break\", or \"continue\" statement. The label is unnecessary " |
| | 2223 | "and can be removed." }, |
| | 2224 | |
| | 2225 | { TCERR_UNREFERENCED_LOCAL, |
| | 2226 | "local variable \"%~.*s\" is never used", |
| | 2227 | "The local variable \"%~.*s\" is never used. This local variable " |
| | 2228 | "can be removed. Check to make sure that the local variable isn't " |
| | 2229 | "hidden by another variable of the same name inside nested braces '{ }' " |
| | 2230 | "within the code." }, |
| | 2231 | |
| | 2232 | { TCERR_UNASSIGNED_LOCAL, |
| | 2233 | "no value is assigned to local variable \"%~.*s\"", |
| | 2234 | "No value is assigned to the local variable \"%~.*s\". " |
| | 2235 | "You should initialize the variable with a value before its first " |
| | 2236 | "use to make the meaning of the code clear." }, |
| | 2237 | |
| | 2238 | { TCERR_UNUSED_LOCAL_ASSIGNMENT, |
| | 2239 | "value is assigned to local variable \"%~.*s\" but the value is " |
| | 2240 | "never used", |
| | 2241 | "A value is assigned to the local variable \"%~.*s\", but the variable's " |
| | 2242 | "value is never used. It is possible that the variable can be " |
| | 2243 | "removed." }, |
| | 2244 | |
| | 2245 | { TCERR_SC_NOT_OBJECT, |
| | 2246 | "invalid superclass \"%~.*s\" - not an object", |
| | 2247 | "The superclass \"%~.*s\" is not valid, because the symbol does not " |
| | 2248 | "refer to an object. Each superclass of an object must be a class " |
| | 2249 | "or object." }, |
| | 2250 | |
| | 2251 | { TCERR_ARG_EXPR_HAS_NO_VAL, |
| | 2252 | "argument expression %d yields no value", |
| | 2253 | "The argument expression in position %d in the argument list yields no " |
| | 2254 | "value. This usually indicates that the argument expression uses " |
| | 2255 | "a double-quoted (self-printing) string where a single-quoted string " |
| | 2256 | "was intended." }, |
| | 2257 | |
| | 2258 | { TCERR_ASI_EXPR_HAS_NO_VAL, |
| | 2259 | "right side of assignment has no value", |
| | 2260 | "The expression on the right side of the assignment operator yields " |
| | 2261 | "no value. This usually indicates that the expression after the " |
| | 2262 | "assignment operator uses a double-quoted (self-printing) string " |
| | 2263 | "where a single-quoted string was intended." }, |
| | 2264 | |
| | 2265 | { TCERR_WRONG_ARGC_FOR_FUNC, |
| | 2266 | "wrong number of arguments to function \"%~.*s\": %d required, %d actual", |
| | 2267 | "The call to function \"%~.*s\" has the wrong number of arguments. " |
| | 2268 | "The function requires %d argument(s), but this call has %d. Check " |
| | 2269 | "the argument list." }, |
| | 2270 | |
| | 2271 | { TCERR_GOTO_INTO_FINALLY, |
| | 2272 | "'goto' cannot transfer control into a 'finally' block", |
| | 2273 | "This 'goto' statement transfers control to a label defined in a " |
| | 2274 | "'finally' block, but the 'goto' statement is not within the same " |
| | 2275 | "'finally' block. This type of transfer is illegal because it would " |
| | 2276 | "leave the exit path from the 'finally' undefined." }, |
| | 2277 | |
| | 2278 | { TCERR_UNREFERENCED_PARAM, |
| | 2279 | "formal parameter \"%~.*s\" is never used", |
| | 2280 | "The formal parameter \"%~.*s\" is never used. In many cases this " |
| | 2281 | "doesn't indicate a problem, since a method might receive parameters " |
| | 2282 | "it doesn't actually need - the method interface might be inherited " |
| | 2283 | "from a base class, or the extra parameters might be included " |
| | 2284 | "for possible future use or for architectural reasons. You might " |
| | 2285 | "want to check that the parameter really wasn't meant to be used; in " |
| | 2286 | "particular, check to make sure that the parameter isn't hidden " |
| | 2287 | "by another variable of the same name inside nested braces '{ }' " |
| | 2288 | "within the code." }, |
| | 2289 | |
| | 2290 | { TCERR_GRAMPROD_HAS_NO_ALTS, |
| | 2291 | "grammar production \"%~.*s\" has no alternatives defined", |
| | 2292 | "The grammar production symbol \"%~.*s\" has no alternatives defined. " |
| | 2293 | "This probably indicates that this symbol was accidentally " |
| | 2294 | "misspelled when used as a sub-production in a grammar rule. Check " |
| | 2295 | "for occurrences of this symbol in grammar rules, and correct the " |
| | 2296 | "spelling if necessary. If the symbol is spelled correctly, add " |
| | 2297 | "at least one grammar rule for this production." }, |
| | 2298 | |
| | 2299 | { TCERR_CANNOT_MOD_META_PROP, |
| | 2300 | "intrinsic class property \"%~.*s\" cannot be modified", |
| | 2301 | "The property \"%~.*s\" is defined in this intrinsic class, " |
| | 2302 | "so it cannot be modified. You can only add new properties to " |
| | 2303 | "an intrinsic class; you can never override, modify, or replace " |
| | 2304 | "properties defined in the intrinsic class itself." }, |
| | 2305 | |
| | 2306 | { TCERR_FOREACH_NO_CREATEITER, |
| | 2307 | "Container.createIterator is not defined - foreach cannot be used", |
| | 2308 | "The intrinsic class Container's method createIterator is not defined, " |
| | 2309 | "so the 'foreach' statement cannot be used. Be sure to include " |
| | 2310 | "<tads.h> or <systype.h> in this source file." }, |
| | 2311 | |
| | 2312 | { TCERR_FOREACH_NO_GETNEXT, |
| | 2313 | "Iterator.getNext is not defined - foreach cannot be used", |
| | 2314 | "The intrinsic class Iterator's method getNext is not defined, " |
| | 2315 | "so the 'foreach' statement cannot be used. Be sure to include " |
| | 2316 | "<tads.h> or <systype.h> in this source file." }, |
| | 2317 | |
| | 2318 | { TCERR_FOREACH_NO_ISNEXTAVAIL, |
| | 2319 | "Iterator.isNextAvailable is not defined - foreach cannot be used", |
| | 2320 | "The intrinsic class Iterator's method isNextAvailable is not defined, " |
| | 2321 | "so the 'foreach' statement cannot be used. Be sure to include " |
| | 2322 | "<tads.h> or <systype.h> in this source file." }, |
| | 2323 | |
| | 2324 | { TCERR_INVALID_TYPE_FOR_EXPORT, |
| | 2325 | "symbol \"%~.*s\" is not a valid type for export", |
| | 2326 | "The symbol \"%~.*s\" appears in an 'export' statement, but this " |
| | 2327 | "symbol is not of a valid type for export. Only object and property " |
| | 2328 | "names may be exported." }, |
| | 2329 | |
| | 2330 | { TCERR_DUP_EXPORT, |
| | 2331 | "duplicate export for external name \"%~.*s\": \"%~.*s\" and \"%~.*s\"", |
| | 2332 | "Invalid duplicate 'export' statements. The external name \"%~.*s\" " |
| | 2333 | "has been given to the exported symbols \"%~.*s\" and \"%~.*s\". An " |
| | 2334 | "external name can be given to only one symbol. You must remove " |
| | 2335 | "one of the duplicate exports." }, |
| | 2336 | |
| | 2337 | { TCERR_DUP_EXPORT_AGAIN, |
| | 2338 | "additional duplicate export for external name \"%~.*s\": \"%~.*s\"", |
| | 2339 | "Additional duplicate export: the external name \"%~.*s\" has also " |
| | 2340 | "been exported with symbol \"%~.*s\". Only one export per external " |
| | 2341 | "name is allowed." }, |
| | 2342 | |
| | 2343 | { TCERR_TARGETPROP_NOT_AVAIL, |
| | 2344 | "'targetprop' is not available in this context", |
| | 2345 | "The 'targetprop' value is not available in this context. You can only " |
| | 2346 | "refer to 'targetprop' within a method associated with an object; " |
| | 2347 | "you cannot use 'targetprop' in a function or in other code that is " |
| | 2348 | "not part of an object's method." }, |
| | 2349 | |
| | 2350 | { TCERR_TARGETOBJ_NOT_AVAIL, |
| | 2351 | "'targetobj' is not available in this context", |
| | 2352 | "The 'targetobj' value is not available in this context. You can only " |
| | 2353 | "refer to 'targetobj' within a method associated with an object; " |
| | 2354 | "you cannot use 'targetobj' in a function or in other code that is " |
| | 2355 | "not part of an object's method." }, |
| | 2356 | |
| | 2357 | { TCERR_DEFININGOBJ_NOT_AVAIL, |
| | 2358 | "'definingobj' is not available in this context", |
| | 2359 | "The 'definingobj' value is not available in this context. You can only " |
| | 2360 | "refer to 'definingobj' within a method associated with an object; " |
| | 2361 | "you cannot use 'definingobj' in a function or in other code that is " |
| | 2362 | "not part of an object's method." }, |
| | 2363 | |
| | 2364 | { TCERR_CANNOT_CALL_CONST, |
| | 2365 | "this constant expression cannot be called as a function", |
| | 2366 | "This constant expression cannot be called as a function. Check for " |
| | 2367 | "a missing operator before an open parenthesis, since this can make " |
| | 2368 | "an expression look like a function call. " }, |
| | 2369 | |
| | 2370 | { TCERR_REPLACED_NOT_AVAIL, |
| | 2371 | "'replaced' is not available in this context", |
| | 2372 | "The 'replaced' keyword is not available in this context. You can only " |
| | 2373 | "use 'replaced' within a function you are defining with 'modify'. " }, |
| | 2374 | |
| | 2375 | { TCERR_GRAMPROD_TOO_MANY_ALTS, |
| | 2376 | "grammar production \"%~.*s\" has too many (>65,535) rules", |
| | 2377 | "The grammar production symbol \"%~.*s\" has too many rules - a " |
| | 2378 | "single production is limited to 65,535 rules, taking into " |
| | 2379 | "account all 'grammar' statements for the production. This probably " |
| | 2380 | "indicate that the production has one or more grammar rules with " |
| | 2381 | "deeply nested '|' alternatives. Check for very complex 'grammar' " |
| | 2382 | "statements, and replace complex '|' structures with separate " |
| | 2383 | "sub-productions." }, |
| | 2384 | |
| | 2385 | { TCERR_BAD_META_FOR_NEW, |
| | 2386 | "invalid 'new' - cannot create an instance of this type", |
| | 2387 | "The 'new' operator cannot be used to create an instance of this " |
| | 2388 | "type of object. " }, |
| | 2389 | |
| | 2390 | { TCERR_MMINH_TYPE_NOT_OBJ, |
| | 2391 | "'inherited<>' type list element \"%~.*s\" is not an object name", |
| | 2392 | "Type names in an 'inherited<>' type list must be object or " |
| | 2393 | "class names. \"%~.*s\" is not an object name, so it can't be used " |
| | 2394 | "as a type name here." }, |
| | 2395 | |
| | 2396 | { TCERR_MMINH_BAD_CONTEXT, |
| | 2397 | "'inherited<>' is not valid here; it can only be used in a multi-method", |
| | 2398 | "'inherited<>' is not valid here. This syntax can only be used " |
| | 2399 | "within a function defined as a multi-method." }, |
| | 2400 | |
| | 2401 | { TCERR_MMINH_MISSING_SUPPORT_FUNC, |
| | 2402 | "'inherited<>' requires \"%~.*s\", which is not defined " |
| | 2403 | "or not a function", |
| | 2404 | "'inherited<>' requires the library function \"%~.*s\" to be included " |
| | 2405 | "included in the build. This is not defined or is not a function. " |
| | 2406 | "Check that the library file 'multmeth.t' is included in the build." }, |
| | 2407 | |
| | 2408 | { TCERR_MMINH_UNDEF_FUNC, |
| | 2409 | "'inherited<>' function \"%~.*s\" undefined", |
| | 2410 | "The function \"%~.*s\" with the specified inherited<> type list is " |
| | 2411 | "not defined. The inherited<> type list must exactly match the " |
| | 2412 | "definition of the function you wish to call." }, |
| | 2413 | |
| | 2414 | { TCERR_SYMEXP_INV_TYPE, |
| | 2415 | "invalid symbol type in symbol file", |
| | 2416 | "Invalid symbol type in symbol file. The symbol file is either " |
| | 2417 | "corrupted or was created by an incompatible version of the " |
| | 2418 | "compiler. Regenerate the symbol file." }, |
| | 2419 | |
| | 2420 | { TCERR_SYMEXP_INV_SIG, |
| | 2421 | "invalid symbol file signature", |
| | 2422 | "Invalid symbol file signature. The symbol file is corrupted, " |
| | 2423 | "was generated by an incompatible verison of the compiler, or is " |
| | 2424 | "not a symbol file. Delete this symbol file and re-generate it " |
| | 2425 | "from its source file. (If you do not have access to the source" |
| | 2426 | "file, you must obtain an updated symbol file from the person or " |
| | 2427 | "vendor who provided you with the original symbol file.)" }, |
| | 2428 | |
| | 2429 | { TCERR_SYMEXP_SYM_TOO_LONG, |
| | 2430 | "symbol name too long in symbol file", |
| | 2431 | "A symbol name stored in the symbol file is too long. The symbol " |
| | 2432 | "file is either " |
| | 2433 | "corrupted or was created by an incompatible version of the " |
| | 2434 | "compiler. Regenerate the symbol file." }, |
| | 2435 | |
| | 2436 | { TCERR_SYMEXP_REDEF, |
| | 2437 | "symbol \"%~.*s\" in imported symbol file is already defined; ignoring " |
| | 2438 | "redefinition", |
| | 2439 | "The symbol \"%~.*s\" is defined in the symbol file, but is already " |
| | 2440 | "defined. This usually indicates that two symbol files that you're " |
| | 2441 | "importing both define this symbol as a function, object, or property " |
| | 2442 | "name (the two files might define the symbol as the same type, or as " |
| | 2443 | "different types - it doesn't matter, because the symbol can only be " |
| | 2444 | "used once for any of these types). You must resolve the conflict " |
| | 2445 | "by renaming the symbol in one or more of the source files to make each " |
| | 2446 | "name unique." }, |
| | 2447 | |
| | 2448 | { TCERR_OBJFILE_INV_SIG, |
| | 2449 | "invalid object file signature", |
| | 2450 | "Invalid object file signature. The object file is corrupted, " |
| | 2451 | "was generated by an incompatible version of the compiler, or " |
| | 2452 | "is not an object file. Delete this object file and re-compile " |
| | 2453 | "it from its source file. (If you do not have access to the source " |
| | 2454 | "file, you must obtain an updated object file from the person or " |
| | 2455 | "vendor who provided you with the original object file." }, |
| | 2456 | |
| | 2457 | { TCERR_OBJFILE_TOO_MANY_IDS, |
| | 2458 | "too many object/property ID's in object file", |
| | 2459 | "This object file contains too many object or property ID's. The " |
| | 2460 | "compiler cannot load this object file on this operating system. " |
| | 2461 | "This usually happens only on 16-bit computers, and indicates that " |
| | 2462 | "the object file exceeds the architectural limit of the compiler " |
| | 2463 | "on this machine. You might be able to work around this by reducing " |
| | 2464 | "the number of objects in this object file, which you can probably do " |
| | 2465 | "by splitting the source file into multiple files and compiling each " |
| | 2466 | "one into its own object file. If you're running on MS-DOS on a " |
| | 2467 | "386 or higher processor, you can use a 32-bit version of the " |
| | 2468 | "compiler, which does not have this limit." }, |
| | 2469 | |
| | 2470 | { TCERR_OBJFILE_OUT_OF_MEM, |
| | 2471 | "out of memory loading object file", |
| | 2472 | "Out of memory. The compiler cannot " |
| | 2473 | "allocate memory necessary to load the object file. Make more " |
| | 2474 | "memory available, if possible (by closing other applications, " |
| | 2475 | "for example), then try running the compiler again." }, |
| | 2476 | |
| | 2477 | { TCERR_OBJFILE_INV_TYPE, |
| | 2478 | "invalid symbol type in object file", |
| | 2479 | "Invalid symbol type in object file. The object file is either " |
| | 2480 | "corrupted or was created by an incompatible version of the " |
| | 2481 | "compiler. Re-compile the object file." }, |
| | 2482 | |
| | 2483 | { TCERR_OBJFILE_REDEF_SYM_TYPE, |
| | 2484 | "symbol \"%~.*s\" (type: %s) redefined (type: %s) in object file \"%s\"", |
| | 2485 | "The symbol \"%~.*s\", which was originally defined of type %s, is " |
| | 2486 | "redefined with type %s in object file \"%s\". A global symbol can " |
| | 2487 | "be defined only once in the entire program. You must change one of " |
| | 2488 | "the symbol's names in one of your source files to remove the " |
| | 2489 | "conflict.\n\n" |
| | 2490 | "If you recently changed the meaning of this symbol, you might " |
| | 2491 | "simply need to do a full recompile - try building again with the -a " |
| | 2492 | "option. " }, |
| | 2493 | |
| | 2494 | { TCERR_OBJFILE_REDEF_SYM, |
| | 2495 | "symbol \"%~.*s\" (type: %s) redefined in object file \"%s\"", |
| | 2496 | "The symbol \"%~.*s\" (of type %s) is redefined in object file \"%s\". " |
| | 2497 | "A global symbol can be defined only once in the entire program. " |
| | 2498 | "You must change one of names in one of your source files to " |
| | 2499 | "remove the conflict." }, |
| | 2500 | |
| | 2501 | { TCERR_OBJFILE_BIF_INCOMPAT, |
| | 2502 | "intrinsic function \"%~.*s\" has different definition in object file " |
| | 2503 | "\"%s\"", |
| | 2504 | "The intrinsic function \"%~.*s\" has a different definition in object " |
| | 2505 | "file \"%s\" than in its previous definition. The intrinsic function " |
| | 2506 | "sets used in your program must be identical in each object file. " |
| | 2507 | "Check the \"intrinsic\" definition statements in each source file " |
| | 2508 | "and ensure that they all match." }, |
| | 2509 | |
| | 2510 | { TCERR_OBJFILE_FUNC_INCOMPAT, |
| | 2511 | "function \"%~.*s\" has different definition in object file " |
| | 2512 | "\"%s\"", |
| | 2513 | "The function \"%~.*s\" has a different definition in object " |
| | 2514 | "file \"%s\" than in its previous definition. This probably indicates " |
| | 2515 | "that one or more of your object or symbol files are out of date " |
| | 2516 | "and must be recompiled." }, |
| | 2517 | |
| | 2518 | { TCERR_OBJFILE_INT_SYM_MISSING, |
| | 2519 | "internal symbol reference \"%~.*s\" missing in object file \"%s\"", |
| | 2520 | "The internal symbol reference \"%~.*s\" is missing in the object " |
| | 2521 | "file \"%s\". This is an error in the object file and probably indicates" |
| | 2522 | " that the file is corrupted. Delete the object file and recompile its " |
| | 2523 | "source file." }, |
| | 2524 | |
| | 2525 | { TCERR_OBJFILE_INVAL_STREAM_ID, |
| | 2526 | "invalid stream ID in object file \"%s\"", |
| | 2527 | "The object file \"%s\" contains an invalid internal stream ID code. " |
| | 2528 | "This is an error in the object file and probably indicates that " |
| | 2529 | "the file is corrupted. Delete the object file and recompile its " |
| | 2530 | "source file." }, |
| | 2531 | |
| | 2532 | { TCERR_OBJFILE_INVAL_OBJ_ID, |
| | 2533 | "invalid object ID in object file \"%s\"", |
| | 2534 | "The object file \"%s\" contains an invalid object ID code. " |
| | 2535 | "This is an error in the object file and probably indicates that " |
| | 2536 | "the file is corrupted. Delete the object file and recompile its " |
| | 2537 | "source file." }, |
| | 2538 | |
| | 2539 | { TCERR_OBJFILE_INVAL_PROP_ID, |
| | 2540 | "invalid property ID in object file \"%s\"", |
| | 2541 | "The object file \"%s\" contains an invalid property ID code. " |
| | 2542 | "This is an error in the object file and probably indicates that " |
| | 2543 | "the file is corrupted. Delete the object file and recompile its " |
| | 2544 | "source file." }, |
| | 2545 | |
| | 2546 | { TCERR_OBJFILE_INV_FN_OR_META, |
| | 2547 | "invalid function set or metaclass data in object file \"%s\"", |
| | 2548 | "The object file \"%s\" contains invalid function set or metaclass " |
| | 2549 | "data. This is an error in the object file and probably indicates that " |
| | 2550 | "the file is corrupted. Delete the object file and recompile its " |
| | 2551 | "source file." }, |
| | 2552 | |
| | 2553 | { TCERR_OBJFILE_FNSET_CONFLICT, |
| | 2554 | "conflicting intrinsic function set \"%s\" found in object file \"%s\"", |
| | 2555 | "The intrinsic function set \"%s\" in object file \"%s\" conflicts with " |
| | 2556 | "a previous intrinsic definition from other object files. Each " |
| | 2557 | "object file must define an identical list of intrinsics, in " |
| | 2558 | "the same order. Examine your source files and use the same " |
| | 2559 | "intrinsic definitions in all files." }, |
| | 2560 | |
| | 2561 | { TCERR_OBJFILE_META_CONFLICT, |
| | 2562 | "conflicting metaclass \"%s\" found in object file \"%s\"", |
| | 2563 | "The metaclass \"%s\" in object file \"%s\" conflicts with " |
| | 2564 | "a previous metaclass definition from other object files. Each " |
| | 2565 | "object file must define an identical list of metaclasses, in " |
| | 2566 | "the same order. Examine your source files and use the same " |
| | 2567 | "metaclass definitions in all files." }, |
| | 2568 | |
| | 2569 | { TCERR_OBJFILE_MODREPOBJ_BEFORE_ORIG, |
| | 2570 | "modified or replaced object \"%~.*s\" found in object file \"%s\" " |
| | 2571 | "before original object definition was loaded", |
| | 2572 | "The object \"%~.*s\" in object file \"%s\" is defined with \"replace\" " |
| | 2573 | "or \"modify\", but this object file was loaded before the object file " |
| | 2574 | "containing the original definition of the object. You must change " |
| | 2575 | "the order in which you're loading the object files so that the " |
| | 2576 | "object file containing the original definition of each object is " |
| | 2577 | "loaded before the object's first modification or replacement." }, |
| | 2578 | |
| | 2579 | { TCERR_OBJFILE_REPFUNC_BEFORE_ORIG, |
| | 2580 | "modified or replaced function \"%~.*s\" found in object file \"%s\" " |
| | 2581 | "before original function definition was loaded", |
| | 2582 | "The function \"%~.*s\" in object file \"%s\" is defined with " |
| | 2583 | "\"modify\" or \"replace\", but this object file was loaded before the " |
| | 2584 | "object file containing the original definition of the function. You " |
| | 2585 | "must change the order in which you're loading the object files so " |
| | 2586 | "that the object file containing the original definition of each " |
| | 2587 | "function is loaded before the function's first replacement." }, |
| | 2588 | |
| | 2589 | { TCERR_CONSTRUCT_CANNOT_RET_VAL, |
| | 2590 | "\"construct\" cannot return a value", |
| | 2591 | "The \"construct\" method cannot return a value. Remove the " |
| | 2592 | "return value expression." }, |
| | 2593 | |
| | 2594 | { TCERR_OBJFILE_NO_DBG, |
| | 2595 | "object file \"%s\" has no debugger information " |
| | 2596 | "(required to link for debug)", |
| | 2597 | "The object file \"%s\" has no debugger information. In order to " |
| | 2598 | "include debug information in the image file, all object files must be " |
| | 2599 | "compiled with debugging information. Recompile the object file with " |
| | 2600 | "debug information and then re-link the program." }, |
| | 2601 | |
| | 2602 | { TCERR_OBJFILE_METACLASS_PROP_CONFLICT, |
| | 2603 | "intrinsic class property \"%~.*s\" does not match " |
| | 2604 | "previous name (\"%~.*s\") in object file %s", |
| | 2605 | "The intrinsic class property \"%~.*s\" does not match its previous " |
| | 2606 | "name (\"%~.*s\") in object file %s. Each property defined in an " |
| | 2607 | "intrinsic class must match in all object files where the " |
| | 2608 | "intrinsic class is declared. You must recompile your source code " |
| | 2609 | "using a single definition for the intrinsic class that is the same " |
| | 2610 | "in each file." }, |
| | 2611 | |
| | 2612 | { TCERR_OBJFILE_METACLASS_IDX_CONFLICT, |
| | 2613 | "intrinsic class \"%~.*s\" in object file %s out of order with " |
| | 2614 | "previous definition", |
| | 2615 | "The intrinsic class \"%~.*s\" is defined in object file %s in a " |
| | 2616 | "different order than it appeared in previous object files. Each " |
| | 2617 | "object file must define all of its intrinsic classes in the same " |
| | 2618 | "order as all other object files. You must recompile your source " |
| | 2619 | "code using a single set of intrinsic class definitions, all in the " |
| | 2620 | "same order." }, |
| | 2621 | |
| | 2622 | { TCERR_OBJFILE_CANNOT_MOD_OR_REP_TYPE, |
| | 2623 | "cannot modify or replace object of this type - \"%~.*s\" in " |
| | 2624 | "object file %s", |
| | 2625 | "You cannot use 'modify' or 'replace' to modify an object of this " |
| | 2626 | "type. The symbol \"%~.*s\" is being modified or replaced in object " |
| | 2627 | "file %s, but the symbol was previously defined using an incompatible " |
| | 2628 | "type. You can only modify or replace ordinary objects." }, |
| | 2629 | |
| | 2630 | { TCERR_EXPORT_SYM_TOO_LONG, |
| | 2631 | "exported symbol in object file is too long - object file may be " |
| | 2632 | "corrupted", |
| | 2633 | "An exported symbol in this object file is too long. This probably " |
| | 2634 | "indicates a corrupted object file. Recompile the source code to " |
| | 2635 | "create a new object file. If the object file was just compiled, " |
| | 2636 | "this probably indicates an internal error in the compiler." }, |
| | 2637 | |
| | 2638 | { TCERR_OBJFILE_MACRO_SYM_TOO_LONG, |
| | 2639 | "macro symbol too long in object file debug records - object file may " |
| | 2640 | "be corrupted - object file %s", |
| | 2641 | "A macro symbol name in the object file %s is too long. This probably " |
| | 2642 | "indicates a corrupted object file. Recompile the source code to " |
| | 2643 | "create a new object file. If the object file was just compiled, " |
| | 2644 | "this probably indicates an internal error in the compiler. " }, |
| | 2645 | |
| | 2646 | { TCERR_OBJFILE_MMFUNC_INCOMPAT, |
| | 2647 | "function \"%~.*s\" has conflicting definitions as multi-method and " |
| | 2648 | "as regular function - object file %s", |
| | 2649 | "The function \"%~*.s\" has a definition in object file \"%s\" that " |
| | 2650 | "conflicts with one or more definitions in other object files. The " |
| | 2651 | "function is defined both as an ordinary function and as a multi-method. " |
| | 2652 | "The function must be defined exclusively as one or the other. If the " |
| | 2653 | "ordinary function definition was meant to be a multi-method definition, " |
| | 2654 | "add the \"multimethod\" modifier keyword immediately after the " |
| | 2655 | "closing parenthesis of the parameter list in that definition." }, |
| | 2656 | |
| | 2657 | { TCERR_OBJFILE_MMPARAM_NOT_OBJECT, |
| | 2658 | "parameter type \"%~.*s\" in multi-method \"%~.*s\" is not an object", |
| | 2659 | "The declared parameter type \"%~.*s\" in the definition of the " |
| | 2660 | "multi-method function \"%~.*s\" is not an object. Only object or " |
| | 2661 | "class names can be used to declare parameter types. Check the " |
| | 2662 | "definition of the function and make sure the type name is correct, " |
| | 2663 | "and that the same name isn't used elsewhere as a non-object type." }, |
| | 2664 | |
| | 2665 | { TCERR_MISSING_MMREG, |
| | 2666 | "library support function \"%s\" is missing or invalid - " |
| | 2667 | "check that the system library is included in the build", |
| | 2668 | "The system library function \"%s\" is missing or " |
| | 2669 | "is not defined as a function. This function is part of the system " |
| | 2670 | "run-time library, which is usually included by default in the build. " |
| | 2671 | "Check that system.tl is included in the build and that the " |
| | 2672 | "multi-method support module is not excluded." }, |
| | 2673 | |
| | 2674 | { TCERR_CONST_POOL_OVER_32K, |
| | 2675 | "constant value exceeds 32k - program will not run on 16-bit machines", |
| | 2676 | "This constant data item (string or list constant) exceeds 32k in " |
| | 2677 | "length (as stored in the compiled program file). This program will " |
| | 2678 | "not work on 16-bit computers. If you want the program to be able " |
| | 2679 | "to run on 16-bit machines, break up the string or list into multiple " |
| | 2680 | "values, and manipulate them separately." }, |
| | 2681 | |
| | 2682 | { TCERR_CONST_TOO_LARGE_FOR_PG, |
| | 2683 | "string or list constant exceeds constant page size", |
| | 2684 | "A string or list constant is too large to fit on " |
| | 2685 | "a single constant page." }, |
| | 2686 | |
| | 2687 | { TCERR_CORRUPT_LIST, |
| | 2688 | "corrupted internal list data", |
| | 2689 | "Corrupted internal list data." }, |
| | 2690 | |
| | 2691 | { TCERR_GEN_CODE_INH, |
| | 2692 | "attempting to generate 'inherited' node directly", |
| | 2693 | "Attempting to generate 'inherited' node directly." }, |
| | 2694 | |
| | 2695 | { TCERR_GEN_UNK_CONST_TYPE, |
| | 2696 | "unknown constant type in code generation", |
| | 2697 | "Unknown constant type in code generation." }, |
| | 2698 | |
| | 2699 | { TCERR_GEN_BAD_LVALUE, |
| | 2700 | "attempting to generate assignment for non-lvalue", |
| | 2701 | "Attempting to generate assignment for non-lvalue." }, |
| | 2702 | |
| | 2703 | { TCERR_GEN_BAD_ADDR, |
| | 2704 | "attempting to generate address for non-addressable", |
| | 2705 | "Attempting to generate address for non-addressable." }, |
| | 2706 | |
| | 2707 | { TCERR_TOO_MANY_CALL_ARGS, |
| | 2708 | "function call argument list exceeds machine limit (maximum 127)", |
| | 2709 | "This function call has too many arguments; the T3 VM limits function " |
| | 2710 | "and method calls to a maximum of 127 arguments. Check for missing " |
| | 2711 | "parentheses if you didn't intend to pass this many arguments. If the " |
| | 2712 | "function actually does take more than 127 arguments, you will have " |
| | 2713 | "to modify your program to reduce the argument count; you could do " |
| | 2714 | "this by grouping arguments into an object or list value, or by " |
| | 2715 | "breaking the function into several simpler functions." }, |
| | 2716 | |
| | 2717 | { TCERR_TOO_MANY_CTOR_ARGS, |
| | 2718 | "'new' argument list exceeds machine limit (maximum 126)", |
| | 2719 | "This 'new' operator has too many arguments; the T3 VM limits " |
| | 2720 | "constructor calls to a maximum of 126 arguments. Check for missing " |
| | 2721 | "parentheses if you didn't intend to pass this many arguments. If the " |
| | 2722 | "constructor actually does take more than 126 arguments, you will have " |
| | 2723 | "to modify your program to reduce the argument count; you could do " |
| | 2724 | "this by grouping arguments into an object or list value." }, |
| | 2725 | |
| | 2726 | { TCERR_GEN_CODE_DELEGATED, |
| | 2727 | "attempting to generate 'delegated' node directly", |
| | 2728 | "Attempting to generate 'delegated' node directly." }, |
| | 2729 | |
| | 2730 | { TCERR_CODE_POOL_OVER_32K, |
| | 2731 | "code block size exceeds 32k - program will not run on 16-bit machines", |
| | 2732 | "This code block (a function or method body) exceeds 32k in length " |
| | 2733 | "(as stored in the compiled program file). This program will not work " |
| | 2734 | "on 16-bit computers. If you want the program to be able to run on " |
| | 2735 | "16-bit machines, break up this function or method into multiple " |
| | 2736 | "pieces." }, |
| | 2737 | |
| | 2738 | { TCERR_GEN_BAD_CASE, |
| | 2739 | "case/default without switch or non-constant case expression", |
| | 2740 | "case/default without switch or non-constant case expression" }, |
| | 2741 | |
| | 2742 | { TCERR_CATCH_FINALLY_GEN_CODE, |
| | 2743 | "catch/finally gen_code called directly", |
| | 2744 | "catch/finally gen_code called directly" }, |
| | 2745 | |
| | 2746 | { TCERR_INVAL_PROP_CODE_GEN, |
| | 2747 | "invalid property value type for code generation", |
| | 2748 | "invalid property value type for code generation" }, |
| | 2749 | |
| | 2750 | { TCERR_RESERVED_EXPORT, |
| | 2751 | "external name \"%~.*s\" illegal in 'export' - reserved for compiler use", |
| | 2752 | "The external name \"%~.*s\" illegally appears in an 'export' statement. " |
| | 2753 | "The compiler automatically provides an export for this symbol, " |
| | 2754 | "so the program cannot explicitly export this name itself." }, |
| | 2755 | |
| | 2756 | { TCERR_CONSTRUCT_NOT_DEFINED, |
| | 2757 | "property \"construct\" is not defined", |
| | 2758 | "No property named \"construct\" is defined. Creating an object " |
| | 2759 | "with operator 'new' invokes this property if defined." }, |
| | 2760 | |
| | 2761 | { TCERR_CONSTRUCT_NOT_PROP, |
| | 2762 | "\"construct\" is not a property", |
| | 2763 | "The symbol \"construct\" does not refer to a property. Creating " |
| | 2764 | "an object with operator 'new' invokes this property if defined." }, |
| | 2765 | |
| | 2766 | { TCERR_FINALIZE_NOT_DEFINED, |
| | 2767 | "property \"finalize\" is not defined", |
| | 2768 | "No property named \"finalize\" is defined. This property is " |
| | 2769 | "invoked when an object is about to be deleted during garbage " |
| | 2770 | "collection." }, |
| | 2771 | |
| | 2772 | { TCERR_FINALIZE_NOT_PROP, |
| | 2773 | "\"finalize\" is not a property", |
| | 2774 | "The symbol \"finalize\" does not refer to a property. This property " |
| | 2775 | "is invoked when an object is about to be deleted during garbage " |
| | 2776 | "collection." }, |
| | 2777 | |
| | 2778 | { TCERR_BAD_JS_TPL, |
| | 2779 | "invalid js template", "Invalid js template." }, |
| | 2780 | |
| | 2781 | { TCERR_JS_EXPR_EXPAN_OVF, |
| | 2782 | "js template expansion overflow", "Overflow expanding js template." } |
| | 2783 | }; |
| | 2784 | |
| | 2785 | /* english message count */ |
| | 2786 | size_t tc_message_count_english = |
| | 2787 | sizeof(tc_messages_english)/sizeof(tc_messages_english[0]); |
| | 2788 | |
| | 2789 | /* |
| | 2790 | * the actual message array - we'll initialize this to the english list |
| | 2791 | * that's linked in, but if we find an external message file, we'll use |
| | 2792 | * the external file instead |
| | 2793 | */ |
| | 2794 | const err_msg_t *tc_messages = tc_messages_english; |
| | 2795 | |
| | 2796 | /* message count - initialize to the english message array count */ |
| | 2797 | size_t tc_message_count = |
| | 2798 | sizeof(tc_messages_english)/sizeof(tc_messages_english[0]); |
| | 2799 | |