diff -r 64334c5a00b1 -r 38d6eb056260 stage4/generate_c/generate_c.cc --- a/stage4/generate_c/generate_c.cc Sat May 30 16:42:41 2009 +0200 +++ b/stage4/generate_c/generate_c.cc Mon Jun 01 21:08:44 2009 +0200 @@ -46,6 +46,7 @@ #include "../../util/symtable.hh" #include "../../util/dsymtable.hh" #include "../../absyntax/visitor.hh" +#include "../../absyntax_utils/absyntax_utils.hh" #include "../stage4.hh" @@ -55,7 +56,6 @@ - //#define DEBUG #ifdef DEBUG #define TRACE(classname) printf("\n____%s____\n",classname); @@ -72,57 +72,6 @@ - -#if 0 -/* A symbol table with all globally declared functions... */ -function_declaration_c null_symbol1(NULL,NULL,NULL,NULL); -dsymtable_c function_symtable; - -/* A symbol table with all globally declared functions block types... */ -function_block_declaration_c null_symbol2(NULL,NULL,NULL); -symtable_c function_block_type_symtable; - -/* A symbol table with all globally declared program types... */ -program_declaration_c null_symbol3(NULL,NULL,NULL); -symtable_c program_type_symtable; - -/* A symbol table with all user declared type definitions... */ -/* Note that function block types and program types have their - * own symbol tables, so do not get placed in this symbol table! - */ -symbol_c null_symbol4; -symtable_c type_symtable; -#else - -#include "../../search_utils/search_utils.hh" - -#endif - -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ - - -/* returns 0 if the names are equal!! */ -/* NOTE: it must ignore case!! */ -static int compare_identifiers(symbol_c *ident1, symbol_c *ident2) { - - token_c *name1 = dynamic_cast(ident1); - token_c *name2 = dynamic_cast(ident2); - - if ((name1 == NULL) || (name2 == NULL)) - /* invalid identifiers... */ - return -1; - - if (strcasecmp(name1->value, name2->value) == 0) - return 0; - - /* identifiers do not match! */ - return 1; -} - - /***********************************************************************/ /***********************************************************************/ /***********************************************************************/ @@ -178,21 +127,6 @@ /***********************************************************************/ /***********************************************************************/ - -#include "spec_init_separator.cc" -#include "function_param_iterator.cc" -#include "function_call_iterator.cc" -#include "function_call_param_iterator.cc" -#include "type_initial_value.cc" -#include "search_fb_instance_decl.cc" -#include "search_fb_typedecl.cc" -#include "search_base_type.cc" -#include "search_var_instance_decl.cc" -#include "decompose_var_instance_name.cc" -#include "search_varfb_instance_type.cc" -#include "search_constant_type.cc" -#include "search_expression_type.cc" - #include "generate_c_base.cc" #include "generate_c_typedecl.cc" #include "generate_c_sfcdecl.cc"