Commit graph

107 commits

Author SHA1 Message Date
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
Wolfgang (Blub) Bumiller
9f151e82df Check types on + and - operations 2012-08-13 15:09:27 +02:00
Wolfgang (Blub) Bumiller
c7cca404dc after a closing paren another operator has to be expected again 2012-08-12 20:21:21 +02:00
Wolfgang (Blub) Bumiller
fb8a9b3ccf some debug outputs which can be activated via a define, fixing a bug where the shunting yard tries to apply operators when there are none left 2012-08-12 20:13:14 +02:00
Wolfgang (Blub) Bumiller
6806fd1e86 it's a member of entity, not of a field... 2012-08-12 19:29:18 +02:00
Wolfgang (Blub) Bumiller
6409bf455f -std=gmqcc way to handle fields by 'namespace' 2012-08-12 19:24:08 +02:00
Wolfgang (Blub) Bumiller
ae73332832 without -std=gmqcc fields are accessible anywhere where globals are 2012-08-12 19:02:52 +02:00
Wolfgang (Blub) Bumiller
437988c5b4 don't rewind local variables too far 2012-08-12 18:58:46 +02:00
Wolfgang (Blub) Bumiller
5c0ac35d4c tempcomitting parser changes for fields 2012-08-11 15:40:03 +02:00