From: Peep P. <so...@us...> - 2004-06-07 15:54:15
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11108 Modified Files: lang.y Log Message: Wholly new compiler; still work-in-progress Index: lang.y =================================================================== RCS file: /cvsroot/agd/server/src/lang.y,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- lang.y 3 Apr 2004 20:19:08 -0000 1.16 +++ lang.y 7 Jun 2004 15:54:05 -0000 1.17 @@ -1,45 +1,68 @@ %{ -#include "std.h" -#include "lpc_incl.h" + +/* TODO: pop locals after returning from block */ +#include <stdlib.h> +#include "config.h" +#include "compile_options.h" + +#include "sys.h" +#include "list.h" [...2378 lines suppressed...] } +void do_inc_expr(expr_t *result, int type, int op) +{ + result->side_effect = 1; + result->direct_type = 0; + result->type = type; + check_operand(op, type, 0); + add_token(op); +} + +int add_string_to_table(char *s) { + int num; + char **tbl; + num = ++this_prog->num_str; + + tbl = this_prog->str_tbl = xrealloc(this_prog->str_tbl, num * sizeof(char *)); + tbl[num-1] = s; + return num - 1; +} |