Commit Graph

66 Commits

Author SHA1 Message Date
Bill Currie c248372e20 Initial integer type support. qfcc /is/ partially broken when it comes to
integer constants and float function args/return values.

pr_comp.h:
	o  add the integer opcodes to pr_opcode_e
pr_edict.c:
	o  add "quaternion" and "integer" to type_name[]
	o  support quatnernion and integers types when printing values
	o  support the integer opcodes when bounds checking
pr_exec.c
	o  enable the integer opcodes
pr_opcode:
	o  add the integer opcodes to the opcode table
	o  logical operators all result in an integer rather than a value
expr.h:
	o  rename int_val to integer_val
qfcc.h:
	o  kill another magic number
expr.c:
	o  move the opcode to string conversion out of type_mismatch and into
	   get_op_string
	o  rename int_val to integer_val
	o  general integer type support.
	o  generate an internal comipiler error for null opcodes rather than
	   segging.
pr_imm.c:
	o  rename int_val to integer_val
	o  support integer constants, converting to float when needed.
pr_lex.c:
	o  magic number death and support quaternions and integers in type_size[]
qc-lex.l
	o  rename int_val to integer_val
	o  support quaternion and integer type keywords
qc-parse.y:
	o  rename int_val to integer_val
	o  use binary_expr instead of new_binary_expr for local initialized
	   variables
builtins.c:
	o  rename int_val to integer_val
	o  fix most (all?) of the INT related FIXMEs
defs.qc:
	o  use integer instead of float where it makes sense
main.c:
	o  read_result is now integer rather than float
main.qc:
	o  float -> integer where appropriate
	o  new test for int const to float arg
2001-07-23 01:31:22 +00:00
Bill Currie 6dfee9968b /much/ better error handling 2001-06-28 21:26:40 +00:00
Bill Currie 774a1fe6cd fix // comments at end of file (ie, no trailing \n) 2001-06-27 20:47:41 +00:00
Bill Currie 1fd4590212 report file as well 2001-06-27 18:15:24 +00:00
Bill Currie c1753046a9 start on actually generating code. doesn't work yet (getting a weird type
redeclaration error and not all expressions are handled yet).
2001-06-26 07:21:20 +00:00
Bill Currie 625915288c hopefully make line directives work 2001-06-25 23:38:32 +00:00
Bill Currie 90b5c57266 fix lost initial char of string constants
make expression strings char * instead of string_t (don't put them into
pr_strings prematurely);
2001-06-25 22:53:15 +00:00
Bill Currie 53b66ef2e0 better label handling and strings are now completely parsed (including escapes) 2001-06-25 22:11:20 +00:00
Bill Currie ab051248e8 expr.h:
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.
2001-06-25 17:15:56 +00:00
Bill Currie 89fecd7cee slowly getting there with defs processing. still borked 2001-06-18 22:51:49 +00:00
Bill Currie eeaab95be5 beginnings of expression and def handling. 2001-06-15 19:38:43 +00:00
Bill Currie d7ebba6a74 parses CustomTF now, but no code generation 2001-06-13 18:35:41 +00:00
Bill Currie c89da89b69 almost parses CustomTF ($macro junk next) 2001-06-13 07:16:39 +00:00
Bill Currie 2c26de2c2b oops 2001-06-12 22:26:52 +00:00
Bill Currie 72b93d0062 more stuff 2001-06-12 22:26:10 +00:00
Bill Currie 489ddbc7a7 getting closer. soon timie to start putting real code in there 2001-06-12 21:06:28 +00:00