Commit graph

81 commits

Author SHA1 Message Date
Wolfgang (Blub) Bumiller
e3acdcf0a9 Let's not have + and - as sole token, always allow ++ and -- to become operators independent of the noops flag 2012-11-25 18:07:19 +01:00
Wolfgang (Blub) Bumiller
04347508e6 linecounting issue in the lexer 2012-11-25 17:50:31 +01:00
Wolfgang (Blub) Bumiller
9a9ecd574e Fix a bug in the lexer causing double-dots to double the character after the 2nd dot 2012-11-25 17:43:24 +01:00
Wolfgang (Blub) Bumiller
23d16b303d typedef is now a keyword 2012-11-25 14:29:59 +01:00
Dale Weiler
5c0a62be96 Add respective license headers + some cleanups 2012-11-24 21:22:35 +00:00
Wolfgang (Blub) Bumiller
2bc99076cf 'var' is now no keyword anymore, :\ 2012-11-23 22:07:35 +01:00
Wolfgang (Blub) Bumiller
e3c1244687 preserve newlines in preprocessed multiline comments 2012-11-23 21:47:00 +01:00
Wolfgang (Blub) Bumiller
ab55673c35 Fix a very nasty bug in the lexer's handling of comments 2012-11-23 21:35:14 +01:00
Wolfgang (Blub) Bumiller
0d33939b1b operator &~= 2012-11-23 14:39:05 +01:00
Wolfgang (Blub) Bumiller
b771695e0d Fixing shadows in lexer.c 2012-11-22 20:46:13 +01:00
Wolfgang (Blub) Bumiller
5ec75a228e question mark must result in TOKEN_OPERATOR 2012-11-21 20:42:48 +01:00
Wolfgang (Blub) Bumiller
e0ddf32d2e parsing the ternary 2012-11-21 20:36:42 +01:00
Wolfgang (Blub) Bumiller
63969180cf 'case' and 'default' are now keywords too, not just switch 2012-11-19 21:40:38 +01:00
Wolfgang (Blub) Bumiller
6e888396b5 moving keywords into an array 2012-11-19 19:20:26 +01:00
Wolfgang (Blub) Bumiller
19e82883ea Fixing some indentation 2012-11-18 20:56:11 +01:00
Wolfgang (Blub) Bumiller
e4998e0798 Added #include 2012-11-18 16:22:07 +01:00
Wolfgang (Blub) Bumiller
43a72b2a63 Don't skip the \n after parsing a pragma in the lexer otherwise 2 pragmas in the row wouldn't work 2012-11-18 16:17:19 +01:00
Wolfgang (Blub) Bumiller
a5dbfacf2f pragma line(lineno) - sets the linenumber for the line after the pragma 2012-11-18 15:32:03 +01:00
Wolfgang (Blub) Bumiller
e66f2bcb33 Better linecounting for pragmas; support for prgama file(filename) 2012-11-18 15:30:49 +01:00
Wolfgang (Blub) Bumiller
9898ab5316 fixup line counting in #pragmas 2012-11-18 15:23:00 +01:00
Wolfgang (Blub) Bumiller
79619fbf50 Experimental support for push/pop(line) pragmas 2012-11-18 15:14:42 +01:00
Wolfgang (Blub) Bumiller
a014480987 Add quotes to the known control sequences... darn. Add stringification via # 2012-11-18 14:26:40 +01:00
Wolfgang (Blub) Bumiller
79abe3fb6d Merge branch 'master' into ftepp 2012-11-17 11:34:00 +01:00
Wolfgang (Blub) Bumiller
33be9edec7 quick and dirty fix to lexerror for when fopen fails 2012-11-17 10:36:35 +01:00
Wolfgang (Blub) Bumiller
515cafe8bd Lexer should keep newlines in merged lines, so will the preprocessor, but therefore the lexer will replace comments with actual spaces so we don't get borken output... also don't error about redifining a macro when inside a non-outputting #if branch 2012-11-16 23:13:53 +01:00
Wolfgang (Blub) Bumiller
05a26333fc Expand macros into a string buffer 2012-11-16 22:22:31 +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
906f319673 Replaced it all... 2012-11-15 18:32:09 +01:00
Dale Weiler
2e84cc0b41 Use new console system everywhere. 2012-11-15 00:28:46 +00:00
Wolfgang (Blub) Bumiller
84088cb5f0 Merging in new-syntax 2012-11-14 21:39:16 +01:00
Wolfgang (Blub) Bumiller
8f1f6160e3 'not' is now a keyword 2012-11-13 18:55:48 +01:00
Wolfgang (Blub) Bumiller
6204c8c956 'not' is now a keyword 2012-11-13 18:51:45 +01:00
Wolfgang (Blub) Bumiller
22d6ff2309 Fixing lexer to not classify wrong tokens as operators 2012-11-11 18:57:02 +01:00
Wolfgang (Blub) Bumiller
caf8946f99 lexer needs to fill the token for the index operator with actual content... 2012-11-11 18:31:37 +01:00
Wolfgang (Blub) Bumiller
2994d308a0 array index opening-paren can now return TOKEN_OPERATOR, partially handled in SYA 2012-11-11 16:43:16 +01:00
Wolfgang (Blub) Bumiller
a84f9483e6 lex_open_string 2012-11-11 10:27:09 +01:00
Wolfgang (Blub) Bumiller
fe05d5afd9 added 'var' to the keywords when not in -std=qcc, supporting 'var .float x;' in global-scope to declare a field-pointer variable without creating a field of that name 2012-11-11 10:13:00 +01:00
Dale Weiler
9ad35a2817 Remove execloop.h, we still use xmacros, but it's done with #include __FILE__ trickery. Please do not kill me, it doesn't look that bad, conditional compilation is even used in eglibc like this :P 2012-11-10 20:53:37 +00:00
Wolfgang (Blub) Bumiller
b5970707c0 Properly handle string and char constants when preprocessing: don't unescape and keep surrounding quotes 2012-11-02 18:48:32 +01:00
Wolfgang (Blub) Bumiller
b219d4b468 Changed the TOKEN_WHITE to contain the actual data - ie the comments 2012-11-02 18:39:32 +01:00
Wolfgang (Blub) Bumiller
a3791b3f51 Finishing the preprocessing flag for the lexer, added preprocess.c to test it 2012-11-02 18:34:14 +01:00
Wolfgang (Blub) Bumiller
ab86b0470c preprocessing flag for the lexer 2012-11-02 18:33:51 +01:00
Wolfgang (Blub) Bumiller
2ef0203d17 Fix a minor bug in the lexer 2012-11-02 18:30:20 +01:00
Wolfgang (Blub) Bumiller
edd9ded23c reserve the keywords 'switch,struct,union,break,continue' - but only with std != QCC - eg. id1 uses a function named 'break' 2012-11-01 14:20:58 +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
6126db10df digraphs 2012-10-29 13:56:00 +01:00
Wolfgang (Blub) Bumiller
e6cebc3ea3 trigraphs 2012-10-29 13:52:39 +01:00
Wolfgang (Blub) Bumiller
1d851a1400 fixing token-reset in modelname 2012-08-24 18:23:35 +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