mario@181: /* mario@181: * (c) 2009 Mario de Sousa mario@181: * mario@181: * Offered to the public under the terms of the GNU General Public License mario@181: * as published by the Free Software Foundation; either version 2 of the mario@181: * License, or (at your option) any later version. mario@181: * mario@181: * This program is distributed in the hope that it will be useful, but mario@181: * WITHOUT ANY WARRANTY; without even the implied warranty of mario@181: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General mario@181: * Public License for more details. mario@181: * mario@181: * This code is made available on the understanding that it will not be mario@181: * used in safety-critical situations without a full and competent review. mario@181: */ mario@181: mario@181: /* mario@181: * An IEC 61131-3 IL and ST compiler. mario@181: * mario@181: * Based on the mario@181: * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) mario@181: * mario@181: */ mario@181: mario@181: mario@181: /* mario@181: * This is the main stage 3a file. mario@181: * mario@181: * In stage 3a some helpful symbol tables are instanciated and populated. mario@181: * These symbol tables wll then be used by stage3b and atage4 code generators. mario@181: */ mario@181: mario@181: mario@181: mario@181: mario@181: #ifndef _SEARCH_UTILS_HH mario@181: #define _SEARCH_UTILS_HH mario@181: mario@181: // #include /* required for NULL */ mario@181: #include "../util/symtable.hh" mario@181: #include "../util/dsymtable.hh" mario@181: #include "../absyntax/absyntax.hh" mario@181: #include "../absyntax/visitor.hh" mario@181: mario@181: mario@181: mario@181: /* returns 0 if the names are equal!! Case is ignored. */ mario@181: int compare_identifiers(symbol_c *ident1, symbol_c *ident2); mario@181: mario@181: /* A symbol table with all globally declared functions... */ mario@181: extern function_declaration_c null_symbol1; mario@181: extern dsymtable_c function_symtable; mario@181: mario@181: /* A symbol table with all globally declared functions block types... */ mario@181: extern function_block_declaration_c null_symbol2; mario@181: extern symtable_c function_block_type_symtable; mario@181: mario@181: /* A symbol table with all globally declared program types... */ mario@181: extern program_declaration_c null_symbol3; mario@181: extern symtable_c program_type_symtable; mario@181: mario@181: /* A symbol table with all user declared type definitions... */ mario@181: /* Note that function block types and program types have their mario@181: * own symbol tables, so do not get placed in this symbol table! mario@181: */ mario@181: extern symbol_c null_symbol4; mario@181: extern symtable_c type_symtable; mario@181: mario@181: mario@181: mario@181: /***********************************************************************/ mario@181: /***********************************************************************/ mario@181: /***********************************************************************/ mario@181: /***********************************************************************/ mario@181: mario@181: #include "spec_init_separator.hh" mario@181: #include "function_param_iterator.hh" mario@181: #include "function_call_iterator.hh" mario@181: #include "function_call_param_iterator.hh" mario@181: #include "type_initial_value.hh" mario@181: #include "search_fb_instance_decl.hh" mario@181: #include "search_fb_typedecl.hh" mario@181: #include "search_base_type.hh" mario@181: #include "search_var_instance_decl.hh" mario@181: #include "decompose_var_instance_name.hh" mario@181: #include "search_varfb_instance_type.hh" mario@181: #include "search_constant_type.hh" ccb@202: #include "search_il_operand_type.hh" mario@181: #include "search_expression_type.hh" ccb@202: #include "add_en_eno_param_decl.hh" ccb@202: #include "get_sizeof_datatype.hh" mario@181: #include "get_function_type.h" mario@181: mario@181: mario@181: /***********************************************************************/ mario@181: /***********************************************************************/ mario@181: /***********************************************************************/ mario@181: /***********************************************************************/ mario@181: /***********************************************************************/ mario@181: mario@181: mario@181: mario@181: mario@181: void absyntax_utils_init(symbol_c *tree_root); mario@181: mario@181: mario@181: #endif /* _SEARCH_UTILS_HH */