1 /* |
1 /* |
2 * matiec - a compiler for the programming languages defined in IEC 61131-3 |
2 * matiec - a compiler for the programming languages defined in IEC 61131-3 |
3 * |
3 * |
4 * Copyright (C) 2003-2011 Mario de Sousa (msousa@fe.up.pt) |
4 * Copyright (C) 2003-2012 Mario de Sousa (msousa@fe.up.pt) |
5 * Copyright (C) 2012 Manuele Conti (conti.ma@alice.it) |
5 * Copyright (C) 2012 Manuele Conti (conti.ma@alice.it) |
6 * |
6 * |
7 * This program is free software: you can redistribute it and/or modify |
7 * This program is free software: you can redistribute it and/or modify |
8 * it under the terms of the GNU General Public License as published by |
8 * it under the terms of the GNU General Public License as published by |
9 * the Free Software Foundation, either version 3 of the License, or |
9 * the Free Software Foundation, either version 3 of the License, or |
37 |
37 |
38 class declaration_check_c : public iterator_visitor_c { |
38 class declaration_check_c : public iterator_visitor_c { |
39 int error_count; |
39 int error_count; |
40 int current_display_error_level; |
40 int current_display_error_level; |
41 search_base_type_c search_base_type; |
41 search_base_type_c search_base_type; |
42 list_c *global_var_decls; |
42 symbol_c *current_pou_decl; |
43 |
43 |
44 public: |
44 public: |
45 declaration_check_c(symbol_c *ignore); |
45 declaration_check_c(symbol_c *ignore); |
46 virtual ~declaration_check_c(void); |
46 virtual ~declaration_check_c(void); |
47 int get_error_count(); |
47 int get_error_count(); |
48 |
48 |
49 void check_global_decl(symbol_c *p_decl); |
49 void check_global_decl(symbol_c *p_decl); |
50 /******************************************/ |
50 /******************************************/ |
51 /* B 1.4.3 - Declaration & Initialisation */ |
51 /* B 1.5.3 - Declaration & Initialisation */ |
52 /******************************************/ |
52 /******************************************/ |
53 void *visit(global_var_declarations_c *symbol); |
53 void *visit(program_declaration_c *symbol); |
54 /********************************/ |
54 /********************************/ |
55 /* B 1.7 Configuration elements */ |
55 /* B 1.7 Configuration elements */ |
56 /********************************/ |
56 /********************************/ |
57 void *visit(program_configuration_c *symbol); |
57 void *visit(program_configuration_c *symbol); |
58 }; |
58 }; |