msousa@752: /* msousa@752: * matiec - a compiler for the programming languages defined in IEC 61131-3 msousa@752: * msousa@752: * Copyright (C) 2012 Mario de Sousa (msousa@fe.up.pt) msousa@752: * msousa@752: * This program is free software: you can redistribute it and/or modify msousa@752: * it under the terms of the GNU General Public License as published by msousa@752: * the Free Software Foundation, either version 3 of the License, or msousa@752: * (at your option) any later version. msousa@752: * msousa@752: * This program is distributed in the hope that it will be useful, msousa@752: * but WITHOUT ANY WARRANTY; without even the implied warranty of msousa@752: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the msousa@752: * GNU General Public License for more details. msousa@752: * msousa@752: * You should have received a copy of the GNU General Public License msousa@752: * along with this program. If not, see . msousa@752: * msousa@752: * msousa@752: * This code is made available on the understanding that it will not be msousa@752: * used in safety-critical situations without a full and competent review. msousa@752: */ msousa@752: msousa@752: /* msousa@752: * An IEC 61131-3 compiler. msousa@752: * msousa@752: * Based on the msousa@752: * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) msousa@752: * msousa@752: */ msousa@752: msousa@752: msousa@752: #include "../absyntax_utils/absyntax_utils.hh" msousa@752: msousa@752: class populate_enumvalue_symtable_c; msousa@752: msousa@752: class enum_declaration_check_c : public iterator_visitor_c { msousa@752: private: msousa@752: int error_count; msousa@752: int current_display_error_level; msousa@752: populate_enumvalue_symtable_c *populate_enumvalue_symtable; msousa@752: symbol_c::enumvalue_symtable_t *global_enumvalue_symtable; msousa@752: msousa@752: public: msousa@752: enum_declaration_check_c(symbol_c *ignore); msousa@752: ~enum_declaration_check_c(void); msousa@752: int get_error_count(); msousa@752: msousa@752: msousa@752: /***************************/ msousa@752: /* B 0 - Programming Model */ msousa@752: /***************************/ msousa@752: void *visit(library_c *symbol); msousa@752: msousa@752: /**********************/ msousa@752: /* B.1.3 - Data types */ msousa@752: /**********************/ msousa@752: void *visit(data_type_declaration_c *symbol); msousa@752: msousa@752: /***********************/ msousa@752: /* B 1.5.1 - Functions */ msousa@752: /***********************/ msousa@752: void *visit(function_declaration_c *symbol); msousa@752: msousa@752: /*****************************/ msousa@752: /* B 1.5.2 - Function Blocks */ msousa@752: /*****************************/ msousa@752: void *visit(function_block_declaration_c *symbol); msousa@752: msousa@752: /******************************************/ msousa@752: /* B 1.5.3 - Declaration & Initialisation */ msousa@752: /******************************************/ msousa@752: void *visit(program_declaration_c *symbol); msousa@752: msousa@752: /********************************/ msousa@752: /* B 1.7 Configuration elements */ msousa@752: /********************************/ msousa@752: void *visit(configuration_declaration_c *symbol); msousa@752: void *visit(resource_declaration_c *symbol); msousa@752: void *visit(single_resource_declaration_c *symbol); msousa@752: };