nuke the ex_statement and estatement_[st] stuff
add label_expr prototype
expr.c:
ex_statement nukage
correct new_expr's decl
add label_expr to ease label creation
don't crash when printing a null expression (bare return)
qc-parse.y:
estatement_t nukage
statement statements and statement_block are type expr
generate `expressions' for statements
a full parse tree for each function is now generated. there are several
special expression opcodes for statements:
d done \
r return -> unary: expression to return or null
i if binary: evaluated expression, destination label
n ifnot binary: evaluated expression, destination label
c call binary: function def, args (expr list, rev order)
s state binary: frame const, function def
g goto unary: destination label
l label unary: label number
in a top level expression, l (label) defines the label, otherwise it is a
reference.
add prototype for print_expr
expr.c:
add print_expr
correct string accessors
currect the result type for unary operators
qc-lex.l:
correct string, vector and quaternion parsing
qc-parse.y:
precedence corrections and more function scope work
CustomTF gets through the parsing again.
rearrange def_t a little and add def_next (leaving next free for other
uses)
pr_def.c:
use def_next instead of next to link /all/ of the named defs
qfcc.c:
ditto
define PROG_ID_VERSION as 6 and redefine PROG_VERSION as 0x00fff001
(0.fff.001) for the new qc features.
pr_edict.c:
support version 6 and version 0.fff.001 progs
qfcc.h:
add version field to options_t
add min_version field to opcode_t
pr_opcode.c:
set the minumum version of each opcode (gee, that table is getting ugly)
filter out opcodes with too high a min_version when initializing the opcode
hash tables.
qfcc.c:
update help output.
accept --id to limit code generation to id compatable (ver 6) progs.
default progs generation to 0.fff.001
Detect assignments to initialized globals and give an error, unless the --cow
(copy on write) option is given, and then allocate a new global for the var,
clear its initialized flag.
Relocate all globals.
termporary variables sit in one pool of memory (at the end of the globals)
thus drasticly reducing globals requirements. This works because the whole
lot is declared to be in the function's local variable space which is copied
to the locals stack in the progs engine.