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