Commit graph

52 commits

Author SHA1 Message Date
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
Wolfgang (Blub) Bumiller
7cfb9425a0 Fixing handling of duplicate frame macros: 'continue' would continue the inner for, how could I miss that 2012-08-23 22:40:51 +02:00
Wolfgang (Blub) Bumiller
4f758284a1 fixing up prevoius commit: cannot reference the parser here 2012-08-23 19:28:15 +02:00
Wolfgang (Blub) Bumiller
5d23fc5f5f Make the lexer use the correct error-printing mechanism 2012-08-23 19:20:50 +02:00
Wolfgang (Blub) Bumiller
9f2e8b9bfe -Wframe-macros, warn about duplicate frame macro definitions, on by default 2012-08-23 19:16:26 +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
Wolfgang (Blub) Bumiller
4cf017bb6b keep the filenames of all lexed files in a global lex_filenames vector because we don't strdup the filenames into lex_ctx, but copy the pointer 2012-08-18 16:47:33 +02:00
Wolfgang (Blub) Bumiller
a67110410b clear lex->modelname 2012-08-18 16:04:20 +02:00
Wolfgang (Blub) Bumiller
3efad75336 clean lex->frames in lex_close 2012-08-18 15:57:21 +02:00
Wolfgang (Blub) Bumiller
d3492d4a13 Fix indentation of lexer.c - was still using some tabs there 2012-08-18 14:27:19 +02:00
Wolfgang (Blub) Bumiller
bc94d3f5b8 lexer now turns '(' into an operator if noops=false 2012-08-18 14:26:25 +02:00
Wolfgang (Blub) Bumiller
076503770d Support for $modelname and $framerestore 2012-08-16 21:02:56 +02:00
Wolfgang (Blub) Bumiller
3b9a6b3ace Don't expand frame macros when they don't have a $ prefix 2012-08-16 20:49:58 +02:00
Wolfgang (Blub) Bumiller
e00c8da849 Added support for some modelgen/spritegen commands 2012-08-16 20:47:31 +02:00
Wolfgang (Blub) Bumiller
91ee7658a6 '$' is now its own token, used for modeldata 2012-08-16 20:03:53 +02:00
Wolfgang (Blub) Bumiller
7bc564f175 lexer: recognize != as operator when noops=false 2012-08-16 16:06:12 +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
5a383ac2b0 Reorganizing expression parsing to allow prefix-operators like unary minus 2012-08-16 15:11:03 +02:00
Wolfgang (Blub) Bumiller
0d9435d326 util_fopen... 2012-08-16 14:01:47 +02:00
Wolfgang (Blub) Bumiller
812cb5be64 sscanf -> sscanf_s on windows 2012-08-16 13:44:53 +02:00
Wolfgang (Blub) Bumiller
3017c92edf 'local' becomes a keyword 2012-08-14 16:10:17 +02:00
Wolfgang (Blub) Bumiller
fd1a850629 Recognize a dot as operator when not in 'no-ops' mode in the lexer 2012-08-12 19:00:44 +02:00
Wolfgang (Blub) Bumiller
c16a17ed5f recognize a dot as a single char token 2012-08-11 14:45:49 +02:00
Wolfgang (Blub) Bumiller
ce082551d8 handling if/else, shunting yard now leaves unmatched closing paren-tokens on the parser for this purpose 2012-08-11 11:17:46 +02:00
Wolfgang (Blub) Bumiller
42ab396e38 tempcommitting WARN_UNKNOWN_CONTROL_SEQUENCE and handling of backslashes in strings 2012-08-08 12:24:01 +02:00
Wolfgang Bumiller
64c230d222 Parsing a comma as an operator now - unless noop is true 2012-07-27 13:47:01 +02:00
Wolfgang Bumiller
331c00dd50 return is a keyword 2012-07-26 23:18:15 +02:00
Wolfgang Bumiller
6a346745aa Handling definition of builtins 2012-07-19 17:39:19 +02:00
Wolfgang Bumiller
d581fdc048 Reading a global def 2012-07-16 14:52:52 +02:00