Commit graph

789 commits

Author SHA1 Message Date
Wolfgang (Blub) Bumiller
ca1c9b921d another -Wextensions situation: -std=qcc has no for loops 2012-08-14 16:59:14 +02:00
Wolfgang (Blub) Bumiller
ae5dba3e0b Pushing my current testcode 2012-08-14 16:53:18 +02:00
Wolfgang (Blub) Bumiller
abc574289f fix wrong count on IF/IFNOT jumps 2012-08-14 16:48:20 +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
5064554b76 flags and warnings not printed anymore without -dump 2012-08-14 16:20:39 +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
d96fd2d9b8 -Wextensions on by default 2012-08-14 16:16:32 +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
3017c92edf 'local' becomes a keyword 2012-08-14 16:10:17 +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
722be55fa9 removing all direct 'printfs' from ast and ir, replaced by the error interface 2012-08-14 13:14:32 +02:00
Wolfgang (Blub) Bumiller
36591e902b it's .file, not .name' 2012-08-14 12:17:34 +02:00
Wolfgang (Blub) Bumiller
5416fdb7c0 renamign 'errtype' to 'msgtype' here... makes more sense... plus I had it on the paramlist :P 2012-08-14 12:17:08 +02:00
Wolfgang (Blub) Bumiller
965331f315 oops... removing wrongly placed semicolons 2012-08-14 12:15:05 +02:00
Wolfgang (Blub) Bumiller
d824645019 error-print functions which take lex_ctx 2012-08-14 12:06:28 +02:00
Wolfgang (Blub) Bumiller
5f0111c114 And a colon for the colored version too ... 2012-08-14 12:00:09 +02:00
Wolfgang (Blub) Bumiller
0a27cc13c8 Add a colon after the linenumber 2012-08-14 11:54:48 +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
4dad7c7d50 used the wrong va_list there... why didn't gcc warn about this being uninitialized... 2012-08-14 11:54:06 +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
82d9651529 Merge branch 'master' into blub/parser 2012-08-14 10:42:34 +02:00
Wolfgang (Blub) Bumiller
cfdf915b25 ast_binstore, used for +=, -=, ++, -- etc 2012-08-14 10:40:48 +02:00
Wolfgang (Blub) Bumiller
3fd7a64b45 storing generated values and returning them early if they exist - will error when that doesn't make sense eg when trying to call codegen ast_ifthen more than once 2012-08-13 19:54:53 +02:00
Wolfgang (Blub) Bumiller
862b506dcd initialize ast_expression_common.outl/outr 2012-08-13 19:40:06 +02:00
Wolfgang (Blub) Bumiller
406a32bea6 prototypes for ast_binstore, and storing outl/outr in ast_expression_common, TODO: let ast_codegen functions reuse previous results so that binstore can call codegen twice 2012-08-13 19:39:35 +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
e3b3c2efe3 Merge branch 'master' into blub/parser 2012-08-13 15:25:40 +02:00
Wolfgang (Blub) Bumiller
633561a730 type_eq_instr[], type_ne_instr[] 2012-08-13 15:25:14 +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
5680c661a6 adding missing initializer for ir_value's member array 2012-08-12 21:56:53 +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
f2bbffbd4b return an error code at exit after compile errors 2012-08-12 20:12:32 +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