sourcemod/sourcepawn/compiler/sc5.scp
Scott Ehlert dd2986d1d8 Fixed amb333 - compiler crash when attempting to call native without parentheses
--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40861
2007-05-24 04:37:20 +00:00

361 lines
21 KiB
Plaintext

/* Pawn compiler - Error message strings (plain and compressed formats)
*
* Copyright (c) ITB CompuPhase, 2000-2006
*
* This software is provided "as-is", without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* the use of this software.
*
* Permission is granted to anyone to use this software for any purpose,
* including commercial applications, and to alter it and redistribute it
* freely, subject to the following restrictions:
*
* 1. The origin of this software must not be misrepresented; you must not
* claim that you wrote the original software. If you use this software in
* a product, an acknowledgment in the product documentation would be
* appreciated but is not required.
* 2. Altered source versions must be plainly marked as such, and must not be
* misrepresented as being the original software.
* 3. This notice may not be removed or altered from any source distribution.
*
* Version: $Id$
*/
SC_FUNC int strexpand(char *dest, unsigned char *source, int maxlen, unsigned char pairtable[128][2]);
#define SCPACK_TABLE errstr_table
/*-*SCPACK start of pair table, do not change or remove this line */
unsigned char errstr_table[][2] = {
{101,32}, {111,110}, {116,32}, {105,110}, {97,114}, {116,105}, {115,32}, {100,32}, {101,114}, {37,115}, {133,129}, {101,110}, {34,137}, {140,34}, {97,108}, {117,110},
{114,101}, {110,111}, {97,116}, {115,105}, {121,32}, {97,110}, {111,114}, {109,98}, {115,116}, {32,141}, {100,101}, {41,10}, {109,139}, {145,130}, {101,135}, {138,32},
{98,108}, {111,108}, {143,99}, {102,162}, {114,97}, {118,142}, {115,121}, {166,151}, {167,161}, {97,32}, {117,115}, {103,32}, {115,147}, {97,160}, {136,32}, {150,32},
{132,164}, {99,104}, {103,117}, {105,135}, {163,159}, {178,156}, {165,179}, {132,181}, {111,102}, {116,104}, {101,120}, {131,182}, {101,134}, {105,134}, {168,153}, {154,102},
{101,100}, {118,132}, {184,32}, {105,173}, {193,195}, {116,111}, {176,148}, {109,97}, {99,129}, {101,10}, {115,10}, {112,144}, {116,97}, {183,130}, {98,128}, {152,146},
{44,32}, {40,190}, {132,97}, {170,130}, {191,131}, {153,10}, {109,146}, {209,155}, {109,211}, {104,97}, {196,128}, {34,32}, {129,32}, {142,32}, {105,99}, {117,108},
{99,111}, {147,122}, {110,32}, {100,105}, {101,108}, {108,111}, {111,112}, {116,136}, {200,152}, {131,32}, {149,32}, {131,171}, {214,177}, {58,213}, {109,101}, {102,105},
{100,111}, {97,115}, {108,128}, {118,128}, {230,136}, {232,149}, {204,171}, {203,172}, {216,206}, {119,105}, {109,112}, {110,117}, {186,247}, {163,138}, {251,151}
};
/*-*SCPACK end of pair table, do not change or remove this line */
static char *errmsg[] = {
#ifdef SCPACK
/*001*/ "expected token: \"%s\", but found \"%s\"\n",
/*002*/ "only a single statement (or expression) can follow each \"case\"\n",
/*003*/ "declaration of a local variable must appear in a compound block\n",
/*004*/ "function \"%s\" is not implemented\n",
/*005*/ "function may not have arguments\n",
/*006*/ "must be assigned to an array\n",
/*007*/ "operator cannot be redefined\n",
/*008*/ "must be a constant expression; assumed zero\n",
/*009*/ "invalid array size (negative, zero or out of bounds)\n",
/*010*/ "invalid function or declaration\n",
/*011*/ "invalid outside functions\n",
/*012*/ "invalid function call, not a valid address\n",
/*013*/ "no entry point (no public functions)\n",
/*014*/ "invalid statement; not in switch\n",
/*015*/ "\"default\" case must be the last case in switch statement\n",
/*016*/ "multiple defaults in \"switch\"\n",
/*017*/ "undefined symbol \"%s\"\n",
/*018*/ "initialization data exceeds declared size\n",
/*019*/ "not a label: \"%s\"\n",
/*020*/ "invalid symbol name \"%s\"\n",
/*021*/ "symbol already defined: \"%s\"\n",
/*022*/ "must be lvalue (non-constant)\n",
/*023*/ "array assignment must be simple assignment\n",
/*024*/ "\"break\" or \"continue\" is out of context\n",
/*025*/ "function heading differs from prototype\n",
/*026*/ "no matching \"#if...\"\n",
/*027*/ "invalid character constant\n",
/*028*/ "invalid subscript (not an array or too many subscripts): \"%s\"\n",
/*029*/ "invalid expression, assumed zero\n",
/*030*/ "compound statement not closed at the end of file (started at line %d)\n",
/*031*/ "unknown directive\n",
/*032*/ "array index out of bounds (variable \"%s\")\n",
/*033*/ "array must be indexed (variable \"%s\")\n",
/*034*/ "argument does not have a default value (argument %d)\n",
/*035*/ "argument type mismatch (argument %d)\n",
/*036*/ "empty statement\n",
/*037*/ "invalid string (possibly non-terminated string)\n",
/*038*/ "extra characters on line\n",
/*039*/ "constant symbol has no size\n",
/*040*/ "duplicate \"case\" label (value %d)\n",
/*041*/ "invalid ellipsis, array size is not known\n",
/*042*/ "invalid combination of class specifiers\n",
/*043*/ "character constant exceeds range for packed string\n",
/*044*/ "positional parameters must precede all named parameters\n",
/*045*/ "too many function arguments\n",
/*046*/ "unknown array size (variable \"%s\")\n",
/*047*/ "array sizes do not match, or destination array is too small\n",
/*048*/ "array (s do not match\n",
/*049*/ "invalid line continuation\n",
/*050*/ "invalid range\n",
/*051*/ "invalid subscript, use \"[ ]\" operators on major dimensions\n",
/*052*/ "multi-dimensional arrays must be fully initialized\n",
/*053*/ "exceeding maximum number of dimensions\n",
/*054*/ "unmatched closing brace (\"}\")\n",
/*055*/ "start of function body without function header\n",
/*056*/ "arrays, local variables and function arguments cannot be public (variable \"%s\")\n",
/*057*/ "unfinished expression before compiler directive\n",
/*058*/ "duplicate argument; same argument is passed twice\n",
/*059*/ "function argument may not have a default value (variable \"%s\")\n",
/*060*/ "multiple \"#else\" directives between \"#if ... #endif\"\n",
/*061*/ "\"#elseif\" directive follows an \"#else\" directive\n",
/*062*/ "number of operands does not fit the operator\n",
/*063*/ "function result tag of operator \"%s\" must be \"%s\"\n",
/*064*/ "cannot change predefined operators\n",
/*065*/ "function argument may only have a single tag (argument %d)\n",
/*066*/ "function argument may not be a reference argument or an array (argument \"%s\")\n",
/*067*/ "variable cannot be both a reference and an array (variable \"%s\")\n",
/*068*/ "invalid rational number precision in #pragma\n",
/*069*/ "rational number format already defined\n",
/*070*/ "rational number support was not enabled\n",
/*071*/ "user-defined operator must be declared before use (function \"%s\")\n",
/*072*/ "\"sizeof\" operator is invalid on \"function\" symbols\n",
/*073*/ "function argument must be an array (argument \"%s\")\n",
/*074*/ "#define pattern must start with an alphabetic character\n",
/*075*/ "input line too long (after substitutions)\n",
/*076*/ "syntax error in the expression, or invalid function call\n",
/*077*/ "malformed UTF-8 encoding, or corrupted file: %s\n",
/*078*/ "function uses both \"return\" and \"return <value>\"\n",
/*079*/ "inconsistent return types (array & non-array)\n",
/*080*/ "unknown symbol, or not a constant symbol (symbol \"%s\")\n",
/*081*/ "cannot take a tag as a default value for an indexed array parameter (symbol \"%s\")\n",
/*082*/ "user-defined operators and native functions may not have states\n",
/*083*/ "a function or variable may only belong to a single automaton (symbol \"%s\")\n",
/*084*/ "state conflict: one of the states is already assigned to another implementation (symbol \"%s\")\n",
/*085*/ "no states are defined for symbol \"%s\"\n",
/*086*/ "unknown automaton \"%s\"\n",
/*087*/ "unknown state \"%s\" for automaton \"%s\"\n",
/*088*/ "public variables and local variables may not have states (symbol \"%s\")\n",
/*089*/ "state variables may not be initialized (symbol \"%s\")\n",
/*090*/ "public functions may not return arrays (symbol \"%s\")\n",
/*091*/ "ambiguous constant; tag override is required (symbol \"%s\")\n",
/*092*/ "number of arguments does not match definition\n",
/*093*/ "expected tag name identifier\n",
/*094*/ "function enumeration requires unique tag\n",
/*095*/ "cannot have required parameters after optional parameters\n",
/*096*/ "could not find member \"%s\" in struct \"%s\"\n",
/*097*/ "symbol \"%s\" does not have a matching type\n",
/*098*/ "struct requires unique struct name\n",
/*099*/ "member \"%s\" appears more than once in struct \"%s\"\n",
/*100*/ "function prototypes do not match\n"
#else
"\272pect\236\305k\213:\231\320bu\202fo\217\207\215\012",
"\201l\224\251s\203g\362\317e\234\202(\257\374\201) c\352f\241\345w ea\261 \042c\361e\042\012",
"\232cl\322\237\302\251\345c\335\332\330appe\204 \351\251\340\372o\217\207\240ock\012",
"\375\231 \275\235i\372le\234t\300\012",
"\264\307\224\235\331\363\267t\312",
"\370a\254gn\236\305 \352\260y\012",
"\364\222\257c\225\235\316\220\324\300\012",
"\370\251\365\202\374\201; \361sum\236z\210o\012",
"\273\306\341\200(nega\205ve\320z\210o \257ou\202\302bo\217ds\233",
"\273\264\257\232cl\322\212\012",
"\273out\223d\200\375\312",
"\273\264c\216l\320\235\251\266add\220s\312",
"\221 \213tr\224po\203\202(\221 pu\240\336 \375s\233",
"\273\317e\234t; \235\351s\371t\261\012",
"\042\277a\337t\333c\361\200\370\271\200l\361\202c\361\200\351s\371t\261 \317e\234t\012",
"m\337\205p\362\277a\337t\206\351\042s\371t\261\042\012",
"\217\324\236\276\012",
"\203i\205\216iza\237d\222\251\272ce\300\206\232cl\204\236\341\311",
"\235\251lab\344\355",
"\273\250 nam\200\215\012",
"\250 \216\220ad\224\324\300\355",
"\370l\245u\200(n\201-\365t\233",
"\306a\254gn\234\202\370\223\372\362a\254gn\234t\012",
"\042b\220ak\333\257\042\310t\203ue\333\275ou\202\302\310t\272t\012",
"\264head\353\343ff\210\206from pro\305typ\311",
"\221 \354\353\042#if...\042\012",
"\273\261\322ct\256\365t\012",
"\273subscrip\202(\235\352\306\257\305o m\225\224subscripts)\355",
"\273\374\201\320\361sum\236z\210o\012",
"\340\372o\217\207\317e\234\202\235c\345s\236a\202\271\200\213\207\302\357\362(\230\204t\236a\202l\203\200%d\233",
"\217k\221w\342\343\220c\205v\311",
"\306\203\232x ou\202\302bo\217d\206(\332\215\233",
"\306\370\203\232x\236(\332\215\233",
"\315\360\274\235\331\363\251\277a\337\202\245u\200(\315%d\233",
"\315typ\200mis\354 (\315%d\233",
"e\372t\224\317e\234t\012",
"\273\230r\353(po\254\240\224n\201-\347m\203\222\236\230r\203g\233",
"\272t\244 \261\322c\347\206\334l\203\311",
"\365\202\250 \331\206\221 \341\311",
"dupl\336\222\200\042c\361e\333lab\344 (\245u\200%d\233",
"\273\344lip\223s\320\306\341\200\275\235k\221wn\012",
"\273\340\227\203a\237\302cl\361\206speci\357\210\312",
"\261\322ct\256\365\202\272ce\300\206r\225g\200f\257pack\236\230r\203g\012",
"po\223\212\335p\322\356\347\206\330\313c\300\200\216l nam\236p\322\356\347\312",
"\305o m\225\224\264\267t\312",
"\217k\221w\342\306\341\200(\332\215\233",
"\306\341\274\360 \235\354\320\257\232\230\203a\237\306\275\305o sm\216l\012",
"\306(\206\360 \235\354\012",
"\273l\203\200\310t\203ua\212\012",
"\273r\225g\311",
"\273subscript\320\252\200\042[ ]\333\364\222\226\206\334\307j\257\343\234\223\201\312",
"m\337\205-\343\234\223\201\335\260y\206\370f\337l\224\203i\205\216iz\300\012",
"\272ce\300\353\307ximum \376\256\302\343\234\223\201\312",
"\217\354\236c\345s\353b\244c\200(\042}\042\233",
"\230\204\202\302\264bod\224\371\271ou\202\264head\210\012",
"\260ys\320\345c\335\304\274\225\207\264\267t\206c\225\235\316pu\240\336 (\332\215\233",
"\217f\203ish\236\374\334bef\226\200\340\372il\256\343\220c\205v\311",
"dupl\336\222\200\267t; sam\200\315\275p\361s\236tw\336\311",
"\264\315\307\224\235\331\363\251\277a\337\202\245u\200(\332\215\233",
"m\337\205p\362\042#\344se\333\343\220c\205v\274betwe\213 \042#if ... #\213\343f\042\012",
"\042#\344seif\333\343\220c\205\363f\241\345w\206\352\042#\344se\333\343\220c\205v\311",
"\376\256\302\364\225d\206\360\274\235\357\202\271\200\364\222\226\012",
"\264\220s\337\202\366\302\364\222\226\231 \370\215\012",
"c\225\235\261\225g\200\313\324\236\364\222\226\312",
"\264\315\307\224\201l\224\331\363\251s\203g\362\366(\315%d\233",
"\264\315\307\224\235\316\251\220f\210\213c\200\315\257\352\306(\315\215\233",
"\332c\225\235\316bo\271 \251\220f\210\213c\200\225\207\352\306(\332\215\233",
"\273\244\212\335\376\256\313ci\223\334\351#p\244g\307\012",
"\244\212\335\376\256f\226\307\202\216\220ad\224\324\300\012",
"\244\212\335\376\256supp\226\202wa\206\235\213\255\300\012",
"\252\210-\324\236\364\222\257\370\232cl\204\236bef\226\200\252\200(\375\231\233",
"\042\341e\270\333\364\222\257\275\273\334\042\375\333\250\312",
"\264\315\370\352\306(\315\215\233",
"#\324\200p\222\347\342\330\230\204\202\371\271 \352\216p\331be\205c \261\322c\347\012",
"\203pu\202l\203\200\305o l\201\253(aft\256subs\205tu\212s\233",
"\246n\314x \210r\257\351\271\200\374\201\320\257\273\264c\216l\012",
"m\216f\226m\236UTF-8 \213\340d\203g\320\257c\226rupt\236\357le: \211\012",
"\264\252\274bo\271 \042\220turn\333\225\207\042\220tur\342<\245ue>\042\012",
"\203\310\223\230\213\202\220tur\342typ\274(\306& n\201-\260y\233",
"\217k\221w\342\250\320\257\235\251\365\202\250 \327",
"c\225\235\314k\200\251\366a\206\251\277a\337\202\245u\200f\257\352\203\232x\236\306p\322\356t\256\327",
"\252\210-\324\236\364\222\226\206\225\207na\205\363\375\206\307\224\235\331\363\317e\312",
"\251\264\257\332\307\224\201l\224b\344\201\253\305 \251s\203g\362au\305\326\334\327",
"\317\200\310fl\336t: \201\200\302\271\200\317\274\275\216\220ad\224a\254gn\236\305 a\221\271\256i\372le\234\314\237\327",
"\221 \317\274\204\200\324\236f\257\276\012",
"\217k\221w\342au\305\326\201\325",
"\217k\221w\342\317\200\215 f\257au\305\326\201\325",
"pu\240\336 \304\274\225\207\345c\335\304\274\307\224\235\331\363\317\274\327",
"\317\200\304\274\307\224\235\316\203i\205\216iz\236\327",
"pu\240\336 \375\206\307\224\235\220tur\342\260y\206\327",
"a\227i\262ou\206\365t; \366ov\210rid\200\275\220qui\220\207\327",
"\376\256\302\267t\206\360\274\235\354 \324i\212\012",
"\272pect\236\366nam\200id\213\205\357\210\012",
"\264\213um\210a\237\220qui\220\206\217iqu\200\314g\012",
"c\225\235\331\363\220qui\220\207p\322\356\347\206aft\256\346\212\335p\322\356\347\312",
"\340\337\207\235f\203\207\356\227\210\231 \351\230ruc\202\215\012",
"\276 \360\274\235\331\363\251\354\353typ\311",
"\230ruc\202\220qui\220\206\217iqu\200\230ruc\202nam\311",
"\356\227\210\231 appe\204\206m\226\200\271\352\201c\200\351\230ruc\202\215\012",
"\264pro\305typ\274\360 \235\354\012"
#endif
};
static char *fatalmsg[] = {
#ifdef SCPACK
/*120*/ "cannot read from file: \"%s\"\n",
/*121*/ "cannot write to file: \"%s\"\n",
/*122*/ "table overflow: \"%s\"\n",
/* table can be: loop table
* literal table
* staging buffer
* option table (response file)
* peephole optimizer table
*/
/*123*/ "insufficient memory\n",
/*124*/ "invalid assembler instruction \"%s\"\n",
/*125*/ "numeric overflow, exceeding capacity\n",
/*126*/ "compiled script exceeds the maximum memory size (%ld bytes)\n",
/*127*/ "too many error messages on one line\n",
/*128*/ "codepage mapping file not found\n",
/*129*/ "invalid path: \"%s\"\n",
/*130*/ "assertion failed: %s\n",
/*131*/ "user error: %s\n",
#else
"c\225\235\220a\207from \357le\355",
"c\225\235writ\200\305 \357le\355",
"t\255\200ov\210f\345w\355",
"\203suff\336i\213\202\356m\226y\012",
"\273\361se\227l\256\203\230ruc\212\325",
"\373m\210\336 ov\210f\345w\320\272ce\300\353capacity\012",
"\340\372il\236scrip\202\272ce\300\206\271\200\307ximum \356m\226\224\341\200(%l\207bytes\233",
"\305o m\225\224\210r\257\356ssag\274\334\201\200l\203\311",
"\340\232pag\200\307pp\353\357\362\235fo\217d\012",
"\273p\222h\355",
"\361s\210\237fail\300: \211\012",
"\252\256\210r\226: \211\012"
#endif
};
static char *warnmsg[] = {
#ifdef SCPACK
/*200*/ "symbol \"%s\" is truncated to %d characters\n",
/*201*/ "redefinition of constant/macro (symbol \"%s\")\n",
/*202*/ "number of arguments does not match definition\n",
/*203*/ "symbol is never used: \"%s\"\n",
/*204*/ "symbol is assigned a value that is never used: \"%s\"\n",
/*205*/ "redundant code: constant expression is zero\n",
/*206*/ "redundant test: constant expression is non-zero\n",
/*207*/ "unknown #pragma\n",
/*208*/ "function with tag result used before definition, forcing reparse\n",
/*209*/ "function \"%s\" should return a value\n",
/*210*/ "possible use of symbol before initialization: \"%s\"\n",
/*211*/ "possibly unintended assignment\n",
/*212*/ "possibly unintended bitwise operation\n",
/*213*/ "tag mismatch\n",
/*214*/ "possibly a \"const\" array argument was intended: \"%s\"\n",
/*215*/ "expression has no effect\n",
/*216*/ "nested comment\n",
/*217*/ "loose indentation\n",
/*218*/ "old style prototypes used with optional semicolumns\n",
/*219*/ "local variable \"%s\" shadows a variable at a preceding level\n",
/*220*/ "expression with tag override must appear between parentheses\n",
/*221*/ "label name \"%s\" shadows tag name\n",
/*222*/ "number of digits exceeds rational number precision\n",
/*223*/ "redundant \"sizeof\": argument size is always 1 (symbol \"%s\")\n",
/*224*/ "indeterminate array size in \"sizeof\" expression (symbol \"%s\")\n",
/*225*/ "unreachable code\n",
/*226*/ "a variable is assigned to itself (symbol \"%s\")\n",
/*227*/ "more initializers than enum fields\n",
/*228*/ "length of initializer exceeds size of the enum field\n",
/*229*/ "index tag mismatch (symbol \"%s\")\n",
/*230*/ "no implementation for state \"%s\" in function \"%s\", no fall-back\n",
/*231*/ "state specification on forward declaration is ignored\n",
/*232*/ "output file is written, but with compact encoding disabled\n",
/*233*/ "state variable \"%s\" shadows a global variable\n",
/*234*/ "function is deprecated (symbol \"%s\") %s\n",
/*235*/ "public function lacks forward declaration (symbol \"%s\")\n",
/*236*/ "unknown parameter in substitution (incorrect #define pattern)\n"
#else
"\276 \275tr\242\222\236\305 %\207\261\322c\347\312",
"\220\324i\237\302\365t/\307cro \327",
"\376\256\302\267t\206\360\274\235\354 \324i\212\012",
"\250 \275nev\256\252\300\355",
"\250 \275a\254gn\236\251\245u\200\271a\202\275nev\256\252\300\355",
"\220d\217d\225\202\340\232: \365\202\374\334\275z\210o\012",
"\220d\217d\225\202te\230: \365\202\374\334\275n\201-z\210o\012",
"\217k\221w\342#p\244g\307\012",
"\264\371\271 \366\220s\337\202\252\236bef\226\200\324i\212\320f\226c\353\220p\204s\311",
"\375\231 sho\337\207\220tur\342\251\245u\311",
"po\254\240\200\252\200\302\250 bef\226\200\203i\205\216iza\212\355",
"po\254\240\224\217\203t\213\232\207a\254gn\234t\012",
"po\254\240\224\217\203t\213\232\207bit\371s\200\364a\212\012",
"\366mis\354\012",
"po\254\240\224\251\042\350\333\306\315wa\206\203t\213\232d\355",
"\374\334\331\206\221 effect\012",
"ne\230\236\340m\234t\012",
"\345os\200\203d\213\314\212\012",
"\241\207\230y\362pro\305typ\274\252\236\371\271 \346\212\335sem\336\241umn\312",
"\345c\335\332\215 s\331\360w\206\251\332a\202\251\313c\300\353lev\344\012",
"\374\334\371\271 \366ov\210rid\200\330appe\204 betwe\213 p\204\213\271ese\312",
"lab\344 nam\200\215 s\331\360w\206\366nam\311",
"\376\256\302\343git\206\272ce\300\206\244\212\335\376\256\313ci\223\201\012",
"\220d\217d\225\202\042\341e\270\042: \315\341\200\275\216way\2061 \327",
"\203\232\347m\203\222\200\306\341\200\351\042\341e\270\333\374\334\327",
"\217\220a\261\255\200\340\232\012",
"\251\332\275a\254gn\236\305 its\344f \327",
"m\226\200\203i\205\216iz\210\206\271\352\213um \357\344d\312",
"l\213g\271 \302\203i\205\216iz\256\272ce\300\206\341\200\302\271\200\213um \357\344d\012",
"\203\232x \366mis\354 \327",
"\221 i\372le\234\314\237f\257\317\200\215 \351\375\231\320\221 f\216l-back\012",
"\317\200specif\336a\237\334f\226w\204\207\232cl\322\237\275ig\221\220d\012",
"outpu\202\357\362\275writt\213\320bu\202\371\271 \340\372ac\202\213\340d\353\343s\255\300\012",
"\317\200\332\215 s\331\360w\206\251g\345b\335\304\311",
"\264\275\232\313c\222\236\321) \211\012",
"pu\240\336 \264lack\206f\226w\204\207\232cl\322\237\327",
"\217k\221w\342p\322\356t\256\351subs\205tu\237(\203c\226\220c\202#\324\200p\222\347n\233"
#endif
};