Commit graph

124 commits

Author SHA1 Message Date
Bill Currie
0b5565396b Add a class type to symbols and rework the CLASS_NAME handling.
This fixes the problem with [Array alloc] producing a warning about Class
not repsonding to -alloc.
2011-02-13 16:05:09 +09:00
Bill Currie
acb3c0da11 Fix class initialization. 2011-02-04 14:29:47 +09:00
Bill Currie
7b22bfba63 Better Objective-QC keyword detection.
Use a flag in the keyword struct rather than checking for "@" in the
keyword. This catches such keywords as "id" and "Protocol" as well.
2011-02-04 08:38:58 +09:00
Bill Currie
0624408317 Move the diagnostic functions into their own file. 2011-01-24 21:54:57 +09:00
Bill Currie
d618e51dc8 Move save_string and make_string into strpool
Might not be the perfect place, but at least they're strongly related.
2011-01-24 21:32:48 +09:00
Bill Currie
4ac80c2932 Get qfcc running again.
It segs when it tries to link, but that's because a real object file has
not been created yet. However, I can get my tree and flow diagrams :)
2011-01-22 15:52:57 +09:00
Bill Currie
e08efe036b Move the constant expression values into their own struct. 2011-01-19 08:43:24 +09:00
Bill Currie
ea3895805b Rewrite much to use symbols and symtabs. Gut emit.c. Massive breakage.
That which isn't rewritten is horribly broken. However, this does include a
nice mechanism for building QC structs for emitting data.

emit.c has been gutted in the spirit of "throw one away".

There is much work to be done to get even variables emitted, let alone
code. Things should be a little more fun from here on.
2011-01-17 22:34:41 +09:00
Bill Currie
ffea505678 Cleanup QC's constant handling based on QP. 2011-01-14 12:10:28 +09:00
Bill Currie
c38ea0b1bc Correct the spelling of "nil". 2011-01-14 12:07:40 +09:00
Bill Currie
75ec6bf244 Clean out some unnecessary types from the progs engine and clean up the mess.
This is a nasty commit, sorry, but 99% of the commit is interdependent.
2011-01-10 12:25:31 +09:00
Bill Currie
66ac56063f Break out the frame macro code from qc-lex.l 2011-01-10 12:25:31 +09:00
Bill Currie
a09f02db1a Break out the debug and string functions from qc-lex.l. 2011-01-10 12:25:30 +09:00
Bill Currie
fbdbcfada4 Remove deprecated @argc and @argv 2011-01-05 13:10:57 +09:00
Bill Currie
28740bb57f Add unsigned integer constant support. 2010-12-23 19:32:28 +09:00
Bill Currie
4481ba9b0d Allow explicit references to classes and categories.
Use "@reference ClassName;" or "@reference ClassName(CategoryName);" to
create a refence to the class or category, forcing the defining object file
to be linked into the program when the object file is part of a library.
2010-12-12 20:27:56 +09:00
Bill Currie
67beaf4487 Nil is a constant, so allow it in global initializers. 2010-11-24 17:01:18 +09:00
Bill Currie
a6c504936c get \8 and \9 right 2010-01-13 06:23:02 +00:00
Bill Currie
07b61aa23f missed \0-9 for the gold numbers from qccx 2010-01-13 06:22:01 +00:00
Bill Currie
36fe939ea5 don't hang when processing \{N} escape sequences and fix a comment 2010-01-13 06:21:29 +00:00
Bill Currie
c3f47efb07 add --qccx-escapes to resolve the conflicts in escape sequences and document the escape sequences supported by qfcc. 2009-12-25 07:59:25 +00:00
Bill Currie
fe95805d86 various gcc 4.3 fixes 2008-07-19 05:40:57 +00:00
Bill Currie
411d6517cb make duplicate macros behave the same as qcc in traditional mode (ie, bump the number anyway) 2007-05-15 07:51:04 +00:00
Bill Currie
fee656eb68 warn about (and otherwise ignore) duplicate frame macros 2007-05-15 07:36:56 +00:00
Bill Currie
a6388ee680 overload "break" and allow break to be used in --traditional 2007-04-06 11:46:21 +00:00
Bill Currie
6d21c50dee handle #line (hopefully) 2007-04-06 11:27:03 +00:00
Bill Currie
eb9943973b handle . in frame macro names 2007-04-06 08:19:58 +00:00
Bill Currie
8079c9951c catch nested /* in comments 2007-04-06 06:31:47 +00:00
Bill Currie
ff0144f870 bring in the cleanups from my start at preqcc stuff (I don't know if that will ever go in, though, I'm thinking maybe it should be external) 2007-04-06 05:52:20 +00:00
Bill Currie
72af804b31 nested include reporting 2007-03-31 15:27:36 +00:00
Bill Currie
90129fc4ec add $frame_reset grab command to reset the frame macro counter and sneak the command in before each file in the single-cpp script. This fixes the bogus animations in nq (and anything else, for that matter) 2007-03-31 13:54:09 +00:00
Bill Currie
03e1d6c3bf re-implement the comment lexer using states to re-learn how things work prior to implementing preqcc support 2007-03-30 09:02:36 +00:00
Bill Currie
3fb03fc2be hah, should have been using __attribute__((used)) all that time (rather
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie
dff55040bc noticed a potential unused warning issue if that version of flex gets hit
again
2005-03-31 09:55:41 +00:00
Bill Currie
66257e3a88 run in fear, function overloading is here
This is an imperfect revision of history.
2004-11-13 11:50:00 +00:00
Bill Currie
9b81bc5ea6 allow access to the parameter type via @param and variable initializers for local arrays/structs.
This is an imperfect revision of history.
2004-11-13 04:02:00 +00:00
Bill Currie
64cc8c60d2 compile time protocol support seems to be complete now. fortunatly, protocols had never been written out so the corrections to the protocol related stuctures do not need a progs version bump. runtime protocol support hasn't been fully tested yet.
+load runtime support seems to be working.

This is an imperfect revision of history.
2004-11-11 00:34:00 +00:00
Bill Currie
fff41d664a detect re-declaring identifiers as different types (typedef, enum, var, etc)
This is an imperfect revision of history.
2004-11-02 07:02:00 +00:00
Bill Currie
3483b3b2b6 handle #pragma gracefully (ie, ignore it) 2004-05-09 02:12:49 +00:00
Bill Currie
fc2413ff72 more quaternion work (should be working, haven't come up with tests yet) 2004-04-08 03:32:14 +00:00
Bill Currie
6e4c6478a1 getting closer to optional ; at the end of functions. also gets rid of the
need for the context-sensitivity hack used for distinquishing frunction
inits from struct/array inits
2004-02-10 03:25:24 +00:00
Bill Currie
e63b205fd2 don't seg when in traditional mode and @ is seen 2004-01-21 21:43:31 +00:00
Bill Currie
6ecb707257 revamp the struct system so "struct foo;" does the right thing (ala C) 2003-07-30 04:11:45 +00:00
Jeff Teunissen
c9858f4f65 Preliminary "unsigned" support for qfcc and the gamecode engine. Should still
be compatible.
2003-07-26 21:07:51 +00:00
Bill Currie
dedb2fa6bf get [super ...] working correctly 2003-05-15 05:58:31 +00:00
Bill Currie
9a40bf2956 get the fix right 2003-04-17 00:25:55 +00:00
Bill Currie
5cb8429f04 bah, cleanup for flex versions :P 2003-04-17 00:14:13 +00:00
Bill Currie
eb099ae0d3 make qf gcc 3.3 clean 2003-04-17 00:01:48 +00:00
Bill Currie
7ca2aae6f0 fixes for latest flex 2003-04-16 19:41:52 +00:00
Bill Currie
4de6a20856 fix a bug with \\ handling just before the end of a string constant 2003-03-04 17:03:49 +00:00