author | mjsousa |
Sat, 05 Jul 2014 13:57:39 +0100 | |
changeset 901 | 6a3964be6a29 |
parent 895 | f824bf8e1579 |
child 909 | 8b2a31dea131 |
permissions | -rwxr-xr-x |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
1 |
/* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
2 |
* matiec - a compiler for the programming languages defined in IEC 61131-3 |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
3 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
4 |
* Copyright (C) 2009-2012 Mario de Sousa (msousa@fe.up.pt) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
5 |
* Copyright (C) 2012 Manuele Conti (manuele.conti@sirius-es.it) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
6 |
* Copyright (C) 2012 Matteo Facchinetti (matteo.facchinetti@sirius-es.it) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
7 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
8 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
9 |
* This program is free software: you can redistribute it and/or modify |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
10 |
* it under the terms of the GNU General Public License as published by |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
11 |
* the Free Software Foundation, either version 3 of the License, or |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
12 |
* (at your option) any later version. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
13 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
14 |
* This program is distributed in the hope that it will be useful, |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
15 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
16 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
17 |
* GNU General Public License for more details. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
18 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
19 |
* You should have received a copy of the GNU General Public License |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
20 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
21 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
22 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
23 |
* This code is made available on the understanding that it will not be |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
24 |
* used in safety-critical situations without a full and competent review. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
25 |
*/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
26 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
27 |
/* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
28 |
* An IEC 61131-3 compiler. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
29 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
30 |
* Based on the |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
31 |
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
32 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
33 |
*/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
34 |
|
552 | 35 |
/* NOTE: The algorithm implemented here assumes that flow control analysis has already been completed! |
36 |
* BEFORE running this visitor, be sure to CALL the flow_control_analysis_c visitor! |
|
37 |
*/ |
|
38 |
||
39 |
||
40 |
/* |
|
41 |
* Fill the candidate datatype list for all symbols that may legally 'have' a data type (e.g. variables, literals, function calls, expressions, etc.) |
|
42 |
* |
|
43 |
* The candidate datatype list will be filled with a list of all the data types that expression may legally take. |
|
44 |
* For example, the very simple literal '0' (as in foo := 0), may represent a: |
|
45 |
* BOOL, BYTE, WORD, DWORD, LWORD, USINT, SINT, UINT, INT, UDINT, DINT, ULINT, LINT (as well as the SAFE versions of these data tyes too!) |
|
719
19595fce59f0
Move the enumerated_value_symtable to fill_candidate_datatypes_c, since it is only used there!
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
46 |
* |
19595fce59f0
Move the enumerated_value_symtable to fill_candidate_datatypes_c, since it is only used there!
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
47 |
* WARNING: This visitor class starts off by building a map of all enumeration constants that are defined in the source code (i.e. a library_c symbol), |
19595fce59f0
Move the enumerated_value_symtable to fill_candidate_datatypes_c, since it is only used there!
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
48 |
* and this map is later used to determine the datatpe of each use of an enumeration constant. By implication, the fill_candidate_datatypes_c |
19595fce59f0
Move the enumerated_value_symtable to fill_candidate_datatypes_c, since it is only used there!
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
49 |
* visitor class will only work corretly if it is asked to visit a symbol of class library_c!! |
552 | 50 |
*/ |
51 |
||
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
52 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
53 |
#include "../absyntax_utils/absyntax_utils.hh" |
438
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
421
diff
changeset
|
54 |
#include "datatype_functions.hh" |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
55 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
56 |
class fill_candidate_datatypes_c: public iterator_visitor_c { |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
57 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
58 |
private: |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
59 |
search_varfb_instance_type_c *search_varfb_instance_type; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
60 |
/* When calling a function block, we must first find it's type, |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
61 |
* by searching through the declarations of the variables currently |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
62 |
* in scope. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
63 |
* This class does just that... |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
64 |
* A new object instance is instantiated whenever we start checking semantics |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
65 |
* for a function block type declaration, or a program declaration. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
66 |
* This object instance will then later be called while the |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
67 |
* function block's or the program's body is being handled. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
68 |
* |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
69 |
* Note that functions cannot contain calls to function blocks, |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
70 |
* so we do not create an object instance when handling |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
71 |
* a function declaration. |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
72 |
*/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
73 |
// search_var_instance_decl_c *search_var_instance_decl; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
74 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
75 |
/* This variable was created to pass information from |
717
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
76 |
* fill_candidate_datatypes_c::visit(enumerated_spec_init_c *symbol) function to |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
77 |
* fill_candidate_datatypes_c::visit(enumerated_value_list_c *symbol) function. |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
78 |
*/ |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
79 |
symbol_c *current_enumerated_spec_type; |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
80 |
|
612 | 81 |
/* Pointer to the previous IL instruction, which contains the current data type (actually, the list of candidate data types) of the data stored in the IL stack, i.e. the default variable, a.k.a. accumulator */ |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
82 |
symbol_c *prev_il_instruction; |
612 | 83 |
/* the current IL operand being analyzed */ |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
84 |
symbol_c *il_operand; |
478
b13feab3b918
Change setting of deprecated_operation from fill to narrow_candidate_datatypes_c.
Mario de Sousa <msousa@fe.up.pt>
parents:
476
diff
changeset
|
85 |
symbol_c *widening_conversion(symbol_c *left_type, symbol_c *right_type, const struct widen_entry widen_table[]); |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
86 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
87 |
/* Match a function declaration with a function call through their parameters.*/ |
421
840cb1e1e177
Add support in stage 3 for checking function invocations in ST.
Mario de Sousa <msousa@fe.up.pt>
parents:
420
diff
changeset
|
88 |
/* returns true if compatible function/FB invocation, otherwise returns false */ |
479 | 89 |
bool match_nonformal_call(symbol_c *f_call, symbol_c *f_decl); |
90 |
bool match_formal_call (symbol_c *f_call, symbol_c *f_decl, symbol_c **first_param_datatype = NULL); |
|
91 |
void handle_function_call(symbol_c *fcall, generic_function_call_t fcall_data); |
|
834
783ef40344dd
Add support for FB call semantics of 'S' and 'R' IL operators!
mjsousa
parents:
813
diff
changeset
|
92 |
void *handle_implicit_il_fb_call(symbol_c *il_instruction, const char *param_name, symbol_c *&called_fb_declaration); |
783ef40344dd
Add support for FB call semantics of 'S' and 'R' IL operators!
mjsousa
parents:
813
diff
changeset
|
93 |
void *handle_S_and_R_operator (symbol_c *symbol, const char *operator_str, symbol_c *&called_fb_declaration); |
652
7fe1533d2260
Start adding support for data type checking of enums.
Mario de Sousa <msousa@fe.up.pt>
parents:
612
diff
changeset
|
94 |
void *handle_equality_comparison(const struct widen_entry widen_table[], symbol_c *symbol, symbol_c *l_expr, symbol_c *r_expr); |
7fe1533d2260
Start adding support for data type checking of enums.
Mario de Sousa <msousa@fe.up.pt>
parents:
612
diff
changeset
|
95 |
void *handle_binary_expression (const struct widen_entry widen_table[], symbol_c *symbol, symbol_c *l_expr, symbol_c *r_expr); |
7fe1533d2260
Start adding support for data type checking of enums.
Mario de Sousa <msousa@fe.up.pt>
parents:
612
diff
changeset
|
96 |
void *handle_binary_operator (const struct widen_entry widen_table[], symbol_c *symbol, symbol_c *l_expr, symbol_c *r_expr); |
487 | 97 |
void *handle_conditional_il_flow_control_operator(symbol_c *symbol); |
806
f218434eeaf8
Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents:
728
diff
changeset
|
98 |
void *fill_type_decl(symbol_c *symbol, symbol_c *type_name, symbol_c *spec_init); |
f218434eeaf8
Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents:
728
diff
changeset
|
99 |
void *fill_spec_init(symbol_c *symbol, symbol_c *type_spec, symbol_c *init_value); |
447
aad0f3e5df33
Start of support for semantic verification of FB calls in IL using special IL instructions.
Mario de Sousa <msousa@fe.up.pt>
parents:
443
diff
changeset
|
100 |
|
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
101 |
/* a helper function... */ |
447
aad0f3e5df33
Start of support for semantic verification of FB calls in IL using special IL instructions.
Mario de Sousa <msousa@fe.up.pt>
parents:
443
diff
changeset
|
102 |
symbol_c *base_type(symbol_c *symbol); |
438
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
421
diff
changeset
|
103 |
|
465
b52ec62773db
Do not allow duplicate values in candidate datatype list.
Mario de Sousa <msousa@fe.up.pt>
parents:
464
diff
changeset
|
104 |
/* add a data type to a candidate data type list, while guaranteeing no duplicate entries! */ |
b52ec62773db
Do not allow duplicate values in candidate datatype list.
Mario de Sousa <msousa@fe.up.pt>
parents:
464
diff
changeset
|
105 |
/* Returns true if it really did add the datatype to the list, or false if it was already present in the list! */ |
472
d26759a2274a
Clean up code, and add support for 'safe' version of literals.
Mario de Sousa <msousa@fe.up.pt>
parents:
465
diff
changeset
|
106 |
bool add_datatype_to_candidate_list (symbol_c *symbol, symbol_c *datatype); |
d26759a2274a
Clean up code, and add support for 'safe' version of literals.
Mario de Sousa <msousa@fe.up.pt>
parents:
465
diff
changeset
|
107 |
bool add_2datatypes_to_candidate_list(symbol_c *symbol, symbol_c *datatype1, symbol_c *datatype2); |
603
a45a62dd6df9
Add remove_from_candidate_datatype_list method using constant_folding results.
Manuele Conti <conti.ma@alice.it>
parents:
552
diff
changeset
|
108 |
void remove_incompatible_datatypes(symbol_c *symbol); |
465
b52ec62773db
Do not allow duplicate values in candidate datatype list.
Mario de Sousa <msousa@fe.up.pt>
parents:
464
diff
changeset
|
109 |
|
438
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
421
diff
changeset
|
110 |
|
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
421
diff
changeset
|
111 |
public: |
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
421
diff
changeset
|
112 |
fill_candidate_datatypes_c(symbol_c *ignore); |
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
421
diff
changeset
|
113 |
virtual ~fill_candidate_datatypes_c(void); |
744b125d911e
Add support for semantic verification of function calls in IL.
Mario de Sousa <msousa@fe.up.pt>
parents:
421
diff
changeset
|
114 |
|
719
19595fce59f0
Move the enumerated_value_symtable to fill_candidate_datatypes_c, since it is only used there!
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
115 |
|
19595fce59f0
Move the enumerated_value_symtable to fill_candidate_datatypes_c, since it is only used there!
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
116 |
/***************************/ |
19595fce59f0
Move the enumerated_value_symtable to fill_candidate_datatypes_c, since it is only used there!
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
117 |
/* B 0 - Programming Model */ |
19595fce59f0
Move the enumerated_value_symtable to fill_candidate_datatypes_c, since it is only used there!
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
118 |
/***************************/ |
19595fce59f0
Move the enumerated_value_symtable to fill_candidate_datatypes_c, since it is only used there!
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
119 |
void *visit(library_c *symbol); |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
120 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
121 |
/*********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
122 |
/* B 1.2 - Constants */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
123 |
/*********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
124 |
/******************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
125 |
/* B 1.2.1 - Numeric Literals */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
126 |
/******************************/ |
472
d26759a2274a
Clean up code, and add support for 'safe' version of literals.
Mario de Sousa <msousa@fe.up.pt>
parents:
465
diff
changeset
|
127 |
void *handle_any_integer(symbol_c *symbol); |
488 | 128 |
void *handle_any_real (symbol_c *symbol); |
129 |
void *handle_any_literal(symbol_c *symbol, symbol_c *symbol_value, symbol_c *symbol_type); |
|
472
d26759a2274a
Clean up code, and add support for 'safe' version of literals.
Mario de Sousa <msousa@fe.up.pt>
parents:
465
diff
changeset
|
130 |
|
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
131 |
void *visit(real_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
132 |
void *visit(integer_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
133 |
void *visit(neg_real_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
134 |
void *visit(neg_integer_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
135 |
void *visit(binary_integer_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
136 |
void *visit(octal_integer_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
137 |
void *visit(hex_integer_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
138 |
void *visit(integer_literal_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
139 |
void *visit(real_literal_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
140 |
void *visit(bit_string_literal_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
141 |
void *visit(boolean_literal_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
142 |
void *visit(boolean_true_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
143 |
void *visit(boolean_false_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
144 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
145 |
/*******************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
146 |
/* B.1.2.2 Character Strings */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
147 |
/*******************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
148 |
void *visit(double_byte_character_string_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
149 |
void *visit(single_byte_character_string_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
150 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
151 |
/***************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
152 |
/* B 1.2.3 - Time Literals */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
153 |
/***************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
154 |
/************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
155 |
/* B 1.2.3.1 - Duration */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
156 |
/************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
157 |
void *visit(duration_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
158 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
159 |
/************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
160 |
/* B 1.2.3.2 - Time of day and Date */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
161 |
/************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
162 |
void *visit(time_of_day_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
163 |
void *visit(date_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
164 |
void *visit(date_and_time_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
165 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
166 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
167 |
/**********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
168 |
/* B 1.3 - Data types */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
169 |
/**********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
170 |
/********************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
171 |
/* B 1.3.3 - Derived data types */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
172 |
/********************************/ |
717
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
173 |
// void *visit(data_type_declaration_c *symbol); /* Not required. already handled by iterator_visitor_c base class */ |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
174 |
// void *visit(type_declaration_list_c *symbol); /* Not required. already handled by iterator_visitor_c base class */ |
806
f218434eeaf8
Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents:
728
diff
changeset
|
175 |
void *visit(simple_type_declaration_c *symbol); /* Not required. already handled by iterator_visitor_c base class */ |
502
a6211f73690b
Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents:
489
diff
changeset
|
176 |
void *visit(simple_spec_init_c *symbol); |
806
f218434eeaf8
Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents:
728
diff
changeset
|
177 |
void *visit(subrange_type_declaration_c *symbol); |
f218434eeaf8
Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents:
728
diff
changeset
|
178 |
void *visit(subrange_spec_init_c *symbol); |
717
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
179 |
// void *visit(subrange_specification_c *symbol); |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
180 |
void *visit(subrange_c *symbol); |
728
3700fd83e5de
Fix datatype checking of enumerated datatype declarations. We now follow the fill->narrow algorithm correctly.
Mario de Sousa <msousa@fe.up.pt>
parents:
719
diff
changeset
|
181 |
void *visit(enumerated_type_declaration_c *symbol); |
717
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
182 |
void *visit(enumerated_spec_init_c *symbol); |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
183 |
void *visit(enumerated_value_list_c *symbol); |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
184 |
void *visit(enumerated_value_c *symbol); |
806
f218434eeaf8
Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents:
728
diff
changeset
|
185 |
void *visit(array_type_declaration_c *symbol); |
f218434eeaf8
Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents:
728
diff
changeset
|
186 |
void *visit(array_spec_init_c *symbol); |
717
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
187 |
// void *visit(array_specification_c *symbol); |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
188 |
// void *visit(array_subrange_list_c *symbol); |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
189 |
// void *visit(array_initial_elements_list_c *symbol); |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
190 |
// void *visit(array_initial_elements_c *symbol); |
806
f218434eeaf8
Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents:
728
diff
changeset
|
191 |
void *visit(structure_type_declaration_c *symbol); |
f218434eeaf8
Fill in the symbol.datatype annotation in symbol classes used in derived data type declarations.
Mario de Sousa <msousa@fe.up.pt>
parents:
728
diff
changeset
|
192 |
void *visit(initialized_structure_c *symbol); |
717
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
193 |
// void *visit(structure_element_declaration_list_c *symbol); |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
194 |
// void *visit(structure_element_declaration_c *symbol); |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
195 |
// void *visit(structure_element_initialization_list_c *symbol); |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
196 |
// void *visit(structure_element_initialization_c *symbol); |
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
197 |
// void *visit(string_type_declaration_c *symbol); |
810
d9c48ad646f1
Add a new node to the abstract symtax tree, which will let us do datatype checking of FB variable declarations using the standard algorithm, and no special cases.
Mario de Sousa <msousa@fe.up.pt>
parents:
808
diff
changeset
|
198 |
void *visit(fb_spec_init_c *symbol); |
717
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
199 |
|
44f74fad2cc0
Start datatype checking of variable declarations (for now, only seting symbol.datatype of enumerations)
Mario de Sousa <msousa@fe.up.pt>
parents:
652
diff
changeset
|
200 |
|
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
201 |
/*********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
202 |
/* B 1.4 - Variables */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
203 |
/*********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
204 |
void *visit(symbolic_variable_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
205 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
206 |
/********************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
207 |
/* B 1.4.1 - Directly Represented Variables */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
208 |
/********************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
209 |
void *visit(direct_variable_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
210 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
211 |
/*************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
212 |
/* B 1.4.2 - Multi-element variables */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
213 |
/*************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
214 |
void *visit(array_variable_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
215 |
void *visit(structured_variable_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
216 |
|
502
a6211f73690b
Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents:
489
diff
changeset
|
217 |
/******************************************/ |
a6211f73690b
Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents:
489
diff
changeset
|
218 |
/* B 1.4.3 - Declaration & Initialisation */ |
a6211f73690b
Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents:
489
diff
changeset
|
219 |
/******************************************/ |
a6211f73690b
Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents:
489
diff
changeset
|
220 |
void *visit(var1_list_c *symbol); |
a6211f73690b
Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents:
489
diff
changeset
|
221 |
void *visit(location_c *symbol); |
a6211f73690b
Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents:
489
diff
changeset
|
222 |
void *visit(located_var_decl_c *symbol); |
a6211f73690b
Start data type checking of var declarations (including direct variables!)
Mario de Sousa <msousa@fe.up.pt>
parents:
489
diff
changeset
|
223 |
|
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
224 |
/**************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
225 |
/* B 1.5 - Program organization units */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
226 |
/**************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
227 |
/***********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
228 |
/* B 1.5.1 - Functions */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
229 |
/***********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
230 |
void *visit(function_declaration_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
231 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
232 |
/*****************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
233 |
/* B 1.5.2 - Function blocks */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
234 |
/*****************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
235 |
void *visit(function_block_declaration_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
236 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
237 |
/**********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
238 |
/* B 1.5.3 - Programs */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
239 |
/**********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
240 |
void *visit(program_declaration_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
241 |
|
802
cac262d1d6a5
Fixed bug with SFC transition datatype checking
Laurent Bessard
parents:
728
diff
changeset
|
242 |
/********************************************/ |
cac262d1d6a5
Fixed bug with SFC transition datatype checking
Laurent Bessard
parents:
728
diff
changeset
|
243 |
/* B 1.6 Sequential function chart elements */ |
cac262d1d6a5
Fixed bug with SFC transition datatype checking
Laurent Bessard
parents:
728
diff
changeset
|
244 |
/********************************************/ |
cac262d1d6a5
Fixed bug with SFC transition datatype checking
Laurent Bessard
parents:
728
diff
changeset
|
245 |
void *visit(transition_condition_c *symbol); |
cac262d1d6a5
Fixed bug with SFC transition datatype checking
Laurent Bessard
parents:
728
diff
changeset
|
246 |
|
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
247 |
/********************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
248 |
/* B 1.7 Configuration elements */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
249 |
/********************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
250 |
void *visit(configuration_declaration_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
251 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
252 |
/****************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
253 |
/* B.2 - Language IL (Instruction List) */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
254 |
/****************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
255 |
/***********************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
256 |
/* B 2.1 Instructions and Operands */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
257 |
/***********************************/ |
464
319ee8b218f3
Handle JMP to labels preceding the JMP instruction itself.
Mario de Sousa <msousa@fe.up.pt>
parents:
455
diff
changeset
|
258 |
void *visit(instruction_list_c *symbol); |
443
ff4d26b7e51d
Narrow IL code backwords, so as to correctly handle invocations to overloaded functions from IL code.
Mario de Sousa <msousa@fe.up.pt>
parents:
438
diff
changeset
|
259 |
void *visit(il_instruction_c *symbol); |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
260 |
void *visit(il_simple_operation_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
261 |
void *visit(il_function_call_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
262 |
void *visit(il_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
263 |
void *visit(il_jump_operation_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
264 |
void *visit(il_fb_call_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
265 |
void *visit(il_formal_funct_call_c *symbol); |
452
79ac274d1cc4
Start of support for IL expressions (parenthesis).
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
266 |
// void *visit(il_operand_list_c *symbol); |
79ac274d1cc4
Start of support for IL expressions (parenthesis).
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
267 |
void *visit(simple_instr_list_c *symbol); |
453
4733f662362a
More changes for support of semantic verification of il_expressions
Mario de Sousa <msousa@fe.up.pt>
parents:
452
diff
changeset
|
268 |
void *visit(il_simple_instruction_c*symbol); |
452
79ac274d1cc4
Start of support for IL expressions (parenthesis).
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
269 |
// void *visit(il_param_list_c *symbol); |
79ac274d1cc4
Start of support for IL expressions (parenthesis).
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
270 |
// void *visit(il_param_assignment_c *symbol); |
79ac274d1cc4
Start of support for IL expressions (parenthesis).
Mario de Sousa <msousa@fe.up.pt>
parents:
447
diff
changeset
|
271 |
// void *visit(il_param_out_assignment_c *symbol); |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
272 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
273 |
/*******************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
274 |
/* B 2.2 Operators */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
275 |
/*******************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
276 |
void *visit(LD_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
277 |
void *visit(LDN_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
278 |
void *visit(ST_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
279 |
void *visit(STN_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
280 |
void *visit(NOT_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
281 |
void *visit(S_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
282 |
void *visit(R_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
283 |
void *visit(S1_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
284 |
void *visit(R1_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
285 |
void *visit(CLK_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
286 |
void *visit(CU_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
287 |
void *visit(CD_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
288 |
void *visit(PV_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
289 |
void *visit(IN_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
290 |
void *visit(PT_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
291 |
void *visit(AND_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
292 |
void *visit(OR_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
293 |
void *visit(XOR_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
294 |
void *visit(ANDN_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
295 |
void *visit(ORN_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
296 |
void *visit(XORN_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
297 |
void *visit(ADD_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
298 |
void *visit(SUB_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
299 |
void *visit(MUL_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
300 |
void *visit(DIV_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
301 |
void *visit(MOD_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
302 |
void *visit(GT_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
303 |
void *visit(GE_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
304 |
void *visit(EQ_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
305 |
void *visit(LT_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
306 |
void *visit(LE_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
307 |
void *visit(NE_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
308 |
void *visit(CAL_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
309 |
void *visit(CALC_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
310 |
void *visit(CALCN_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
311 |
void *visit(RET_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
312 |
void *visit(RETC_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
313 |
void *visit(RETCN_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
314 |
void *visit(JMP_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
315 |
void *visit(JMPC_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
316 |
void *visit(JMPCN_operator_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
317 |
/* Symbol class handled together with function call checks */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
318 |
// void *visit(il_assign_operator_c *symbol, variable_name); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
319 |
/* Symbol class handled together with function call checks */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
320 |
// void *visit(il_assign_operator_c *symbol, option, variable_name); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
321 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
322 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
323 |
/***************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
324 |
/* B.3 - Language ST (Structured Text) */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
325 |
/***************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
326 |
/***********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
327 |
/* B 3.1 - Expressions */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
328 |
/***********************/ |
873
dea39ef02847
Add limited support for the REF() operator (defined in v3 of IEC 61131-3)
mjsousa
parents:
834
diff
changeset
|
329 |
void *visit(ref_expression_c *symbol); |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
330 |
void *visit(or_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
331 |
void *visit(xor_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
332 |
void *visit(and_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
333 |
void *visit(equ_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
334 |
void *visit(notequ_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
335 |
void *visit(lt_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
336 |
void *visit(gt_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
337 |
void *visit(le_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
338 |
void *visit(ge_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
339 |
void *visit(add_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
340 |
void *visit(sub_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
341 |
void *visit(mul_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
342 |
void *visit(div_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
343 |
void *visit(mod_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
344 |
void *visit(power_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
345 |
void *visit(neg_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
346 |
void *visit(not_expression_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
347 |
void *visit(function_invocation_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
348 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
349 |
/*********************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
350 |
/* B 3.2.1 Assignment Statements */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
351 |
/*********************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
352 |
void *visit(assignment_statement_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
353 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
354 |
/*****************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
355 |
/* B 3.2.2 Subprogram Control Statements */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
356 |
/*****************************************/ |
418
2ac41d2cba91
Add fill candidate method for fb_invocation_c symbol.
Manuele Conti <conti.ma@alice.it>
parents:
417
diff
changeset
|
357 |
void *visit(fb_invocation_c *symbol); |
417
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
358 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
359 |
/********************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
360 |
/* B 3.2.3 Selection Statements */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
361 |
/********************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
362 |
void *visit(if_statement_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
363 |
// void *visit(elseif_statement_list_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
364 |
void *visit(elseif_statement_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
365 |
void *visit(case_statement_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
366 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
367 |
/********************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
368 |
/* B 3.2.4 Iteration Statements */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
369 |
/********************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
370 |
void *visit(for_statement_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
371 |
void *visit(while_statement_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
372 |
void *visit(repeat_statement_c *symbol); |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
373 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
374 |
}; // fill_candidate_datatypes_c |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
375 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
376 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
377 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
378 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
379 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
380 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
381 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
382 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
383 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
384 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
385 |