1 /*
3 MIDletPascal-compiler 3.5.IDE (mp3CC.exe)
4 http://sourceforge.net/projects/midletpascal
6 MPC.2.0.2:
7 Niksa Orlic
9 MPC.3.0.003/009:
10 Artem (ironwoodcutter@bk.ru)
11 new lexer,
12 bytecode inline,
13 shl & shr operators,
14 smart string concatenation,
15 new max array size (up to 32767),
16 inclusion of {$R+/-} to enable/disable real numbers support,
17 and {$V+/-} to enable/disable internal bytecode preverification
19 MPC.3.0.IDE:
20 Javier Santo Domingo (j-a-s-d@users.sourceforge.net)
21 ported to GNUCC (with coditional defines),
22 pascal-like errors messages and warnings,
23 new command-line parsing (C way),
24 disabled $R and $V directives (confusing overlapped functionality with the IDE),
25 and several other adjustments (wow64 WM_COPYDATA workaround, etc)
26 and bugfixes (real numbers parsing, shl & shr swapped operators, etc)
28 MPC.3.1.IDE:
29 Javier Santo Domingo (j-a-s-d@users.sourceforge.net)
30 infinite-loop support (repeat/forever),
31 and bugfixes (complex-type bidimensional array initialization index out-of-bound, etc)
33 MPC.3.2.IDE:
34 Javier Santo Domingo (j-a-s-d@users.sourceforge.net)
35 exit keyword support,
36 C-style multiline comments support
38 MPC.3.3.IDE:
39 Javier Santo Domingo (j-a-s-d@users.sourceforge.net)
40 result keyword support,
41 C-style shift operators support (<< and >>),
42 and bugfixes (const assignment crash, etc)
44 MPC.3.4.IDE:
45 Javier Santo Domingo (j-a-s-d@users.sourceforge.net)
46 Project Library Directory support via -p switch,
47 imported the "ASM BLOCK" from the Artem's MPC.3.0.011.SIMPLE parser.c,
48 bytecode keyword support,
49 and ushr/>>> shift operator support
51 MPC.3.5.IDE:
52 Javier Santo Domingo (j-a-s-d@users.sourceforge.net)
53 C-like double quoted strings support,
54 negative integer constants support,
55 and bugfixes (consecutive same variable name declaration collision, etc)
57 */
59 // j-a-s-d: workaround for Wow64 using WM_COPYDATA
60 /*#ifndef LINUX
61 #define WOW64_WORKAROUND
62 #endif*/
75 #include <stdio.h>
76 #include <stdlib.h>
77 #include <string.h>
78 #include <getopt.h>
80 #ifdef WOW64_WORKAROUND
81 #include <windows.h>
84 COPYDATASTRUCT COMPILERMESSAGE;
85 #endif
124 {
125 #ifdef WOW64_WORKAROUND
133 }
134 #endif
137 }
140 {
142 {
155 }
157 }
162 {
164 {
168 }
169 }
175 };
177 //////////
180 {
197 }
200 {
216 #ifdef WOW64_WORKAROUND
218 #endif
220 );
223 }
226 {
229 }
232 }
239 }
240 }
243 }
246 }
249 }
252 }
254 }
257 {
265 {
266 // -- parse command line arguments
289 }
292 #ifdef WOW64_WORKAROUND
294 #endif
304 }
307 detect_units_only++;
312 }
313 }
319 }
324 }
329 }
334 }
336 // --
348 //pos = len - 1;
349 #ifdef UNIX
351 #endif
352 #ifdef WIN32
355 #endif
356 //pos ++;
358 ////////////////////
362 //len = strlen(output_directory); output_path = (char*) mem_alloc(len + 1);
364 //library_directory=output_directory;
367 {
372 }
380 }
381 }
387 {
389 {
396 }
398 }
402 }