Commit graph

63 commits

Author SHA1 Message Date
Dale Weiler
11179a2a71 Major header reworking, this respects the namespaces properly. Makes object dependency more obvious, allows for better make caches, and prevents misuse of library features, i.e use con_* instead of printf. 2013-06-04 02:47:07 +00:00
Dale Weiler
0b6269f607 column printing for warnings and errors now 2013-05-30 19:36:01 +00:00
Dale Weiler
f892b32335 Major export cleanup. Anything that was exported but wasn't used outside where it was implemented has been turned into static, and their exports have been removed. This actually makes the compiler compile slightly faster. 2013-05-29 03:29:04 +00:00
Dale Weiler
df8b486c98 Prevent negitive numbers from being used as the left operand of shift operator. 2013-05-29 02:37:45 +00:00
Wolfgang Bumiller
c3f4b7153b change the value of TOKEN_EOF 2013-04-25 17:39:12 +02:00
Wolfgang Bumiller
3a4aba0b31 Grrrr 2013-04-24 17:47:42 +02:00
Dale Weiler
489ad486bc Get it compiling in visual studio again. 2013-04-24 01:43:53 +00:00
Dale Weiler
73c085a461 Fix operator precedence, closes #101 2013-03-09 04:25:02 +00:00
Dale Weiler
db229b6f94 Make ** RIGHT associative 2013-03-07 22:14:04 +00:00
Dale Weiler
d3c7b6fb39 Implement exponentiation operator ** as well as __builtin_pow (used for exponentiation operator). Use of exponentiation operator with constants results in const folded (precomputed at compile time exponentiation), otherwise runtime exponentiation with some clever loops (slow!). 2013-03-07 21:31:19 +00:00
Dale Weiler
a568d43487 Implemented __VA_COUNT__ 2013-02-08 12:30:17 +00:00
Dale Weiler
fed0f8b6b4 Work in progress <=> operator. 2013-02-05 16:34:03 +00:00
Dale Weiler
b4fbba5708 Implement subscripting for __VA_ARGS__, and added test-case. This only works on INTCONST for now. 2013-01-27 12:55:56 +00:00
Wolfgang Bumiller
428453a132 for compile-time constants << and >> are now available 2013-01-10 15:12:19 +01:00
Dale Weiler
9bda8f61f4 Add specialized diagnostics for when predefined macros are used and ftepp predefined macros are not enabled. 2013-01-03 12:04:32 +00:00
Wolfgang Bumiller
558a091c08 remove ast.h-include from lexer.h to parser.c... 2013-01-02 15:08:02 +01:00
Wolfgang Bumiller
359ba5f728 lex.peek char->int 2013-01-02 15:03:20 +01:00
Wolfgang Bumiller
38a664ed72 __VA_ARGS__ support 2013-01-02 14:15:16 +01:00
Dale Weiler
29db4a44ed Happy new years! 2013-01-01 05:08:55 +00:00
Wolfgang Bumiller
12d87fba1b Adding '&~=' to the -std=gmqcc operator list 2012-12-31 12:56:04 +01:00
Dale Weiler
d51a6ab3db Whitespace 2012-12-23 09:10:31 +00:00
Dale Weiler
5bc815c63f Revert "Whitespace fixes"
This reverts commit 4580dcf1ea.
2012-12-23 09:10:07 +00:00
Dale Weiler
4580dcf1ea Whitespace fixes 2012-12-23 08:42:53 +00:00
Wolfgang Bumiller
26a80e0868 Lexer: [[ and ]] are now TOKEN_ATTRIBUTE_{OPEN,CLOSE} 2012-12-22 18:00:51 +01:00
Wolfgang (Blub) Bumiller
95865035eb Fix ternary operator entry for -std=gmqcc 2012-12-02 11:56:20 +01:00
Wolfgang (Blub) Bumiller
53fd019780 -fcorrect-ternary; by default -std=fteqcc now uses fteqcc's wrong ternary precedence parsing 2012-12-01 13:42:16 +01:00
Wolfgang (Blub) Bumiller
b966cd4f4d More ternary fixes 2012-12-01 00:50:04 +01:00
Wolfgang (Blub) Bumiller
ca033e5acd Some side-effect propagation for better warnings, so that comma-operators with assignments in them don't cause the -Weffectless-statement warning, and fixing ternary precedence for fte operator list 2012-11-25 19:19:36 +01:00
Dale Weiler
5c0a62be96 Add respective license headers + some cleanups 2012-11-24 21:22:35 +00:00
Wolfgang (Blub) Bumiller
0d33939b1b operator &~= 2012-11-23 14:39:05 +01:00
Wolfgang (Blub) Bumiller
5867167a70 Fixing operator precedence of suffices 2012-11-23 12:32:07 +01:00
Wolfgang (Blub) Bumiller
4079835c7e Parsing of suffix operators, NOTE: applied like prefix operators just to get it committed in a compilable state 2012-11-23 11:57:08 +01:00
Wolfgang (Blub) Bumiller
3f805fdde9 -std=fteqcc gets its own operator list 2012-11-23 11:45:07 +01:00
Wolfgang (Blub) Bumiller
a87bc6a575 Removing unused _tokennames from lexer.h 2012-11-22 20:42:55 +01:00
Wolfgang (Blub) Bumiller
e0ddf32d2e parsing the ternary 2012-11-21 20:36:42 +01:00
Wolfgang (Blub) Bumiller
8517221b1b Inserting ternary in the qcc-operator-list at the place fteqcc would have it 2012-11-21 20:16:28 +01:00
Wolfgang (Blub) Bumiller
79619fbf50 Experimental support for push/pop(line) pragmas 2012-11-18 15:14:42 +01:00
Wolfgang (Blub) Bumiller
053d8fb0e2 mergelines flag for the lexer to handle a backslash-newline 2012-11-16 20:29:20 +01:00
Wolfgang (Blub) Bumiller
c583ae24f2 Replacing lexer's vectors and getting rid of the macros 2012-11-15 18:48:38 +01:00
Wolfgang (Blub) Bumiller
84088cb5f0 Merging in new-syntax 2012-11-14 21:39:16 +01:00
Wolfgang (Blub) Bumiller
2edc7ce822 index operator actually has 2 operands, not 0 2012-11-11 18:45:20 +01:00
Wolfgang (Blub) Bumiller
a84f9483e6 lex_open_string 2012-11-11 10:27:09 +01:00
Wolfgang (Blub) Bumiller
4977f605d4 array-subscript operator entries 2012-11-11 10:13:01 +01:00
Wolfgang (Blub) Bumiller
ab86b0470c preprocessing flag for the lexer 2012-11-02 18:33:51 +01:00
Wolfgang (Blub) Bumiller
415816e4dc string-literals now do not treat digraphs as digraphs 2012-11-01 14:05:14 +01:00
Wolfgang (Blub) Bumiller
aca5e05173 removing some old unused stuff from lexer.h 2012-08-24 23:21:16 +02:00
Wolfgang (Blub) Bumiller
ab91dea4e0 the lexer now doesn't _allocate_ the token structure, also: the vector holding the token doesn't shrink so we have much fewer reallocations 2012-08-24 17:37:55 +02:00
Wolfgang (Blub) Bumiller
19391bb190 the -std=qcc set of operators, still have to verify if it's the original 2012-08-23 19:01:15 +02:00
Wolfgang (Blub) Bumiller
deb7ccb830 for the lexer 3 dots now become TOKEN_DOTS 2012-08-23 11:12:32 +02:00
Wolfgang (Blub) Bumiller
e0ffcfb74b Lexer now returns TOKEN_EOF only once and afterwards TOKEN_FATAL 2012-08-20 18:12:04 +02:00