author | Mario de Sousa <msousa@fe.up.pt> |
Wed, 14 Nov 2012 14:03:57 +0000 | |
changeset 728 | 3700fd83e5de |
parent 718 | a9f8cc778444 |
child 936 | 0f7bcc160568 |
permissions | -rwxr-xr-x |
181 | 1 |
/* |
265
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
2 |
* matiec - a compiler for the programming languages defined in IEC 61131-3 |
181 | 3 |
* |
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:
372
diff
changeset
|
4 |
* Copyright (C) 2003-2012 Mario de Sousa (msousa@fe.up.pt) |
279
c0453b7f99df
Re-generated std lib related code, with updated headers, updated all forgotten headers
Edouard Tisserant
parents:
265
diff
changeset
|
5 |
* Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant |
181 | 6 |
* |
265
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
7 |
* This program is free software: you can redistribute it and/or modify |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
8 |
* it under the terms of the GNU General Public License as published by |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
9 |
* the Free Software Foundation, either version 3 of the License, or |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
10 |
* (at your option) any later version. |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
11 |
* |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
12 |
* This program is distributed in the hope that it will be useful, |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
15 |
* GNU General Public License for more details. |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
16 |
* |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
18 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
19 |
* |
181 | 20 |
* |
21 |
* This code is made available on the understanding that it will not be |
|
22 |
* used in safety-critical situations without a full and competent review. |
|
23 |
*/ |
|
24 |
||
25 |
/* |
|
265
4d222f46f8cc
Updating license info (with Edouard's permission for relevant files).
Mario de Sousa <msousa@fe.up.pt>
parents:
226
diff
changeset
|
26 |
* An IEC 61131-3 compiler. |
181 | 27 |
* |
28 |
* Based on the |
|
29 |
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) |
|
30 |
* |
|
31 |
*/ |
|
32 |
||
33 |
||
34 |
||
35 |
/* Determine the data type of a variable. |
|
36 |
* The variable may be a simple variable, a function block instance, a |
|
37 |
* struture element within a data structured type (a struct or a fb), or |
|
38 |
* an array element. |
|
39 |
* A mixture of array element of a structure element of a structure element |
|
40 |
* of a .... is also suported! |
|
41 |
* |
|
42 |
* example: |
|
43 |
* window.points[1].coordinate.x |
|
44 |
* window.points[1].colour |
|
45 |
* etc... ARE ALLOWED! |
|
46 |
* |
|
47 |
* This class must be passed the scope within which the |
|
48 |
* variable was declared, and the variable name... |
|
321
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
49 |
* |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
50 |
* |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
51 |
* |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
52 |
* |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
53 |
* |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
54 |
* This class has several members, depending on the exact data the caller |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
55 |
* is looking for... |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
56 |
* |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
57 |
* - item i: we can get either the name of the data type(A), |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
58 |
* or it's declaration (B) |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
59 |
* (notice however that some variables belong to a data type that does |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
60 |
* not have a name, only a declaration as in |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
61 |
* VAR a: ARRAY [1..3] of INT; END_VAR |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
62 |
* ) |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
63 |
* - item ii: we can get either the direct data type (1), |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
64 |
* or the base type (2) |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
65 |
* |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
66 |
* By direct type, I mean the data type of the variable. By base type, I |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
67 |
* mean the data type on which the direct type is based on. For example, in |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
68 |
* a subrange on INT, the direct type is the subrange itself, while the |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
69 |
* base type is INT. |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
70 |
* e.g. |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
71 |
* This means that if we find that the variable is of type MY_INT, |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
72 |
* which was previously declared to be |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
73 |
* TYPE MY_INT: INT := 9; |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
74 |
* option (1) will return MY_INT |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
75 |
* option (2) will return INT |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
76 |
* |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
77 |
* |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
78 |
* Member functions: |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
79 |
* ================ |
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:
372
diff
changeset
|
80 |
* get_basetype_id() ---> returns 2A (implemented, although currently it is not needed! ) |
321
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
81 |
* get_basetype_decl() ---> returns 2B |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
82 |
* get_type_id() ---> returns 1A |
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
83 |
* |
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:
372
diff
changeset
|
84 |
* Since we haven't yet needed it, we don't yet implement |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
85 |
* get_type_decl() ---> returns 1B |
321
a96399ab57c2
Add better comments, and change name of functions to clarify what they do.
Mario de Sousa <msousa@fe.up.pt>
parents:
279
diff
changeset
|
86 |
*/ |
181 | 87 |
|
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:
372
diff
changeset
|
88 |
class search_varfb_instance_type_c : null_visitor_c { |
181 | 89 |
|
90 |
private: |
|
91 |
search_var_instance_decl_c search_var_instance_decl; |
|
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:
372
diff
changeset
|
92 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
93 |
// symbol_c *current_type_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:
372
diff
changeset
|
94 |
symbol_c *current_type_id; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
95 |
symbol_c *current_basetype_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:
372
diff
changeset
|
96 |
symbol_c *current_basetype_id; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
97 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
98 |
symbol_c *current_field_selector; |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
99 |
|
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
100 |
/* sets all the above variables to NULL, or false */ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
101 |
void init(void); |
181 | 102 |
|
103 |
public: |
|
531
e7d6f28fc882
Make temporary fix to is_complex() method.
Mario de Sousa <msousa@fe.up.pt>
parents:
505
diff
changeset
|
104 |
search_varfb_instance_type_c(symbol_c *search_scope ); |
e7d6f28fc882
Make temporary fix to is_complex() method.
Mario de Sousa <msousa@fe.up.pt>
parents:
505
diff
changeset
|
105 |
symbol_c *get_basetype_decl (symbol_c *variable_name); |
e7d6f28fc882
Make temporary fix to is_complex() method.
Mario de Sousa <msousa@fe.up.pt>
parents:
505
diff
changeset
|
106 |
symbol_c *get_basetype_id (symbol_c *variable_name); |
e7d6f28fc882
Make temporary fix to is_complex() method.
Mario de Sousa <msousa@fe.up.pt>
parents:
505
diff
changeset
|
107 |
// symbol_c *get_type_decl (symbol_c *variable_name); |
e7d6f28fc882
Make temporary fix to is_complex() method.
Mario de Sousa <msousa@fe.up.pt>
parents:
505
diff
changeset
|
108 |
symbol_c *get_type_id (symbol_c *variable_name); |
181 | 109 |
|
531
e7d6f28fc882
Make temporary fix to is_complex() method.
Mario de Sousa <msousa@fe.up.pt>
parents:
505
diff
changeset
|
110 |
|
181 | 111 |
|
112 |
private: |
|
113 |
/* a helper function... */ |
|
114 |
void *visit_list(list_c *list); |
|
115 |
||
116 |
/* a helper function... */ |
|
117 |
void *base_type(symbol_c *symbol); |
|
118 |
||
119 |
||
120 |
private: |
|
420
866eb35e4e14
Fix search_varfb_instance_decl to be able to find variables and FB when only given an identifier.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
121 |
/*************************/ |
866eb35e4e14
Fix search_varfb_instance_decl to be able to find variables and FB when only given an identifier.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
122 |
/* B.1 - Common elements */ |
866eb35e4e14
Fix search_varfb_instance_decl to be able to find variables and FB when only given an identifier.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
123 |
/*************************/ |
866eb35e4e14
Fix search_varfb_instance_decl to be able to find variables and FB when only given an identifier.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
124 |
/*******************************************/ |
866eb35e4e14
Fix search_varfb_instance_decl to be able to find variables and FB when only given an identifier.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
125 |
/* B 1.1 - Letters, digits and identifiers */ |
866eb35e4e14
Fix search_varfb_instance_decl to be able to find variables and FB when only given an identifier.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
126 |
/*******************************************/ |
866eb35e4e14
Fix search_varfb_instance_decl to be able to find variables and FB when only given an identifier.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
127 |
void *visit(identifier_c *variable_name); |
866eb35e4e14
Fix search_varfb_instance_decl to be able to find variables and FB when only given an identifier.
Mario de Sousa <msousa@fe.up.pt>
parents:
417
diff
changeset
|
128 |
|
181 | 129 |
/********************************/ |
130 |
/* B 1.3.3 - Derived data types */ |
|
131 |
/********************************/ |
|
132 |
/* identifier ':' array_spec_init */ |
|
133 |
void *visit(array_type_declaration_c *symbol); |
|
134 |
||
135 |
/* array_specification [ASSIGN array_initialization} */ |
|
136 |
/* array_initialization may be NULL ! */ |
|
137 |
void *visit(array_spec_init_c *symbol); |
|
138 |
||
139 |
/* ARRAY '[' array_subrange_list ']' OF non_generic_type_name */ |
|
140 |
void *visit(array_specification_c *symbol); |
|
141 |
||
142 |
/* structure_type_name ':' structure_specification */ |
|
143 |
void *visit(structure_type_declaration_c *symbol); |
|
144 |
||
145 |
/* structure_type_name ASSIGN structure_initialization */ |
|
146 |
/* structure_initialization may be NULL ! */ |
|
147 |
// SYM_REF2(initialized_structure_c, structure_type_name, structure_initialization) |
|
148 |
void *visit(initialized_structure_c *symbol); |
|
149 |
||
150 |
/* helper symbol for structure_declaration */ |
|
151 |
/* structure_declaration: STRUCT structure_element_declaration_list END_STRUCT */ |
|
152 |
/* structure_element_declaration_list structure_element_declaration ';' */ |
|
153 |
void *visit(structure_element_declaration_list_c *symbol); |
|
154 |
||
155 |
/* structure_element_name ':' spec_init */ |
|
156 |
void *visit(structure_element_declaration_c *symbol); |
|
157 |
||
158 |
/* helper symbol for structure_initialization */ |
|
159 |
/* structure_initialization: '(' structure_element_initialization_list ')' */ |
|
160 |
/* structure_element_initialization_list ',' structure_element_initialization */ |
|
161 |
void *visit(structure_element_initialization_list_c *symbol); /* should never get called... */ |
|
162 |
/* structure_element_name ASSIGN value */ |
|
163 |
void *visit(structure_element_initialization_c *symbol); /* should never get called... */ |
|
164 |
||
165 |
||
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:
372
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:
372
diff
changeset
|
167 |
/* 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:
372
diff
changeset
|
168 |
/*********************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
169 |
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:
372
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:
372
diff
changeset
|
171 |
/********************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
172 |
/* 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:
372
diff
changeset
|
173 |
/********************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
174 |
/*************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
175 |
/* 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:
372
diff
changeset
|
176 |
/*************************************/ |
d48f53715f77
Re-write of stage3 code (done by Manuele and I), re-write of search_varfb_instance_type_c (done by myself), and several other bug fixes.
Mario de Sousa <msousa@fe.up.pt>
parents:
372
diff
changeset
|
177 |
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:
372
diff
changeset
|
178 |
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:
372
diff
changeset
|
179 |
|
181 | 180 |
/**************************************/ |
181 |
/* B.1.5 - Program organization units */ |
|
182 |
/**************************************/ |
|
183 |
/*****************************/ |
|
184 |
/* B 1.5.2 - Function Blocks */ |
|
185 |
/*****************************/ |
|
186 |
/* FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations function_block_body END_FUNCTION_BLOCK */ |
|
187 |
// SYM_REF4(function_block_declaration_c, fblock_name, var_declarations, fblock_body, unused) |
|
188 |
void *visit(function_block_declaration_c *symbol); |
|
189 |
||
619
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
190 |
|
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
191 |
/*********************************************/ |
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
192 |
/* B.1.6 Sequential function chart elements */ |
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
193 |
/*********************************************/ |
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
194 |
/* INITIAL_STEP step_name ':' action_association_list END_STEP */ |
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
195 |
// SYM_REF2(initial_step_c, step_name, action_association_list) |
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
196 |
void *visit(initial_step_c *symbol); |
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
197 |
/* STEP step_name ':' action_association_list END_STEP */ |
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
198 |
// SYM_REF2(step_c, step_name, action_association_list) |
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
199 |
void *visit(step_c *symbol); |
f8c9ac5c529a
Support for data types of STEP.T and STEP.X in SFCs
Mario de Sousa <msousa@fe.up.pt>
parents:
540
diff
changeset
|
200 |
|
181 | 201 |
}; // search_varfb_instance_type_c |
202 |
||
203 |
||
204 |
||
205 |
||
206 |
||
207 |