Commit graph

115 commits

Author SHA1 Message Date
Wolfgang (Blub) Bumiller
1a3a0014c5 even in non-qcc mode we need to search the variables for fields because of field-pointers 2012-08-16 16:21:09 +02:00
Wolfgang (Blub) Bumiller
7c731b70cf verbose error about unhandled operators 2012-08-16 16:07:00 +02:00
Wolfgang (Blub) Bumiller
d81ef81246 Fix an error message 2012-08-16 15:59:09 +02:00
Wolfgang (Blub) Bumiller
ec439d7880 Allow fieldpointer parameters in functions, allow function fields again 2012-08-16 15:27:06 +02:00
Wolfgang (Blub) Bumiller
47243d0df1 allow redeclaration of fields, but warn about them 2012-08-16 15:14:39 +02:00
Wolfgang (Blub) Bumiller
5a383ac2b0 Reorganizing expression parsing to allow prefix-operators like unary minus 2012-08-16 15:11:03 +02:00
Wolfgang (Blub) Bumiller
c4730b405b unary - operator implemented, adding imm_vector_zero and imm_float_zero since those should be accessible quickly 2012-08-16 14:23:18 +02:00
Wolfgang (Blub) Bumiller
ba1886ad31 add some missing casts to some mem_a 2012-08-16 12:34:28 +02:00
Wolfgang (Blub) Bumiller
470fc68b06 don't try to access function-local functions outside of functions... 2012-08-16 11:36:16 +02:00
Wolfgang (Blub) Bumiller
2a7e7046d9 assigning values to constant globals 2012-08-16 11:33:29 +02:00
Wolfgang (Blub) Bumiller
b7f9b20a2b strpcy->memcpy 2012-08-15 17:01:16 +02:00
Wolfgang (Blub) Bumiller
42e2102839 remove MEM_VECTOR_INIT - the memset does it all, don't give a false sense of initialization since it wasn't complete anyway 2012-08-15 12:13:15 +02:00
Wolfgang (Blub) Bumiller
e5124ecf2f Fix memset on the parser... 2012-08-15 12:11:15 +02:00
Wolfgang (Blub) Bumiller
475cb97404 bit-and const-fold should use bitand not bitor 2012-08-14 23:52:57 +02:00
Wolfgang (Blub) Bumiller
c0ddb0908c constant folding for bit and logic ops, added some macros to shorten the code (by a lot) 2012-08-14 23:50:49 +02:00
Wolfgang (Blub) Bumiller
a5b3faae30 const folding for division 2012-08-14 23:43:08 +02:00
Wolfgang (Blub) Bumiller
b8d92dfa01 constant folding for +, - and * 2012-08-14 22:51:05 +02:00
Wolfgang (Blub) Bumiller
9ed9a0c669 get rid of more duplicate code 2012-08-14 22:34:20 +02:00
Wolfgang (Blub) Bumiller
de4fe00d2f Allow multiple fields to be declared using comma 2012-08-14 22:31:08 +02:00
Wolfgang (Blub) Bumiller
e9844d9abf vector fields now get _x, _y and _z too 2012-08-14 20:00:11 +02:00
Wolfgang (Blub) Bumiller
4c5c615f95 combine 2 ifs to shorten code a little 2012-08-14 17:48:22 +02:00
Wolfgang (Blub) Bumiller
8dd7943768 -= operator 2012-08-14 17:44:14 +02:00
Wolfgang (Blub) Bumiller
3ef6da8e5b error message replacement 2012-08-14 17:36:20 +02:00
Wolfgang (Blub) Bumiller
a574da7df8 += operator implemented 2012-08-14 17:30:55 +02:00
Wolfgang (Blub) Bumiller
3544cfa2b2 make the += operator use binstore actually, currently it was acting like a regular plus 2012-08-14 17:27:52 +02:00
Wolfgang (Blub) Bumiller
f39a47e4ed replacing lots of error messages 2012-08-14 17:27:26 +02:00
Wolfgang (Blub) Bumiller
7506817224 shush typo 2012-08-14 17:17:35 +02:00
Wolfgang (Blub) Bumiller
c4cd49a408 different warning message 2012-08-14 17:08:00 +02:00
Wolfgang (Blub) Bumiller
ca1c9b921d another -Wextensions situation: -std=qcc has no for loops 2012-08-14 16:59:14 +02:00
Wolfgang (Blub) Bumiller
16093adb09 fixup do-while parsing, expect a semicolon afterwards 2012-08-14 16:42:29 +02:00
Wolfgang (Blub) Bumiller
339c0e5870 do-while loops 2012-08-14 16:38:11 +02:00
Wolfgang (Blub) Bumiller
4d47c40cb9 parsewarning() now gets GMQCC_WARN since parsewarning returns whether or not the warning was treated as an error, thus we need to bail if it returns true 2012-08-14 16:26:42 +02:00
Wolfgang (Blub) Bumiller
2d9623cbe8 the 'local' keyword now also introduces the declaration of a local variable 2012-08-14 16:22:38 +02:00
Wolfgang (Blub) Bumiller
107100c666 -dump option, by default the IR is not dumped anymore 2012-08-14 16:19:23 +02:00
Wolfgang (Blub) Bumiller
1638cc9f01 -Wextensions for -std=qcc: warn about missing 'local' keyword when declaring a variable without it 2012-08-14 16:17:09 +02:00
Wolfgang (Blub) Bumiller
cc48802685 eof after parsing the semicolon of a function declaration shouldn't be an error... 2012-08-14 16:14:26 +02:00
Wolfgang (Blub) Bumiller
78d223fdcb Getting rid of some debug output 2012-08-14 16:12:12 +02:00
Wolfgang (Blub) Bumiller
c2364567de allow a semicolon after function bodies - make it mandatory with -std=qcc 2012-08-14 14:38:02 +02:00
Wolfgang (Blub) Bumiller
51719db2cf actually print the prototype's file+line, not the current one 2012-08-14 14:19:44 +02:00
Wolfgang (Blub) Bumiller
65fb4b34b5 type comparison, function prototypes 2012-08-14 14:14:56 +02:00
Wolfgang (Blub) Bumiller
e35a26a9e1 the error about an already-declared variable should display the place its been previously declared at 2012-08-14 13:50:55 +02:00
Wolfgang (Blub) Bumiller
5ef88dbda7 removed redundant error+file+line in parseerror() 2012-08-14 13:15:55 +02:00
Wolfgang (Blub) Bumiller
104e9bce92 don't add the general 'parse error' message if an error has already been printed 2012-08-14 11:54:27 +02:00
Wolfgang (Blub) Bumiller
579ac3dd5d Working towards a saner error-output system, adding -Werror 2012-08-14 11:34:07 +02:00
Wolfgang (Blub) Bumiller
c08966a2a4 remove now unused files 2012-08-14 10:57:09 +02:00
Wolfgang (Blub) Bumiller
69d9afbc69 while, for 2012-08-13 17:10:13 +02:00
Wolfgang (Blub) Bumiller
1c4a11f6fb factored out 'if' parsing code into a function, added 'while' parsing, and errors for more unsupported operators 2012-08-13 16:45:35 +02:00
Wolfgang (Blub) Bumiller
5ca3fed36a Even more operators 2012-08-13 15:33:32 +02:00
Wolfgang (Blub) Bumiller
d8890fda9e More operations 2012-08-13 15:24:55 +02:00
Wolfgang (Blub) Bumiller
5390b2d7c2 nicer error messages, bitand and bitor for floats allowed 2012-08-13 15:13:43 +02:00