39 |
39 |
40 { |
40 { |
41 identifier_c param_name("IN"); |
41 identifier_c param_name("IN"); |
42 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
42 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
43 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
43 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
44 |
44 symbol_c *IN_type_symbol = NULL; |
45 /* Get the value from a foo(<param_value>) style call */ |
45 |
46 if (IN_param_value == NULL) |
46 /* Get the value from a foo(<param_value>) style call */ |
47 IN_param_value = function_call_param_iterator.next(); |
47 if (IN_param_value == NULL) |
48 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
48 IN_param_value = function_call_param_iterator.next(); |
49 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
49 if (IN_param_value != NULL) { |
50 |
50 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
51 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
51 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
52 { |
52 } |
53 |
53 |
|
54 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
55 { |
|
56 |
|
57 |
|
58 if (IN_type_symbol == NULL) |
|
59 IN_type_symbol = last_type_symbol; |
54 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
60 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
55 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
61 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
56 function_type_prefix = return_type_symbol; |
62 function_type_prefix = return_type_symbol; |
57 break; |
63 break; |
58 |
64 |
74 |
80 |
75 { |
81 { |
76 identifier_c param_name("IN"); |
82 identifier_c param_name("IN"); |
77 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
83 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
78 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
84 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
79 |
85 symbol_c *IN_type_symbol = NULL; |
80 /* Get the value from a foo(<param_value>) style call */ |
86 |
81 if (IN_param_value == NULL) |
87 /* Get the value from a foo(<param_value>) style call */ |
82 IN_param_value = function_call_param_iterator.next(); |
88 if (IN_param_value == NULL) |
83 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
89 IN_param_value = function_call_param_iterator.next(); |
84 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
90 if (IN_param_value != NULL) { |
85 |
91 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
86 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
92 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
87 { |
93 } |
88 |
94 |
|
95 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
96 { |
|
97 |
|
98 |
|
99 if (IN_type_symbol == NULL) |
|
100 IN_type_symbol = last_type_symbol; |
89 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
101 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
90 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
102 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
91 function_type_prefix = return_type_symbol; |
103 function_type_prefix = return_type_symbol; |
92 break; |
104 break; |
93 |
105 |
109 |
121 |
110 { |
122 { |
111 identifier_c param_name("IN"); |
123 identifier_c param_name("IN"); |
112 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
124 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
113 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
125 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
114 |
126 symbol_c *IN_type_symbol = NULL; |
115 /* Get the value from a foo(<param_value>) style call */ |
127 |
116 if (IN_param_value == NULL) |
128 /* Get the value from a foo(<param_value>) style call */ |
117 IN_param_value = function_call_param_iterator.next(); |
129 if (IN_param_value == NULL) |
118 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
130 IN_param_value = function_call_param_iterator.next(); |
119 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
131 if (IN_param_value != NULL) { |
120 |
132 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
121 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
133 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
122 { |
134 } |
123 |
135 |
|
136 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
137 { |
|
138 |
|
139 |
|
140 if (IN_type_symbol == NULL) |
|
141 IN_type_symbol = last_type_symbol; |
124 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
142 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
125 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
143 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
126 function_type_prefix = return_type_symbol; |
144 function_type_prefix = return_type_symbol; |
127 break; |
145 break; |
128 |
146 |
144 |
162 |
145 { |
163 { |
146 identifier_c param_name("IN"); |
164 identifier_c param_name("IN"); |
147 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
165 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
148 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
166 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
149 |
167 symbol_c *IN_type_symbol = NULL; |
150 /* Get the value from a foo(<param_value>) style call */ |
168 |
151 if (IN_param_value == NULL) |
169 /* Get the value from a foo(<param_value>) style call */ |
152 IN_param_value = function_call_param_iterator.next(); |
170 if (IN_param_value == NULL) |
153 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
171 IN_param_value = function_call_param_iterator.next(); |
154 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
172 if (IN_param_value != NULL) { |
155 |
173 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
156 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
174 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
175 } |
|
176 |
|
177 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
157 { |
178 { |
158 |
179 |
159 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
180 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
181 |
|
182 if (IN_type_symbol == NULL) |
|
183 IN_type_symbol = last_type_symbol; |
160 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
184 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
161 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
185 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
162 function_type_prefix = return_type_symbol; |
186 function_type_prefix = return_type_symbol; |
163 break; |
187 break; |
164 |
188 |
180 |
204 |
181 { |
205 { |
182 identifier_c param_name("IN"); |
206 identifier_c param_name("IN"); |
183 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
207 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
184 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
208 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
185 |
209 symbol_c *IN_type_symbol = NULL; |
186 /* Get the value from a foo(<param_value>) style call */ |
210 |
187 if (IN_param_value == NULL) |
211 /* Get the value from a foo(<param_value>) style call */ |
188 IN_param_value = function_call_param_iterator.next(); |
212 if (IN_param_value == NULL) |
189 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
213 IN_param_value = function_call_param_iterator.next(); |
190 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
214 if (IN_param_value != NULL) { |
191 |
215 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
192 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
216 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
193 { |
217 } |
194 |
218 |
|
219 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
220 { |
|
221 |
|
222 |
|
223 if (IN_type_symbol == NULL) |
|
224 IN_type_symbol = last_type_symbol; |
195 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
225 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
196 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
226 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
197 function_type_prefix = return_type_symbol; |
227 function_type_prefix = return_type_symbol; |
198 break; |
228 break; |
199 |
229 |
215 |
245 |
216 { |
246 { |
217 identifier_c param_name("IN"); |
247 identifier_c param_name("IN"); |
218 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
248 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
219 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
249 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
220 |
250 symbol_c *IN_type_symbol = NULL; |
221 /* Get the value from a foo(<param_value>) style call */ |
251 |
222 if (IN_param_value == NULL) |
252 /* Get the value from a foo(<param_value>) style call */ |
223 IN_param_value = function_call_param_iterator.next(); |
253 if (IN_param_value == NULL) |
224 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
254 IN_param_value = function_call_param_iterator.next(); |
225 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
255 if (IN_param_value != NULL) { |
226 |
256 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
227 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
257 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
258 } |
|
259 |
|
260 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
228 { |
261 { |
229 |
262 |
230 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
263 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
264 |
|
265 if (IN_type_symbol == NULL) |
|
266 IN_type_symbol = last_type_symbol; |
231 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
267 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
232 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
268 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
233 function_type_prefix = return_type_symbol; |
269 function_type_prefix = return_type_symbol; |
234 break; |
270 break; |
235 |
271 |
251 |
287 |
252 { |
288 { |
253 identifier_c param_name("IN"); |
289 identifier_c param_name("IN"); |
254 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
290 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
255 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
291 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
256 |
292 symbol_c *IN_type_symbol = NULL; |
257 /* Get the value from a foo(<param_value>) style call */ |
293 |
258 if (IN_param_value == NULL) |
294 /* Get the value from a foo(<param_value>) style call */ |
259 IN_param_value = function_call_param_iterator.next(); |
295 if (IN_param_value == NULL) |
260 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
296 IN_param_value = function_call_param_iterator.next(); |
261 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
297 if (IN_param_value != NULL) { |
262 |
298 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
263 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
299 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
300 } |
|
301 |
|
302 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
264 { |
303 { |
265 |
304 |
266 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
305 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
306 |
|
307 if (IN_type_symbol == NULL) |
|
308 IN_type_symbol = last_type_symbol; |
267 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
309 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
268 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
310 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
269 function_type_prefix = return_type_symbol; |
311 function_type_prefix = return_type_symbol; |
270 break; |
312 break; |
271 |
313 |
287 |
329 |
288 { |
330 { |
289 identifier_c param_name("IN"); |
331 identifier_c param_name("IN"); |
290 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
332 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
291 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
333 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
292 |
334 symbol_c *IN_type_symbol = NULL; |
293 /* Get the value from a foo(<param_value>) style call */ |
335 |
294 if (IN_param_value == NULL) |
336 /* Get the value from a foo(<param_value>) style call */ |
295 IN_param_value = function_call_param_iterator.next(); |
337 if (IN_param_value == NULL) |
296 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
338 IN_param_value = function_call_param_iterator.next(); |
297 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
339 if (IN_param_value != NULL) { |
298 |
340 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
299 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
341 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
300 { |
342 } |
301 |
343 |
|
344 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
345 { |
|
346 |
|
347 |
|
348 if (IN_type_symbol == NULL) |
|
349 IN_type_symbol = last_type_symbol; |
302 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
350 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
303 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
351 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
304 function_type_prefix = return_type_symbol; |
352 function_type_prefix = return_type_symbol; |
305 break; |
353 break; |
306 |
354 |
322 |
370 |
323 { |
371 { |
324 identifier_c param_name("IN"); |
372 identifier_c param_name("IN"); |
325 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
373 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
326 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
374 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
327 |
375 symbol_c *IN_type_symbol = NULL; |
328 /* Get the value from a foo(<param_value>) style call */ |
376 |
329 if (IN_param_value == NULL) |
377 /* Get the value from a foo(<param_value>) style call */ |
330 IN_param_value = function_call_param_iterator.next(); |
378 if (IN_param_value == NULL) |
331 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
379 IN_param_value = function_call_param_iterator.next(); |
332 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
380 if (IN_param_value != NULL) { |
333 |
381 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
334 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
382 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
335 { |
383 } |
336 |
384 |
|
385 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
386 { |
|
387 |
|
388 |
|
389 if (IN_type_symbol == NULL) |
|
390 IN_type_symbol = last_type_symbol; |
337 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
391 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
338 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
392 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
339 function_type_prefix = return_type_symbol; |
393 function_type_prefix = return_type_symbol; |
340 break; |
394 break; |
341 |
395 |
357 |
411 |
358 { |
412 { |
359 identifier_c param_name("IN"); |
413 identifier_c param_name("IN"); |
360 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
414 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
361 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
415 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
362 |
416 symbol_c *IN_type_symbol = NULL; |
363 /* Get the value from a foo(<param_value>) style call */ |
417 |
364 if (IN_param_value == NULL) |
418 /* Get the value from a foo(<param_value>) style call */ |
365 IN_param_value = function_call_param_iterator.next(); |
419 if (IN_param_value == NULL) |
366 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
420 IN_param_value = function_call_param_iterator.next(); |
367 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
421 if (IN_param_value != NULL) { |
368 |
422 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
369 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
423 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
424 } |
|
425 |
|
426 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
370 { |
427 { |
371 |
428 |
372 function_name = (symbol_c*)(new pragma_c("__real_to_string")); |
429 function_name = (symbol_c*)(new pragma_c("__real_to_string")); |
|
430 |
|
431 if (IN_type_symbol == NULL) |
|
432 IN_type_symbol = last_type_symbol; |
373 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
433 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
374 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
434 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
375 function_type_prefix = return_type_symbol; |
435 function_type_prefix = return_type_symbol; |
376 break; |
436 break; |
377 |
437 |
393 |
453 |
394 { |
454 { |
395 identifier_c param_name("IN"); |
455 identifier_c param_name("IN"); |
396 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
456 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
397 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
457 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
398 |
458 symbol_c *IN_type_symbol = NULL; |
399 /* Get the value from a foo(<param_value>) style call */ |
459 |
400 if (IN_param_value == NULL) |
460 /* Get the value from a foo(<param_value>) style call */ |
401 IN_param_value = function_call_param_iterator.next(); |
461 if (IN_param_value == NULL) |
402 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
462 IN_param_value = function_call_param_iterator.next(); |
403 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
463 if (IN_param_value != NULL) { |
404 |
464 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
405 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
465 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
406 { |
466 } |
407 |
467 |
|
468 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
469 { |
|
470 |
|
471 |
|
472 if (IN_type_symbol == NULL) |
|
473 IN_type_symbol = last_type_symbol; |
408 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
474 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
409 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
475 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
410 function_type_prefix = return_type_symbol; |
476 function_type_prefix = return_type_symbol; |
411 break; |
477 break; |
412 |
478 |
428 |
494 |
429 { |
495 { |
430 identifier_c param_name("IN"); |
496 identifier_c param_name("IN"); |
431 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
497 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
432 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
498 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
433 |
499 symbol_c *IN_type_symbol = NULL; |
434 /* Get the value from a foo(<param_value>) style call */ |
500 |
435 if (IN_param_value == NULL) |
501 /* Get the value from a foo(<param_value>) style call */ |
436 IN_param_value = function_call_param_iterator.next(); |
502 if (IN_param_value == NULL) |
437 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
503 IN_param_value = function_call_param_iterator.next(); |
438 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
504 if (IN_param_value != NULL) { |
439 |
505 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
440 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
506 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
441 { |
507 } |
442 |
508 |
|
509 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
510 { |
|
511 |
|
512 |
|
513 if (IN_type_symbol == NULL) |
|
514 IN_type_symbol = last_type_symbol; |
443 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
515 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
444 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
516 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
445 function_type_prefix = return_type_symbol; |
517 function_type_prefix = return_type_symbol; |
446 break; |
518 break; |
447 |
519 |
463 |
535 |
464 { |
536 { |
465 identifier_c param_name("IN"); |
537 identifier_c param_name("IN"); |
466 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
538 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
467 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
539 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
468 |
540 symbol_c *IN_type_symbol = NULL; |
469 /* Get the value from a foo(<param_value>) style call */ |
541 |
470 if (IN_param_value == NULL) |
542 /* Get the value from a foo(<param_value>) style call */ |
471 IN_param_value = function_call_param_iterator.next(); |
543 if (IN_param_value == NULL) |
472 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
544 IN_param_value = function_call_param_iterator.next(); |
473 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
545 if (IN_param_value != NULL) { |
474 |
546 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
475 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
547 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
476 { |
548 } |
477 |
549 |
|
550 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
551 { |
|
552 |
|
553 |
|
554 if (IN_type_symbol == NULL) |
|
555 IN_type_symbol = last_type_symbol; |
478 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
556 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
479 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
557 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
480 function_type_prefix = return_type_symbol; |
558 function_type_prefix = return_type_symbol; |
481 break; |
559 break; |
482 |
560 |
498 |
576 |
499 { |
577 { |
500 identifier_c param_name("IN"); |
578 identifier_c param_name("IN"); |
501 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
579 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
502 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
580 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
503 |
581 symbol_c *IN_type_symbol = NULL; |
504 /* Get the value from a foo(<param_value>) style call */ |
582 |
505 if (IN_param_value == NULL) |
583 /* Get the value from a foo(<param_value>) style call */ |
506 IN_param_value = function_call_param_iterator.next(); |
584 if (IN_param_value == NULL) |
507 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
585 IN_param_value = function_call_param_iterator.next(); |
508 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
586 if (IN_param_value != NULL) { |
509 |
587 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
510 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
588 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
511 { |
589 } |
512 |
590 |
|
591 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
592 { |
|
593 |
|
594 |
|
595 if (IN_type_symbol == NULL) |
|
596 IN_type_symbol = last_type_symbol; |
513 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
597 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
514 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
598 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
515 function_type_prefix = return_type_symbol; |
599 function_type_prefix = return_type_symbol; |
516 break; |
600 break; |
517 |
601 |
533 |
617 |
534 { |
618 { |
535 identifier_c param_name("IN"); |
619 identifier_c param_name("IN"); |
536 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
620 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
537 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
621 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
538 |
622 symbol_c *IN_type_symbol = NULL; |
539 /* Get the value from a foo(<param_value>) style call */ |
623 |
540 if (IN_param_value == NULL) |
624 /* Get the value from a foo(<param_value>) style call */ |
541 IN_param_value = function_call_param_iterator.next(); |
625 if (IN_param_value == NULL) |
542 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
626 IN_param_value = function_call_param_iterator.next(); |
543 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
627 if (IN_param_value != NULL) { |
544 |
628 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
545 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
629 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
546 { |
630 } |
547 |
631 |
|
632 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
633 { |
|
634 |
|
635 |
|
636 if (IN_type_symbol == NULL) |
|
637 IN_type_symbol = last_type_symbol; |
548 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
638 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
549 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
639 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
550 function_type_prefix = return_type_symbol; |
640 function_type_prefix = return_type_symbol; |
551 break; |
641 break; |
552 |
642 |
568 |
658 |
569 { |
659 { |
570 identifier_c param_name("IN"); |
660 identifier_c param_name("IN"); |
571 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
661 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
572 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
662 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
573 |
663 symbol_c *IN_type_symbol = NULL; |
574 /* Get the value from a foo(<param_value>) style call */ |
664 |
575 if (IN_param_value == NULL) |
665 /* Get the value from a foo(<param_value>) style call */ |
576 IN_param_value = function_call_param_iterator.next(); |
666 if (IN_param_value == NULL) |
577 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
667 IN_param_value = function_call_param_iterator.next(); |
578 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
668 if (IN_param_value != NULL) { |
579 |
669 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
580 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
670 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
581 { |
671 } |
582 |
672 |
|
673 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
674 { |
|
675 |
|
676 |
|
677 if (IN_type_symbol == NULL) |
|
678 IN_type_symbol = last_type_symbol; |
583 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
679 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
584 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
680 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
585 function_type_prefix = return_type_symbol; |
681 function_type_prefix = return_type_symbol; |
586 break; |
682 break; |
587 |
683 |
603 |
699 |
604 { |
700 { |
605 identifier_c param_name("IN"); |
701 identifier_c param_name("IN"); |
606 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
702 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
607 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
703 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
608 |
704 symbol_c *IN_type_symbol = NULL; |
609 /* Get the value from a foo(<param_value>) style call */ |
705 |
610 if (IN_param_value == NULL) |
706 /* Get the value from a foo(<param_value>) style call */ |
611 IN_param_value = function_call_param_iterator.next(); |
707 if (IN_param_value == NULL) |
612 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
708 IN_param_value = function_call_param_iterator.next(); |
613 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
709 if (IN_param_value != NULL) { |
614 |
710 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
615 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
711 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
616 { |
712 } |
617 |
713 |
|
714 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
715 { |
|
716 |
|
717 |
|
718 if (IN_type_symbol == NULL) |
|
719 IN_type_symbol = last_type_symbol; |
618 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
720 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
619 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
721 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
620 function_type_prefix = return_type_symbol; |
722 function_type_prefix = return_type_symbol; |
621 break; |
723 break; |
622 |
724 |
638 |
740 |
639 { |
741 { |
640 identifier_c param_name("IN"); |
742 identifier_c param_name("IN"); |
641 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
743 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
642 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
744 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
643 |
745 symbol_c *IN_type_symbol = NULL; |
644 /* Get the value from a foo(<param_value>) style call */ |
746 |
645 if (IN_param_value == NULL) |
747 /* Get the value from a foo(<param_value>) style call */ |
646 IN_param_value = function_call_param_iterator.next(); |
748 if (IN_param_value == NULL) |
647 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
749 IN_param_value = function_call_param_iterator.next(); |
648 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
750 if (IN_param_value != NULL) { |
649 |
751 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
650 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
752 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
753 } |
|
754 |
|
755 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
651 { |
756 { |
652 |
757 |
653 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
758 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
759 |
|
760 if (IN_type_symbol == NULL) |
|
761 IN_type_symbol = last_type_symbol; |
654 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
762 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
655 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
763 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
656 function_type_prefix = return_type_symbol; |
764 function_type_prefix = return_type_symbol; |
657 break; |
765 break; |
658 |
766 |
674 |
782 |
675 { |
783 { |
676 identifier_c param_name("IN"); |
784 identifier_c param_name("IN"); |
677 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
785 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
678 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
786 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
679 |
787 symbol_c *IN_type_symbol = NULL; |
680 /* Get the value from a foo(<param_value>) style call */ |
788 |
681 if (IN_param_value == NULL) |
789 /* Get the value from a foo(<param_value>) style call */ |
682 IN_param_value = function_call_param_iterator.next(); |
790 if (IN_param_value == NULL) |
683 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
791 IN_param_value = function_call_param_iterator.next(); |
684 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
792 if (IN_param_value != NULL) { |
685 |
793 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
686 if(search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
794 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
687 { |
795 } |
688 |
796 |
|
797 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::real_type_name, last_type_symbol)) |
|
798 { |
|
799 |
|
800 |
|
801 if (IN_type_symbol == NULL) |
|
802 IN_type_symbol = last_type_symbol; |
689 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
803 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
690 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
804 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
691 function_type_prefix = return_type_symbol; |
805 function_type_prefix = return_type_symbol; |
692 break; |
806 break; |
693 |
807 |
709 |
823 |
710 { |
824 { |
711 identifier_c param_name("IN"); |
825 identifier_c param_name("IN"); |
712 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
826 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
713 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
827 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
714 |
828 symbol_c *IN_type_symbol = NULL; |
715 /* Get the value from a foo(<param_value>) style call */ |
829 |
716 if (IN_param_value == NULL) |
830 /* Get the value from a foo(<param_value>) style call */ |
717 IN_param_value = function_call_param_iterator.next(); |
831 if (IN_param_value == NULL) |
718 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
832 IN_param_value = function_call_param_iterator.next(); |
719 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
833 if (IN_param_value != NULL) { |
720 |
834 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
721 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
835 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
722 { |
836 } |
723 |
837 |
|
838 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
839 { |
|
840 |
|
841 |
|
842 if (IN_type_symbol == NULL) |
|
843 IN_type_symbol = last_type_symbol; |
724 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
844 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
725 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
845 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
726 function_type_prefix = return_type_symbol; |
846 function_type_prefix = return_type_symbol; |
727 break; |
847 break; |
728 |
848 |
744 |
864 |
745 { |
865 { |
746 identifier_c param_name("IN"); |
866 identifier_c param_name("IN"); |
747 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
867 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
748 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
868 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
749 |
869 symbol_c *IN_type_symbol = NULL; |
750 /* Get the value from a foo(<param_value>) style call */ |
870 |
751 if (IN_param_value == NULL) |
871 /* Get the value from a foo(<param_value>) style call */ |
752 IN_param_value = function_call_param_iterator.next(); |
872 if (IN_param_value == NULL) |
753 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
873 IN_param_value = function_call_param_iterator.next(); |
754 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
874 if (IN_param_value != NULL) { |
755 |
875 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
756 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
876 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
757 { |
877 } |
758 |
878 |
|
879 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
880 { |
|
881 |
|
882 |
|
883 if (IN_type_symbol == NULL) |
|
884 IN_type_symbol = last_type_symbol; |
759 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
885 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
760 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
886 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
761 function_type_prefix = return_type_symbol; |
887 function_type_prefix = return_type_symbol; |
762 break; |
888 break; |
763 |
889 |
779 |
905 |
780 { |
906 { |
781 identifier_c param_name("IN"); |
907 identifier_c param_name("IN"); |
782 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
908 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
783 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
909 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
784 |
910 symbol_c *IN_type_symbol = NULL; |
785 /* Get the value from a foo(<param_value>) style call */ |
911 |
786 if (IN_param_value == NULL) |
912 /* Get the value from a foo(<param_value>) style call */ |
787 IN_param_value = function_call_param_iterator.next(); |
913 if (IN_param_value == NULL) |
788 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
914 IN_param_value = function_call_param_iterator.next(); |
789 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
915 if (IN_param_value != NULL) { |
790 |
916 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
791 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
917 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
792 { |
918 } |
793 |
919 |
|
920 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
921 { |
|
922 |
|
923 |
|
924 if (IN_type_symbol == NULL) |
|
925 IN_type_symbol = last_type_symbol; |
794 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
926 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
795 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
927 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
796 function_type_prefix = return_type_symbol; |
928 function_type_prefix = return_type_symbol; |
797 break; |
929 break; |
798 |
930 |
814 |
946 |
815 { |
947 { |
816 identifier_c param_name("IN"); |
948 identifier_c param_name("IN"); |
817 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
949 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
818 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
950 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
819 |
951 symbol_c *IN_type_symbol = NULL; |
820 /* Get the value from a foo(<param_value>) style call */ |
952 |
821 if (IN_param_value == NULL) |
953 /* Get the value from a foo(<param_value>) style call */ |
822 IN_param_value = function_call_param_iterator.next(); |
954 if (IN_param_value == NULL) |
823 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
955 IN_param_value = function_call_param_iterator.next(); |
824 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
956 if (IN_param_value != NULL) { |
825 |
957 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
826 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
958 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
959 } |
|
960 |
|
961 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
827 { |
962 { |
828 |
963 |
829 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
964 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
965 |
|
966 if (IN_type_symbol == NULL) |
|
967 IN_type_symbol = last_type_symbol; |
830 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
968 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
831 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
969 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
832 function_type_prefix = return_type_symbol; |
970 function_type_prefix = return_type_symbol; |
833 break; |
971 break; |
834 |
972 |
850 |
988 |
851 { |
989 { |
852 identifier_c param_name("IN"); |
990 identifier_c param_name("IN"); |
853 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
991 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
854 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
992 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
855 |
993 symbol_c *IN_type_symbol = NULL; |
856 /* Get the value from a foo(<param_value>) style call */ |
994 |
857 if (IN_param_value == NULL) |
995 /* Get the value from a foo(<param_value>) style call */ |
858 IN_param_value = function_call_param_iterator.next(); |
996 if (IN_param_value == NULL) |
859 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
997 IN_param_value = function_call_param_iterator.next(); |
860 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
998 if (IN_param_value != NULL) { |
861 |
999 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
862 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1000 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
863 { |
1001 } |
864 |
1002 |
|
1003 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1004 { |
|
1005 |
|
1006 |
|
1007 if (IN_type_symbol == NULL) |
|
1008 IN_type_symbol = last_type_symbol; |
865 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1009 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
866 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
1010 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
867 function_type_prefix = return_type_symbol; |
1011 function_type_prefix = return_type_symbol; |
868 break; |
1012 break; |
869 |
1013 |
885 |
1029 |
886 { |
1030 { |
887 identifier_c param_name("IN"); |
1031 identifier_c param_name("IN"); |
888 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1032 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
889 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1033 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
890 |
1034 symbol_c *IN_type_symbol = NULL; |
891 /* Get the value from a foo(<param_value>) style call */ |
1035 |
892 if (IN_param_value == NULL) |
1036 /* Get the value from a foo(<param_value>) style call */ |
893 IN_param_value = function_call_param_iterator.next(); |
1037 if (IN_param_value == NULL) |
894 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1038 IN_param_value = function_call_param_iterator.next(); |
895 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1039 if (IN_param_value != NULL) { |
896 |
1040 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
897 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1041 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
1042 } |
|
1043 |
|
1044 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
898 { |
1045 { |
899 |
1046 |
900 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
1047 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1048 |
|
1049 if (IN_type_symbol == NULL) |
|
1050 IN_type_symbol = last_type_symbol; |
901 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1051 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
902 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
1052 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
903 function_type_prefix = return_type_symbol; |
1053 function_type_prefix = return_type_symbol; |
904 break; |
1054 break; |
905 |
1055 |
921 |
1071 |
922 { |
1072 { |
923 identifier_c param_name("IN"); |
1073 identifier_c param_name("IN"); |
924 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1074 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
925 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1075 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
926 |
1076 symbol_c *IN_type_symbol = NULL; |
927 /* Get the value from a foo(<param_value>) style call */ |
1077 |
928 if (IN_param_value == NULL) |
1078 /* Get the value from a foo(<param_value>) style call */ |
929 IN_param_value = function_call_param_iterator.next(); |
1079 if (IN_param_value == NULL) |
930 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1080 IN_param_value = function_call_param_iterator.next(); |
931 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1081 if (IN_param_value != NULL) { |
932 |
1082 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
933 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1083 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
1084 } |
|
1085 |
|
1086 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
934 { |
1087 { |
935 |
1088 |
936 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
1089 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1090 |
|
1091 if (IN_type_symbol == NULL) |
|
1092 IN_type_symbol = last_type_symbol; |
937 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1093 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
938 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
1094 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
939 function_type_prefix = return_type_symbol; |
1095 function_type_prefix = return_type_symbol; |
940 break; |
1096 break; |
941 |
1097 |
957 |
1113 |
958 { |
1114 { |
959 identifier_c param_name("IN"); |
1115 identifier_c param_name("IN"); |
960 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1116 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
961 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1117 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
962 |
1118 symbol_c *IN_type_symbol = NULL; |
963 /* Get the value from a foo(<param_value>) style call */ |
1119 |
964 if (IN_param_value == NULL) |
1120 /* Get the value from a foo(<param_value>) style call */ |
965 IN_param_value = function_call_param_iterator.next(); |
1121 if (IN_param_value == NULL) |
966 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1122 IN_param_value = function_call_param_iterator.next(); |
967 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1123 if (IN_param_value != NULL) { |
968 |
1124 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
969 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1125 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
970 { |
1126 } |
971 |
1127 |
|
1128 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1129 { |
|
1130 |
|
1131 |
|
1132 if (IN_type_symbol == NULL) |
|
1133 IN_type_symbol = last_type_symbol; |
972 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1134 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
973 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
1135 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
974 function_type_prefix = return_type_symbol; |
1136 function_type_prefix = return_type_symbol; |
975 break; |
1137 break; |
976 |
1138 |
992 |
1154 |
993 { |
1155 { |
994 identifier_c param_name("IN"); |
1156 identifier_c param_name("IN"); |
995 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1157 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
996 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1158 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
997 |
1159 symbol_c *IN_type_symbol = NULL; |
998 /* Get the value from a foo(<param_value>) style call */ |
1160 |
999 if (IN_param_value == NULL) |
1161 /* Get the value from a foo(<param_value>) style call */ |
1000 IN_param_value = function_call_param_iterator.next(); |
1162 if (IN_param_value == NULL) |
1001 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1163 IN_param_value = function_call_param_iterator.next(); |
1002 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1164 if (IN_param_value != NULL) { |
1003 |
1165 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1004 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1166 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1005 { |
1167 } |
1006 |
1168 |
|
1169 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1170 { |
|
1171 |
|
1172 |
|
1173 if (IN_type_symbol == NULL) |
|
1174 IN_type_symbol = last_type_symbol; |
1007 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1175 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1008 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
1176 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
1009 function_type_prefix = return_type_symbol; |
1177 function_type_prefix = return_type_symbol; |
1010 break; |
1178 break; |
1011 |
1179 |
1027 |
1195 |
1028 { |
1196 { |
1029 identifier_c param_name("IN"); |
1197 identifier_c param_name("IN"); |
1030 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1198 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1031 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1199 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1032 |
1200 symbol_c *IN_type_symbol = NULL; |
1033 /* Get the value from a foo(<param_value>) style call */ |
1201 |
1034 if (IN_param_value == NULL) |
1202 /* Get the value from a foo(<param_value>) style call */ |
1035 IN_param_value = function_call_param_iterator.next(); |
1203 if (IN_param_value == NULL) |
1036 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1204 IN_param_value = function_call_param_iterator.next(); |
1037 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1205 if (IN_param_value != NULL) { |
1038 |
1206 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1039 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1207 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
1208 } |
|
1209 |
|
1210 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1040 { |
1211 { |
1041 |
1212 |
1042 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
1213 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
1214 |
|
1215 if (IN_type_symbol == NULL) |
|
1216 IN_type_symbol = last_type_symbol; |
1043 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1217 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1044 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
1218 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
1045 function_type_prefix = return_type_symbol; |
1219 function_type_prefix = return_type_symbol; |
1046 break; |
1220 break; |
1047 |
1221 |
1063 |
1237 |
1064 { |
1238 { |
1065 identifier_c param_name("IN"); |
1239 identifier_c param_name("IN"); |
1066 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1240 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1067 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1241 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1068 |
1242 symbol_c *IN_type_symbol = NULL; |
1069 /* Get the value from a foo(<param_value>) style call */ |
1243 |
1070 if (IN_param_value == NULL) |
1244 /* Get the value from a foo(<param_value>) style call */ |
1071 IN_param_value = function_call_param_iterator.next(); |
1245 if (IN_param_value == NULL) |
1072 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1246 IN_param_value = function_call_param_iterator.next(); |
1073 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1247 if (IN_param_value != NULL) { |
1074 |
1248 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1075 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1249 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1076 { |
1250 } |
1077 |
1251 |
|
1252 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1253 { |
|
1254 |
|
1255 |
|
1256 if (IN_type_symbol == NULL) |
|
1257 IN_type_symbol = last_type_symbol; |
1078 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1258 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1079 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
1259 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
1080 function_type_prefix = return_type_symbol; |
1260 function_type_prefix = return_type_symbol; |
1081 break; |
1261 break; |
1082 |
1262 |
1098 |
1278 |
1099 { |
1279 { |
1100 identifier_c param_name("IN"); |
1280 identifier_c param_name("IN"); |
1101 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1281 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1102 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1282 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1103 |
1283 symbol_c *IN_type_symbol = NULL; |
1104 /* Get the value from a foo(<param_value>) style call */ |
1284 |
1105 if (IN_param_value == NULL) |
1285 /* Get the value from a foo(<param_value>) style call */ |
1106 IN_param_value = function_call_param_iterator.next(); |
1286 if (IN_param_value == NULL) |
1107 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1287 IN_param_value = function_call_param_iterator.next(); |
1108 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1288 if (IN_param_value != NULL) { |
1109 |
1289 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1110 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1290 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1111 { |
1291 } |
1112 |
1292 |
|
1293 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1294 { |
|
1295 |
|
1296 |
|
1297 if (IN_type_symbol == NULL) |
|
1298 IN_type_symbol = last_type_symbol; |
1113 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1299 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1114 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
1300 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
1115 function_type_prefix = return_type_symbol; |
1301 function_type_prefix = return_type_symbol; |
1116 break; |
1302 break; |
1117 |
1303 |
1133 |
1319 |
1134 { |
1320 { |
1135 identifier_c param_name("IN"); |
1321 identifier_c param_name("IN"); |
1136 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1322 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1137 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1323 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1138 |
1324 symbol_c *IN_type_symbol = NULL; |
1139 /* Get the value from a foo(<param_value>) style call */ |
1325 |
1140 if (IN_param_value == NULL) |
1326 /* Get the value from a foo(<param_value>) style call */ |
1141 IN_param_value = function_call_param_iterator.next(); |
1327 if (IN_param_value == NULL) |
1142 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1328 IN_param_value = function_call_param_iterator.next(); |
1143 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1329 if (IN_param_value != NULL) { |
1144 |
1330 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1145 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1331 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1146 { |
1332 } |
1147 |
1333 |
|
1334 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1335 { |
|
1336 |
|
1337 |
|
1338 if (IN_type_symbol == NULL) |
|
1339 IN_type_symbol = last_type_symbol; |
1148 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1340 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1149 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
1341 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
1150 function_type_prefix = return_type_symbol; |
1342 function_type_prefix = return_type_symbol; |
1151 break; |
1343 break; |
1152 |
1344 |
1168 |
1360 |
1169 { |
1361 { |
1170 identifier_c param_name("IN"); |
1362 identifier_c param_name("IN"); |
1171 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1363 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1172 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1364 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1173 |
1365 symbol_c *IN_type_symbol = NULL; |
1174 /* Get the value from a foo(<param_value>) style call */ |
1366 |
1175 if (IN_param_value == NULL) |
1367 /* Get the value from a foo(<param_value>) style call */ |
1176 IN_param_value = function_call_param_iterator.next(); |
1368 if (IN_param_value == NULL) |
1177 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1369 IN_param_value = function_call_param_iterator.next(); |
1178 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1370 if (IN_param_value != NULL) { |
1179 |
1371 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1180 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1372 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1181 { |
1373 } |
1182 |
1374 |
|
1375 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1376 { |
|
1377 |
|
1378 |
|
1379 if (IN_type_symbol == NULL) |
|
1380 IN_type_symbol = last_type_symbol; |
1183 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1381 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1184 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
1382 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
1185 function_type_prefix = return_type_symbol; |
1383 function_type_prefix = return_type_symbol; |
1186 break; |
1384 break; |
1187 |
1385 |
1203 |
1401 |
1204 { |
1402 { |
1205 identifier_c param_name("IN"); |
1403 identifier_c param_name("IN"); |
1206 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1404 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1207 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1405 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1208 |
1406 symbol_c *IN_type_symbol = NULL; |
1209 /* Get the value from a foo(<param_value>) style call */ |
1407 |
1210 if (IN_param_value == NULL) |
1408 /* Get the value from a foo(<param_value>) style call */ |
1211 IN_param_value = function_call_param_iterator.next(); |
1409 if (IN_param_value == NULL) |
1212 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1410 IN_param_value = function_call_param_iterator.next(); |
1213 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1411 if (IN_param_value != NULL) { |
1214 |
1412 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1215 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1413 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1216 { |
1414 } |
1217 |
1415 |
|
1416 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1417 { |
|
1418 |
|
1419 |
|
1420 if (IN_type_symbol == NULL) |
|
1421 IN_type_symbol = last_type_symbol; |
1218 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1422 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1219 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
1423 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
1220 function_type_prefix = return_type_symbol; |
1424 function_type_prefix = return_type_symbol; |
1221 break; |
1425 break; |
1222 |
1426 |
1238 |
1442 |
1239 { |
1443 { |
1240 identifier_c param_name("IN"); |
1444 identifier_c param_name("IN"); |
1241 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1445 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1242 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1446 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1243 |
1447 symbol_c *IN_type_symbol = NULL; |
1244 /* Get the value from a foo(<param_value>) style call */ |
1448 |
1245 if (IN_param_value == NULL) |
1449 /* Get the value from a foo(<param_value>) style call */ |
1246 IN_param_value = function_call_param_iterator.next(); |
1450 if (IN_param_value == NULL) |
1247 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1451 IN_param_value = function_call_param_iterator.next(); |
1248 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1452 if (IN_param_value != NULL) { |
1249 |
1453 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1250 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1454 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1251 { |
1455 } |
1252 |
1456 |
|
1457 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1458 { |
|
1459 |
|
1460 |
|
1461 if (IN_type_symbol == NULL) |
|
1462 IN_type_symbol = last_type_symbol; |
1253 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1463 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1254 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
1464 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
1255 function_type_prefix = return_type_symbol; |
1465 function_type_prefix = return_type_symbol; |
1256 break; |
1466 break; |
1257 |
1467 |
1273 |
1483 |
1274 { |
1484 { |
1275 identifier_c param_name("IN"); |
1485 identifier_c param_name("IN"); |
1276 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1486 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1277 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1487 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1278 |
1488 symbol_c *IN_type_symbol = NULL; |
1279 /* Get the value from a foo(<param_value>) style call */ |
1489 |
1280 if (IN_param_value == NULL) |
1490 /* Get the value from a foo(<param_value>) style call */ |
1281 IN_param_value = function_call_param_iterator.next(); |
1491 if (IN_param_value == NULL) |
1282 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1492 IN_param_value = function_call_param_iterator.next(); |
1283 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1493 if (IN_param_value != NULL) { |
1284 |
1494 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1285 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1495 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1286 { |
1496 } |
1287 |
1497 |
|
1498 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1499 { |
|
1500 |
|
1501 |
|
1502 if (IN_type_symbol == NULL) |
|
1503 IN_type_symbol = last_type_symbol; |
1288 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1504 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1289 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
1505 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
1290 function_type_prefix = return_type_symbol; |
1506 function_type_prefix = return_type_symbol; |
1291 break; |
1507 break; |
1292 |
1508 |
1308 |
1524 |
1309 { |
1525 { |
1310 identifier_c param_name("IN"); |
1526 identifier_c param_name("IN"); |
1311 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1527 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1312 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1528 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1313 |
1529 symbol_c *IN_type_symbol = NULL; |
1314 /* Get the value from a foo(<param_value>) style call */ |
1530 |
1315 if (IN_param_value == NULL) |
1531 /* Get the value from a foo(<param_value>) style call */ |
1316 IN_param_value = function_call_param_iterator.next(); |
1532 if (IN_param_value == NULL) |
1317 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1533 IN_param_value = function_call_param_iterator.next(); |
1318 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1534 if (IN_param_value != NULL) { |
1319 |
1535 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1320 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1536 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
1537 } |
|
1538 |
|
1539 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1321 { |
1540 { |
1322 |
1541 |
1323 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
1542 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1543 |
|
1544 if (IN_type_symbol == NULL) |
|
1545 IN_type_symbol = last_type_symbol; |
1324 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1546 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1325 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
1547 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
1326 function_type_prefix = return_type_symbol; |
1548 function_type_prefix = return_type_symbol; |
1327 break; |
1549 break; |
1328 |
1550 |
1344 |
1566 |
1345 { |
1567 { |
1346 identifier_c param_name("IN"); |
1568 identifier_c param_name("IN"); |
1347 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1569 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1348 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1570 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1349 |
1571 symbol_c *IN_type_symbol = NULL; |
1350 /* Get the value from a foo(<param_value>) style call */ |
1572 |
1351 if (IN_param_value == NULL) |
1573 /* Get the value from a foo(<param_value>) style call */ |
1352 IN_param_value = function_call_param_iterator.next(); |
1574 if (IN_param_value == NULL) |
1353 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1575 IN_param_value = function_call_param_iterator.next(); |
1354 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1576 if (IN_param_value != NULL) { |
1355 |
1577 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1356 if(search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
1578 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1357 { |
1579 } |
1358 |
1580 |
|
1581 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::sint_type_name, last_type_symbol)) |
|
1582 { |
|
1583 |
|
1584 |
|
1585 if (IN_type_symbol == NULL) |
|
1586 IN_type_symbol = last_type_symbol; |
1359 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1587 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1360 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
1588 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
1361 function_type_prefix = return_type_symbol; |
1589 function_type_prefix = return_type_symbol; |
1362 break; |
1590 break; |
1363 |
1591 |
1379 |
1607 |
1380 { |
1608 { |
1381 identifier_c param_name("IN"); |
1609 identifier_c param_name("IN"); |
1382 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1610 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1383 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1611 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1384 |
1612 symbol_c *IN_type_symbol = NULL; |
1385 /* Get the value from a foo(<param_value>) style call */ |
1613 |
1386 if (IN_param_value == NULL) |
1614 /* Get the value from a foo(<param_value>) style call */ |
1387 IN_param_value = function_call_param_iterator.next(); |
1615 if (IN_param_value == NULL) |
1388 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1616 IN_param_value = function_call_param_iterator.next(); |
1389 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1617 if (IN_param_value != NULL) { |
1390 |
1618 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1391 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1619 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1392 { |
1620 } |
1393 |
1621 |
|
1622 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1623 { |
|
1624 |
|
1625 |
|
1626 if (IN_type_symbol == NULL) |
|
1627 IN_type_symbol = last_type_symbol; |
1394 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1628 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1395 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
1629 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
1396 function_type_prefix = return_type_symbol; |
1630 function_type_prefix = return_type_symbol; |
1397 break; |
1631 break; |
1398 |
1632 |
1414 |
1648 |
1415 { |
1649 { |
1416 identifier_c param_name("IN"); |
1650 identifier_c param_name("IN"); |
1417 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1651 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1418 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1652 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1419 |
1653 symbol_c *IN_type_symbol = NULL; |
1420 /* Get the value from a foo(<param_value>) style call */ |
1654 |
1421 if (IN_param_value == NULL) |
1655 /* Get the value from a foo(<param_value>) style call */ |
1422 IN_param_value = function_call_param_iterator.next(); |
1656 if (IN_param_value == NULL) |
1423 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1657 IN_param_value = function_call_param_iterator.next(); |
1424 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1658 if (IN_param_value != NULL) { |
1425 |
1659 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1426 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1660 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1427 { |
1661 } |
1428 |
1662 |
|
1663 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1664 { |
|
1665 |
|
1666 |
|
1667 if (IN_type_symbol == NULL) |
|
1668 IN_type_symbol = last_type_symbol; |
1429 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1669 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1430 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
1670 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
1431 function_type_prefix = return_type_symbol; |
1671 function_type_prefix = return_type_symbol; |
1432 break; |
1672 break; |
1433 |
1673 |
1449 |
1689 |
1450 { |
1690 { |
1451 identifier_c param_name("IN"); |
1691 identifier_c param_name("IN"); |
1452 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1692 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1453 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1693 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1454 |
1694 symbol_c *IN_type_symbol = NULL; |
1455 /* Get the value from a foo(<param_value>) style call */ |
1695 |
1456 if (IN_param_value == NULL) |
1696 /* Get the value from a foo(<param_value>) style call */ |
1457 IN_param_value = function_call_param_iterator.next(); |
1697 if (IN_param_value == NULL) |
1458 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1698 IN_param_value = function_call_param_iterator.next(); |
1459 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1699 if (IN_param_value != NULL) { |
1460 |
1700 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1461 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1701 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1462 { |
1702 } |
1463 |
1703 |
|
1704 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1705 { |
|
1706 |
|
1707 |
|
1708 if (IN_type_symbol == NULL) |
|
1709 IN_type_symbol = last_type_symbol; |
1464 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1710 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1465 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
1711 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
1466 function_type_prefix = return_type_symbol; |
1712 function_type_prefix = return_type_symbol; |
1467 break; |
1713 break; |
1468 |
1714 |
1484 |
1730 |
1485 { |
1731 { |
1486 identifier_c param_name("IN"); |
1732 identifier_c param_name("IN"); |
1487 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1733 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1488 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1734 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1489 |
1735 symbol_c *IN_type_symbol = NULL; |
1490 /* Get the value from a foo(<param_value>) style call */ |
1736 |
1491 if (IN_param_value == NULL) |
1737 /* Get the value from a foo(<param_value>) style call */ |
1492 IN_param_value = function_call_param_iterator.next(); |
1738 if (IN_param_value == NULL) |
1493 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1739 IN_param_value = function_call_param_iterator.next(); |
1494 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1740 if (IN_param_value != NULL) { |
1495 |
1741 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1496 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1742 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
1743 } |
|
1744 |
|
1745 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1497 { |
1746 { |
1498 |
1747 |
1499 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
1748 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1749 |
|
1750 if (IN_type_symbol == NULL) |
|
1751 IN_type_symbol = last_type_symbol; |
1500 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1752 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1501 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
1753 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
1502 function_type_prefix = return_type_symbol; |
1754 function_type_prefix = return_type_symbol; |
1503 break; |
1755 break; |
1504 |
1756 |
1520 |
1772 |
1521 { |
1773 { |
1522 identifier_c param_name("IN"); |
1774 identifier_c param_name("IN"); |
1523 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1775 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1524 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1776 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1525 |
1777 symbol_c *IN_type_symbol = NULL; |
1526 /* Get the value from a foo(<param_value>) style call */ |
1778 |
1527 if (IN_param_value == NULL) |
1779 /* Get the value from a foo(<param_value>) style call */ |
1528 IN_param_value = function_call_param_iterator.next(); |
1780 if (IN_param_value == NULL) |
1529 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1781 IN_param_value = function_call_param_iterator.next(); |
1530 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1782 if (IN_param_value != NULL) { |
1531 |
1783 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1532 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1784 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1533 { |
1785 } |
1534 |
1786 |
|
1787 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1788 { |
|
1789 |
|
1790 |
|
1791 if (IN_type_symbol == NULL) |
|
1792 IN_type_symbol = last_type_symbol; |
1535 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1793 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1536 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
1794 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
1537 function_type_prefix = return_type_symbol; |
1795 function_type_prefix = return_type_symbol; |
1538 break; |
1796 break; |
1539 |
1797 |
1555 |
1813 |
1556 { |
1814 { |
1557 identifier_c param_name("IN"); |
1815 identifier_c param_name("IN"); |
1558 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1816 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1559 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1817 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1560 |
1818 symbol_c *IN_type_symbol = NULL; |
1561 /* Get the value from a foo(<param_value>) style call */ |
1819 |
1562 if (IN_param_value == NULL) |
1820 /* Get the value from a foo(<param_value>) style call */ |
1563 IN_param_value = function_call_param_iterator.next(); |
1821 if (IN_param_value == NULL) |
1564 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1822 IN_param_value = function_call_param_iterator.next(); |
1565 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1823 if (IN_param_value != NULL) { |
1566 |
1824 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1567 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1825 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
1826 } |
|
1827 |
|
1828 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1568 { |
1829 { |
1569 |
1830 |
1570 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
1831 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1832 |
|
1833 if (IN_type_symbol == NULL) |
|
1834 IN_type_symbol = last_type_symbol; |
1571 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1835 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1572 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
1836 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
1573 function_type_prefix = return_type_symbol; |
1837 function_type_prefix = return_type_symbol; |
1574 break; |
1838 break; |
1575 |
1839 |
1591 |
1855 |
1592 { |
1856 { |
1593 identifier_c param_name("IN"); |
1857 identifier_c param_name("IN"); |
1594 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1858 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1595 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1859 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1596 |
1860 symbol_c *IN_type_symbol = NULL; |
1597 /* Get the value from a foo(<param_value>) style call */ |
1861 |
1598 if (IN_param_value == NULL) |
1862 /* Get the value from a foo(<param_value>) style call */ |
1599 IN_param_value = function_call_param_iterator.next(); |
1863 if (IN_param_value == NULL) |
1600 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1864 IN_param_value = function_call_param_iterator.next(); |
1601 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1865 if (IN_param_value != NULL) { |
1602 |
1866 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1603 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1867 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
1868 } |
|
1869 |
|
1870 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1604 { |
1871 { |
1605 |
1872 |
1606 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
1873 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
1874 |
|
1875 if (IN_type_symbol == NULL) |
|
1876 IN_type_symbol = last_type_symbol; |
1607 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1877 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1608 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
1878 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
1609 function_type_prefix = return_type_symbol; |
1879 function_type_prefix = return_type_symbol; |
1610 break; |
1880 break; |
1611 |
1881 |
1627 |
1897 |
1628 { |
1898 { |
1629 identifier_c param_name("IN"); |
1899 identifier_c param_name("IN"); |
1630 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1900 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1631 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1901 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1632 |
1902 symbol_c *IN_type_symbol = NULL; |
1633 /* Get the value from a foo(<param_value>) style call */ |
1903 |
1634 if (IN_param_value == NULL) |
1904 /* Get the value from a foo(<param_value>) style call */ |
1635 IN_param_value = function_call_param_iterator.next(); |
1905 if (IN_param_value == NULL) |
1636 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1906 IN_param_value = function_call_param_iterator.next(); |
1637 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1907 if (IN_param_value != NULL) { |
1638 |
1908 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1639 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1909 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1640 { |
1910 } |
1641 |
1911 |
|
1912 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1913 { |
|
1914 |
|
1915 |
|
1916 if (IN_type_symbol == NULL) |
|
1917 IN_type_symbol = last_type_symbol; |
1642 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1918 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1643 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
1919 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
1644 function_type_prefix = return_type_symbol; |
1920 function_type_prefix = return_type_symbol; |
1645 break; |
1921 break; |
1646 |
1922 |
1662 |
1938 |
1663 { |
1939 { |
1664 identifier_c param_name("IN"); |
1940 identifier_c param_name("IN"); |
1665 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1941 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1666 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1942 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1667 |
1943 symbol_c *IN_type_symbol = NULL; |
1668 /* Get the value from a foo(<param_value>) style call */ |
1944 |
1669 if (IN_param_value == NULL) |
1945 /* Get the value from a foo(<param_value>) style call */ |
1670 IN_param_value = function_call_param_iterator.next(); |
1946 if (IN_param_value == NULL) |
1671 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1947 IN_param_value = function_call_param_iterator.next(); |
1672 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1948 if (IN_param_value != NULL) { |
1673 |
1949 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1674 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1950 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1675 { |
1951 } |
1676 |
1952 |
|
1953 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
1954 { |
|
1955 |
|
1956 |
|
1957 if (IN_type_symbol == NULL) |
|
1958 IN_type_symbol = last_type_symbol; |
1677 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1959 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1678 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
1960 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
1679 function_type_prefix = return_type_symbol; |
1961 function_type_prefix = return_type_symbol; |
1680 break; |
1962 break; |
1681 |
1963 |
1697 |
1979 |
1698 { |
1980 { |
1699 identifier_c param_name("IN"); |
1981 identifier_c param_name("IN"); |
1700 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1982 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1701 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1983 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1702 |
1984 symbol_c *IN_type_symbol = NULL; |
1703 /* Get the value from a foo(<param_value>) style call */ |
1985 |
1704 if (IN_param_value == NULL) |
1986 /* Get the value from a foo(<param_value>) style call */ |
1705 IN_param_value = function_call_param_iterator.next(); |
1987 if (IN_param_value == NULL) |
1706 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1988 IN_param_value = function_call_param_iterator.next(); |
1707 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1989 if (IN_param_value != NULL) { |
1708 |
1990 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1709 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1991 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
1992 } |
|
1993 |
|
1994 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1710 { |
1995 { |
1711 |
1996 |
1712 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
1997 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
1998 |
|
1999 if (IN_type_symbol == NULL) |
|
2000 IN_type_symbol = last_type_symbol; |
1713 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2001 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1714 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
2002 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
1715 function_type_prefix = return_type_symbol; |
2003 function_type_prefix = return_type_symbol; |
1716 break; |
2004 break; |
1717 |
2005 |
1733 |
2021 |
1734 { |
2022 { |
1735 identifier_c param_name("IN"); |
2023 identifier_c param_name("IN"); |
1736 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2024 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1737 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2025 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1738 |
2026 symbol_c *IN_type_symbol = NULL; |
1739 /* Get the value from a foo(<param_value>) style call */ |
2027 |
1740 if (IN_param_value == NULL) |
2028 /* Get the value from a foo(<param_value>) style call */ |
1741 IN_param_value = function_call_param_iterator.next(); |
2029 if (IN_param_value == NULL) |
1742 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2030 IN_param_value = function_call_param_iterator.next(); |
1743 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2031 if (IN_param_value != NULL) { |
1744 |
2032 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1745 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
2033 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1746 { |
2034 } |
1747 |
2035 |
|
2036 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2037 { |
|
2038 |
|
2039 |
|
2040 if (IN_type_symbol == NULL) |
|
2041 IN_type_symbol = last_type_symbol; |
1748 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2042 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1749 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
2043 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
1750 function_type_prefix = return_type_symbol; |
2044 function_type_prefix = return_type_symbol; |
1751 break; |
2045 break; |
1752 |
2046 |
1768 |
2062 |
1769 { |
2063 { |
1770 identifier_c param_name("IN"); |
2064 identifier_c param_name("IN"); |
1771 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2065 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1772 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2066 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1773 |
2067 symbol_c *IN_type_symbol = NULL; |
1774 /* Get the value from a foo(<param_value>) style call */ |
2068 |
1775 if (IN_param_value == NULL) |
2069 /* Get the value from a foo(<param_value>) style call */ |
1776 IN_param_value = function_call_param_iterator.next(); |
2070 if (IN_param_value == NULL) |
1777 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2071 IN_param_value = function_call_param_iterator.next(); |
1778 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2072 if (IN_param_value != NULL) { |
1779 |
2073 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1780 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
2074 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1781 { |
2075 } |
1782 |
2076 |
|
2077 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2078 { |
|
2079 |
|
2080 |
|
2081 if (IN_type_symbol == NULL) |
|
2082 IN_type_symbol = last_type_symbol; |
1783 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2083 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1784 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
2084 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
1785 function_type_prefix = return_type_symbol; |
2085 function_type_prefix = return_type_symbol; |
1786 break; |
2086 break; |
1787 |
2087 |
1803 |
2103 |
1804 { |
2104 { |
1805 identifier_c param_name("IN"); |
2105 identifier_c param_name("IN"); |
1806 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2106 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1807 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2107 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1808 |
2108 symbol_c *IN_type_symbol = NULL; |
1809 /* Get the value from a foo(<param_value>) style call */ |
2109 |
1810 if (IN_param_value == NULL) |
2110 /* Get the value from a foo(<param_value>) style call */ |
1811 IN_param_value = function_call_param_iterator.next(); |
2111 if (IN_param_value == NULL) |
1812 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2112 IN_param_value = function_call_param_iterator.next(); |
1813 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2113 if (IN_param_value != NULL) { |
1814 |
2114 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1815 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
2115 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1816 { |
2116 } |
1817 |
2117 |
|
2118 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2119 { |
|
2120 |
|
2121 |
|
2122 if (IN_type_symbol == NULL) |
|
2123 IN_type_symbol = last_type_symbol; |
1818 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2124 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1819 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
2125 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
1820 function_type_prefix = return_type_symbol; |
2126 function_type_prefix = return_type_symbol; |
1821 break; |
2127 break; |
1822 |
2128 |
1838 |
2144 |
1839 { |
2145 { |
1840 identifier_c param_name("IN"); |
2146 identifier_c param_name("IN"); |
1841 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2147 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1842 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2148 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1843 |
2149 symbol_c *IN_type_symbol = NULL; |
1844 /* Get the value from a foo(<param_value>) style call */ |
2150 |
1845 if (IN_param_value == NULL) |
2151 /* Get the value from a foo(<param_value>) style call */ |
1846 IN_param_value = function_call_param_iterator.next(); |
2152 if (IN_param_value == NULL) |
1847 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2153 IN_param_value = function_call_param_iterator.next(); |
1848 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2154 if (IN_param_value != NULL) { |
1849 |
2155 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1850 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
2156 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1851 { |
2157 } |
1852 |
2158 |
|
2159 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2160 { |
|
2161 |
|
2162 |
|
2163 if (IN_type_symbol == NULL) |
|
2164 IN_type_symbol = last_type_symbol; |
1853 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2165 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1854 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
2166 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
1855 function_type_prefix = return_type_symbol; |
2167 function_type_prefix = return_type_symbol; |
1856 break; |
2168 break; |
1857 |
2169 |
1873 |
2185 |
1874 { |
2186 { |
1875 identifier_c param_name("IN"); |
2187 identifier_c param_name("IN"); |
1876 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2188 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1877 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2189 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1878 |
2190 symbol_c *IN_type_symbol = NULL; |
1879 /* Get the value from a foo(<param_value>) style call */ |
2191 |
1880 if (IN_param_value == NULL) |
2192 /* Get the value from a foo(<param_value>) style call */ |
1881 IN_param_value = function_call_param_iterator.next(); |
2193 if (IN_param_value == NULL) |
1882 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2194 IN_param_value = function_call_param_iterator.next(); |
1883 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2195 if (IN_param_value != NULL) { |
1884 |
2196 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1885 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
2197 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1886 { |
2198 } |
1887 |
2199 |
|
2200 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2201 { |
|
2202 |
|
2203 |
|
2204 if (IN_type_symbol == NULL) |
|
2205 IN_type_symbol = last_type_symbol; |
1888 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2206 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1889 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
2207 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
1890 function_type_prefix = return_type_symbol; |
2208 function_type_prefix = return_type_symbol; |
1891 break; |
2209 break; |
1892 |
2210 |
1908 |
2226 |
1909 { |
2227 { |
1910 identifier_c param_name("IN"); |
2228 identifier_c param_name("IN"); |
1911 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2229 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1912 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2230 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1913 |
2231 symbol_c *IN_type_symbol = NULL; |
1914 /* Get the value from a foo(<param_value>) style call */ |
2232 |
1915 if (IN_param_value == NULL) |
2233 /* Get the value from a foo(<param_value>) style call */ |
1916 IN_param_value = function_call_param_iterator.next(); |
2234 if (IN_param_value == NULL) |
1917 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2235 IN_param_value = function_call_param_iterator.next(); |
1918 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2236 if (IN_param_value != NULL) { |
1919 |
2237 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1920 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
2238 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1921 { |
2239 } |
1922 |
2240 |
|
2241 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2242 { |
|
2243 |
|
2244 |
|
2245 if (IN_type_symbol == NULL) |
|
2246 IN_type_symbol = last_type_symbol; |
1923 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2247 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1924 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
2248 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
1925 function_type_prefix = return_type_symbol; |
2249 function_type_prefix = return_type_symbol; |
1926 break; |
2250 break; |
1927 |
2251 |
1943 |
2267 |
1944 { |
2268 { |
1945 identifier_c param_name("IN"); |
2269 identifier_c param_name("IN"); |
1946 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2270 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1947 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2271 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1948 |
2272 symbol_c *IN_type_symbol = NULL; |
1949 /* Get the value from a foo(<param_value>) style call */ |
2273 |
1950 if (IN_param_value == NULL) |
2274 /* Get the value from a foo(<param_value>) style call */ |
1951 IN_param_value = function_call_param_iterator.next(); |
2275 if (IN_param_value == NULL) |
1952 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2276 IN_param_value = function_call_param_iterator.next(); |
1953 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2277 if (IN_param_value != NULL) { |
1954 |
2278 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1955 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
2279 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
1956 { |
2280 } |
1957 |
2281 |
|
2282 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2283 { |
|
2284 |
|
2285 |
|
2286 if (IN_type_symbol == NULL) |
|
2287 IN_type_symbol = last_type_symbol; |
1958 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2288 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1959 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
2289 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
1960 function_type_prefix = return_type_symbol; |
2290 function_type_prefix = return_type_symbol; |
1961 break; |
2291 break; |
1962 |
2292 |
1978 |
2308 |
1979 { |
2309 { |
1980 identifier_c param_name("IN"); |
2310 identifier_c param_name("IN"); |
1981 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2311 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
1982 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2312 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
1983 |
2313 symbol_c *IN_type_symbol = NULL; |
1984 /* Get the value from a foo(<param_value>) style call */ |
2314 |
1985 if (IN_param_value == NULL) |
2315 /* Get the value from a foo(<param_value>) style call */ |
1986 IN_param_value = function_call_param_iterator.next(); |
2316 if (IN_param_value == NULL) |
1987 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2317 IN_param_value = function_call_param_iterator.next(); |
1988 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2318 if (IN_param_value != NULL) { |
1989 |
2319 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
1990 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
2320 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
2321 } |
|
2322 |
|
2323 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
1991 { |
2324 { |
1992 |
2325 |
1993 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
2326 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2327 |
|
2328 if (IN_type_symbol == NULL) |
|
2329 IN_type_symbol = last_type_symbol; |
1994 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2330 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
1995 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
2331 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
1996 function_type_prefix = return_type_symbol; |
2332 function_type_prefix = return_type_symbol; |
1997 break; |
2333 break; |
1998 |
2334 |
2014 |
2350 |
2015 { |
2351 { |
2016 identifier_c param_name("IN"); |
2352 identifier_c param_name("IN"); |
2017 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2353 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2018 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2354 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2019 |
2355 symbol_c *IN_type_symbol = NULL; |
2020 /* Get the value from a foo(<param_value>) style call */ |
2356 |
2021 if (IN_param_value == NULL) |
2357 /* Get the value from a foo(<param_value>) style call */ |
2022 IN_param_value = function_call_param_iterator.next(); |
2358 if (IN_param_value == NULL) |
2023 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2359 IN_param_value = function_call_param_iterator.next(); |
2024 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2360 if (IN_param_value != NULL) { |
2025 |
2361 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2026 if(search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
2362 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2027 { |
2363 } |
2028 |
2364 |
|
2365 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lint_type_name, last_type_symbol)) |
|
2366 { |
|
2367 |
|
2368 |
|
2369 if (IN_type_symbol == NULL) |
|
2370 IN_type_symbol = last_type_symbol; |
2029 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2371 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2030 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
2372 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
2031 function_type_prefix = return_type_symbol; |
2373 function_type_prefix = return_type_symbol; |
2032 break; |
2374 break; |
2033 |
2375 |
2049 |
2391 |
2050 { |
2392 { |
2051 identifier_c param_name("IN"); |
2393 identifier_c param_name("IN"); |
2052 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2394 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2053 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2395 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2054 |
2396 symbol_c *IN_type_symbol = NULL; |
2055 /* Get the value from a foo(<param_value>) style call */ |
2397 |
2056 if (IN_param_value == NULL) |
2398 /* Get the value from a foo(<param_value>) style call */ |
2057 IN_param_value = function_call_param_iterator.next(); |
2399 if (IN_param_value == NULL) |
2058 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2400 IN_param_value = function_call_param_iterator.next(); |
2059 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2401 if (IN_param_value != NULL) { |
2060 |
2402 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2061 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2403 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2062 { |
2404 } |
2063 |
2405 |
|
2406 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2407 { |
|
2408 |
|
2409 |
|
2410 if (IN_type_symbol == NULL) |
|
2411 IN_type_symbol = last_type_symbol; |
2064 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2412 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2065 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
2413 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
2066 function_type_prefix = return_type_symbol; |
2414 function_type_prefix = return_type_symbol; |
2067 break; |
2415 break; |
2068 |
2416 |
2084 |
2432 |
2085 { |
2433 { |
2086 identifier_c param_name("IN"); |
2434 identifier_c param_name("IN"); |
2087 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2435 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2088 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2436 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2089 |
2437 symbol_c *IN_type_symbol = NULL; |
2090 /* Get the value from a foo(<param_value>) style call */ |
2438 |
2091 if (IN_param_value == NULL) |
2439 /* Get the value from a foo(<param_value>) style call */ |
2092 IN_param_value = function_call_param_iterator.next(); |
2440 if (IN_param_value == NULL) |
2093 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2441 IN_param_value = function_call_param_iterator.next(); |
2094 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2442 if (IN_param_value != NULL) { |
2095 |
2443 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2096 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2444 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2097 { |
2445 } |
2098 |
2446 |
|
2447 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2448 { |
|
2449 |
|
2450 |
|
2451 if (IN_type_symbol == NULL) |
|
2452 IN_type_symbol = last_type_symbol; |
2099 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2453 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2100 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
2454 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
2101 function_type_prefix = return_type_symbol; |
2455 function_type_prefix = return_type_symbol; |
2102 break; |
2456 break; |
2103 |
2457 |
2119 |
2473 |
2120 { |
2474 { |
2121 identifier_c param_name("IN"); |
2475 identifier_c param_name("IN"); |
2122 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2476 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2123 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2477 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2124 |
2478 symbol_c *IN_type_symbol = NULL; |
2125 /* Get the value from a foo(<param_value>) style call */ |
2479 |
2126 if (IN_param_value == NULL) |
2480 /* Get the value from a foo(<param_value>) style call */ |
2127 IN_param_value = function_call_param_iterator.next(); |
2481 if (IN_param_value == NULL) |
2128 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2482 IN_param_value = function_call_param_iterator.next(); |
2129 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2483 if (IN_param_value != NULL) { |
2130 |
2484 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2131 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2485 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2132 { |
2486 } |
2133 |
2487 |
|
2488 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2489 { |
|
2490 |
|
2491 |
|
2492 if (IN_type_symbol == NULL) |
|
2493 IN_type_symbol = last_type_symbol; |
2134 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2494 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2135 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
2495 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
2136 function_type_prefix = return_type_symbol; |
2496 function_type_prefix = return_type_symbol; |
2137 break; |
2497 break; |
2138 |
2498 |
2154 |
2514 |
2155 { |
2515 { |
2156 identifier_c param_name("IN"); |
2516 identifier_c param_name("IN"); |
2157 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2517 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2158 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2518 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2159 |
2519 symbol_c *IN_type_symbol = NULL; |
2160 /* Get the value from a foo(<param_value>) style call */ |
2520 |
2161 if (IN_param_value == NULL) |
2521 /* Get the value from a foo(<param_value>) style call */ |
2162 IN_param_value = function_call_param_iterator.next(); |
2522 if (IN_param_value == NULL) |
2163 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2523 IN_param_value = function_call_param_iterator.next(); |
2164 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2524 if (IN_param_value != NULL) { |
2165 |
2525 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2166 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2526 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
2527 } |
|
2528 |
|
2529 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2167 { |
2530 { |
2168 |
2531 |
2169 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
2532 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2533 |
|
2534 if (IN_type_symbol == NULL) |
|
2535 IN_type_symbol = last_type_symbol; |
2170 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2536 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2171 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
2537 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
2172 function_type_prefix = return_type_symbol; |
2538 function_type_prefix = return_type_symbol; |
2173 break; |
2539 break; |
2174 |
2540 |
2190 |
2556 |
2191 { |
2557 { |
2192 identifier_c param_name("IN"); |
2558 identifier_c param_name("IN"); |
2193 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2559 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2194 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2560 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2195 |
2561 symbol_c *IN_type_symbol = NULL; |
2196 /* Get the value from a foo(<param_value>) style call */ |
2562 |
2197 if (IN_param_value == NULL) |
2563 /* Get the value from a foo(<param_value>) style call */ |
2198 IN_param_value = function_call_param_iterator.next(); |
2564 if (IN_param_value == NULL) |
2199 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2565 IN_param_value = function_call_param_iterator.next(); |
2200 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2566 if (IN_param_value != NULL) { |
2201 |
2567 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2202 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2568 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2203 { |
2569 } |
2204 |
2570 |
|
2571 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2572 { |
|
2573 |
|
2574 |
|
2575 if (IN_type_symbol == NULL) |
|
2576 IN_type_symbol = last_type_symbol; |
2205 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2577 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2206 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
2578 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
2207 function_type_prefix = return_type_symbol; |
2579 function_type_prefix = return_type_symbol; |
2208 break; |
2580 break; |
2209 |
2581 |
2225 |
2597 |
2226 { |
2598 { |
2227 identifier_c param_name("IN"); |
2599 identifier_c param_name("IN"); |
2228 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2600 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2229 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2601 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2230 |
2602 symbol_c *IN_type_symbol = NULL; |
2231 /* Get the value from a foo(<param_value>) style call */ |
2603 |
2232 if (IN_param_value == NULL) |
2604 /* Get the value from a foo(<param_value>) style call */ |
2233 IN_param_value = function_call_param_iterator.next(); |
2605 if (IN_param_value == NULL) |
2234 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2606 IN_param_value = function_call_param_iterator.next(); |
2235 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2607 if (IN_param_value != NULL) { |
2236 |
2608 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2237 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2609 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
2610 } |
|
2611 |
|
2612 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2238 { |
2613 { |
2239 |
2614 |
2240 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
2615 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2616 |
|
2617 if (IN_type_symbol == NULL) |
|
2618 IN_type_symbol = last_type_symbol; |
2241 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2619 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2242 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
2620 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
2243 function_type_prefix = return_type_symbol; |
2621 function_type_prefix = return_type_symbol; |
2244 break; |
2622 break; |
2245 |
2623 |
2261 |
2639 |
2262 { |
2640 { |
2263 identifier_c param_name("IN"); |
2641 identifier_c param_name("IN"); |
2264 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2642 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2265 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2643 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2266 |
2644 symbol_c *IN_type_symbol = NULL; |
2267 /* Get the value from a foo(<param_value>) style call */ |
2645 |
2268 if (IN_param_value == NULL) |
2646 /* Get the value from a foo(<param_value>) style call */ |
2269 IN_param_value = function_call_param_iterator.next(); |
2647 if (IN_param_value == NULL) |
2270 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2648 IN_param_value = function_call_param_iterator.next(); |
2271 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2649 if (IN_param_value != NULL) { |
2272 |
2650 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2273 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2651 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
2652 } |
|
2653 |
|
2654 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2274 { |
2655 { |
2275 |
2656 |
2276 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
2657 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
2658 |
|
2659 if (IN_type_symbol == NULL) |
|
2660 IN_type_symbol = last_type_symbol; |
2277 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2661 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2278 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
2662 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
2279 function_type_prefix = return_type_symbol; |
2663 function_type_prefix = return_type_symbol; |
2280 break; |
2664 break; |
2281 |
2665 |
2297 |
2681 |
2298 { |
2682 { |
2299 identifier_c param_name("IN"); |
2683 identifier_c param_name("IN"); |
2300 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2684 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2301 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2685 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2302 |
2686 symbol_c *IN_type_symbol = NULL; |
2303 /* Get the value from a foo(<param_value>) style call */ |
2687 |
2304 if (IN_param_value == NULL) |
2688 /* Get the value from a foo(<param_value>) style call */ |
2305 IN_param_value = function_call_param_iterator.next(); |
2689 if (IN_param_value == NULL) |
2306 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2690 IN_param_value = function_call_param_iterator.next(); |
2307 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2691 if (IN_param_value != NULL) { |
2308 |
2692 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2309 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2693 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2310 { |
2694 } |
2311 |
2695 |
|
2696 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2697 { |
|
2698 |
|
2699 |
|
2700 if (IN_type_symbol == NULL) |
|
2701 IN_type_symbol = last_type_symbol; |
2312 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2702 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2313 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
2703 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
2314 function_type_prefix = return_type_symbol; |
2704 function_type_prefix = return_type_symbol; |
2315 break; |
2705 break; |
2316 |
2706 |
2332 |
2722 |
2333 { |
2723 { |
2334 identifier_c param_name("IN"); |
2724 identifier_c param_name("IN"); |
2335 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2725 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2336 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2726 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2337 |
2727 symbol_c *IN_type_symbol = NULL; |
2338 /* Get the value from a foo(<param_value>) style call */ |
2728 |
2339 if (IN_param_value == NULL) |
2729 /* Get the value from a foo(<param_value>) style call */ |
2340 IN_param_value = function_call_param_iterator.next(); |
2730 if (IN_param_value == NULL) |
2341 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2731 IN_param_value = function_call_param_iterator.next(); |
2342 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2732 if (IN_param_value != NULL) { |
2343 |
2733 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2344 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2734 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2345 { |
2735 } |
2346 |
2736 |
|
2737 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2738 { |
|
2739 |
|
2740 |
|
2741 if (IN_type_symbol == NULL) |
|
2742 IN_type_symbol = last_type_symbol; |
2347 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2743 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2348 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
2744 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
2349 function_type_prefix = return_type_symbol; |
2745 function_type_prefix = return_type_symbol; |
2350 break; |
2746 break; |
2351 |
2747 |
2367 |
2763 |
2368 { |
2764 { |
2369 identifier_c param_name("IN"); |
2765 identifier_c param_name("IN"); |
2370 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2766 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2371 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2767 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2372 |
2768 symbol_c *IN_type_symbol = NULL; |
2373 /* Get the value from a foo(<param_value>) style call */ |
2769 |
2374 if (IN_param_value == NULL) |
2770 /* Get the value from a foo(<param_value>) style call */ |
2375 IN_param_value = function_call_param_iterator.next(); |
2771 if (IN_param_value == NULL) |
2376 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2772 IN_param_value = function_call_param_iterator.next(); |
2377 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2773 if (IN_param_value != NULL) { |
2378 |
2774 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2379 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2775 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
2776 } |
|
2777 |
|
2778 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2380 { |
2779 { |
2381 |
2780 |
2382 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
2781 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
2782 |
|
2783 if (IN_type_symbol == NULL) |
|
2784 IN_type_symbol = last_type_symbol; |
2383 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2785 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2384 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
2786 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
2385 function_type_prefix = return_type_symbol; |
2787 function_type_prefix = return_type_symbol; |
2386 break; |
2788 break; |
2387 |
2789 |
2403 |
2805 |
2404 { |
2806 { |
2405 identifier_c param_name("IN"); |
2807 identifier_c param_name("IN"); |
2406 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2808 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2407 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2809 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2408 |
2810 symbol_c *IN_type_symbol = NULL; |
2409 /* Get the value from a foo(<param_value>) style call */ |
2811 |
2410 if (IN_param_value == NULL) |
2812 /* Get the value from a foo(<param_value>) style call */ |
2411 IN_param_value = function_call_param_iterator.next(); |
2813 if (IN_param_value == NULL) |
2412 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2814 IN_param_value = function_call_param_iterator.next(); |
2413 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2815 if (IN_param_value != NULL) { |
2414 |
2816 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2415 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2817 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2416 { |
2818 } |
2417 |
2819 |
|
2820 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2821 { |
|
2822 |
|
2823 |
|
2824 if (IN_type_symbol == NULL) |
|
2825 IN_type_symbol = last_type_symbol; |
2418 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2826 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2419 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
2827 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
2420 function_type_prefix = return_type_symbol; |
2828 function_type_prefix = return_type_symbol; |
2421 break; |
2829 break; |
2422 |
2830 |
2438 |
2846 |
2439 { |
2847 { |
2440 identifier_c param_name("IN"); |
2848 identifier_c param_name("IN"); |
2441 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2849 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2442 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2850 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2443 |
2851 symbol_c *IN_type_symbol = NULL; |
2444 /* Get the value from a foo(<param_value>) style call */ |
2852 |
2445 if (IN_param_value == NULL) |
2853 /* Get the value from a foo(<param_value>) style call */ |
2446 IN_param_value = function_call_param_iterator.next(); |
2854 if (IN_param_value == NULL) |
2447 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2855 IN_param_value = function_call_param_iterator.next(); |
2448 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2856 if (IN_param_value != NULL) { |
2449 |
2857 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2450 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2858 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2451 { |
2859 } |
2452 |
2860 |
|
2861 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2862 { |
|
2863 |
|
2864 |
|
2865 if (IN_type_symbol == NULL) |
|
2866 IN_type_symbol = last_type_symbol; |
2453 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2867 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2454 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
2868 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
2455 function_type_prefix = return_type_symbol; |
2869 function_type_prefix = return_type_symbol; |
2456 break; |
2870 break; |
2457 |
2871 |
2473 |
2887 |
2474 { |
2888 { |
2475 identifier_c param_name("IN"); |
2889 identifier_c param_name("IN"); |
2476 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2890 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2477 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2891 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2478 |
2892 symbol_c *IN_type_symbol = NULL; |
2479 /* Get the value from a foo(<param_value>) style call */ |
2893 |
2480 if (IN_param_value == NULL) |
2894 /* Get the value from a foo(<param_value>) style call */ |
2481 IN_param_value = function_call_param_iterator.next(); |
2895 if (IN_param_value == NULL) |
2482 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2896 IN_param_value = function_call_param_iterator.next(); |
2483 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2897 if (IN_param_value != NULL) { |
2484 |
2898 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2485 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2899 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2486 { |
2900 } |
2487 |
2901 |
|
2902 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2903 { |
|
2904 |
|
2905 |
|
2906 if (IN_type_symbol == NULL) |
|
2907 IN_type_symbol = last_type_symbol; |
2488 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2908 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2489 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
2909 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
2490 function_type_prefix = return_type_symbol; |
2910 function_type_prefix = return_type_symbol; |
2491 break; |
2911 break; |
2492 |
2912 |
2508 |
2928 |
2509 { |
2929 { |
2510 identifier_c param_name("IN"); |
2930 identifier_c param_name("IN"); |
2511 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2931 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2512 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2932 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2513 |
2933 symbol_c *IN_type_symbol = NULL; |
2514 /* Get the value from a foo(<param_value>) style call */ |
2934 |
2515 if (IN_param_value == NULL) |
2935 /* Get the value from a foo(<param_value>) style call */ |
2516 IN_param_value = function_call_param_iterator.next(); |
2936 if (IN_param_value == NULL) |
2517 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2937 IN_param_value = function_call_param_iterator.next(); |
2518 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2938 if (IN_param_value != NULL) { |
2519 |
2939 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2520 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2940 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2521 { |
2941 } |
2522 |
2942 |
|
2943 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2944 { |
|
2945 |
|
2946 |
|
2947 if (IN_type_symbol == NULL) |
|
2948 IN_type_symbol = last_type_symbol; |
2523 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2949 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2524 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
2950 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
2525 function_type_prefix = return_type_symbol; |
2951 function_type_prefix = return_type_symbol; |
2526 break; |
2952 break; |
2527 |
2953 |
2543 |
2969 |
2544 { |
2970 { |
2545 identifier_c param_name("IN"); |
2971 identifier_c param_name("IN"); |
2546 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2972 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2547 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2973 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2548 |
2974 symbol_c *IN_type_symbol = NULL; |
2549 /* Get the value from a foo(<param_value>) style call */ |
2975 |
2550 if (IN_param_value == NULL) |
2976 /* Get the value from a foo(<param_value>) style call */ |
2551 IN_param_value = function_call_param_iterator.next(); |
2977 if (IN_param_value == NULL) |
2552 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2978 IN_param_value = function_call_param_iterator.next(); |
2553 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2979 if (IN_param_value != NULL) { |
2554 |
2980 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2555 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2981 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2556 { |
2982 } |
2557 |
2983 |
|
2984 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
2985 { |
|
2986 |
|
2987 |
|
2988 if (IN_type_symbol == NULL) |
|
2989 IN_type_symbol = last_type_symbol; |
2558 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2990 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2559 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
2991 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
2560 function_type_prefix = return_type_symbol; |
2992 function_type_prefix = return_type_symbol; |
2561 break; |
2993 break; |
2562 |
2994 |
2578 |
3010 |
2579 { |
3011 { |
2580 identifier_c param_name("IN"); |
3012 identifier_c param_name("IN"); |
2581 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3013 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2582 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3014 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2583 |
3015 symbol_c *IN_type_symbol = NULL; |
2584 /* Get the value from a foo(<param_value>) style call */ |
3016 |
2585 if (IN_param_value == NULL) |
3017 /* Get the value from a foo(<param_value>) style call */ |
2586 IN_param_value = function_call_param_iterator.next(); |
3018 if (IN_param_value == NULL) |
2587 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3019 IN_param_value = function_call_param_iterator.next(); |
2588 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3020 if (IN_param_value != NULL) { |
2589 |
3021 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2590 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
3022 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2591 { |
3023 } |
2592 |
3024 |
|
3025 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
3026 { |
|
3027 |
|
3028 |
|
3029 if (IN_type_symbol == NULL) |
|
3030 IN_type_symbol = last_type_symbol; |
2593 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3031 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2594 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
3032 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
2595 function_type_prefix = return_type_symbol; |
3033 function_type_prefix = return_type_symbol; |
2596 break; |
3034 break; |
2597 |
3035 |
2613 |
3051 |
2614 { |
3052 { |
2615 identifier_c param_name("IN"); |
3053 identifier_c param_name("IN"); |
2616 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3054 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2617 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3055 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2618 |
3056 symbol_c *IN_type_symbol = NULL; |
2619 /* Get the value from a foo(<param_value>) style call */ |
3057 |
2620 if (IN_param_value == NULL) |
3058 /* Get the value from a foo(<param_value>) style call */ |
2621 IN_param_value = function_call_param_iterator.next(); |
3059 if (IN_param_value == NULL) |
2622 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3060 IN_param_value = function_call_param_iterator.next(); |
2623 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3061 if (IN_param_value != NULL) { |
2624 |
3062 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2625 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
3063 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2626 { |
3064 } |
2627 |
3065 |
|
3066 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
3067 { |
|
3068 |
|
3069 |
|
3070 if (IN_type_symbol == NULL) |
|
3071 IN_type_symbol = last_type_symbol; |
2628 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3072 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2629 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
3073 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
2630 function_type_prefix = return_type_symbol; |
3074 function_type_prefix = return_type_symbol; |
2631 break; |
3075 break; |
2632 |
3076 |
2648 |
3092 |
2649 { |
3093 { |
2650 identifier_c param_name("IN"); |
3094 identifier_c param_name("IN"); |
2651 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3095 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2652 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3096 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2653 |
3097 symbol_c *IN_type_symbol = NULL; |
2654 /* Get the value from a foo(<param_value>) style call */ |
3098 |
2655 if (IN_param_value == NULL) |
3099 /* Get the value from a foo(<param_value>) style call */ |
2656 IN_param_value = function_call_param_iterator.next(); |
3100 if (IN_param_value == NULL) |
2657 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3101 IN_param_value = function_call_param_iterator.next(); |
2658 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3102 if (IN_param_value != NULL) { |
2659 |
3103 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2660 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
3104 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3105 } |
|
3106 |
|
3107 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
2661 { |
3108 { |
2662 |
3109 |
2663 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
3110 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3111 |
|
3112 if (IN_type_symbol == NULL) |
|
3113 IN_type_symbol = last_type_symbol; |
2664 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3114 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2665 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
3115 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
2666 function_type_prefix = return_type_symbol; |
3116 function_type_prefix = return_type_symbol; |
2667 break; |
3117 break; |
2668 |
3118 |
2684 |
3134 |
2685 { |
3135 { |
2686 identifier_c param_name("IN"); |
3136 identifier_c param_name("IN"); |
2687 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3137 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2688 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3138 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2689 |
3139 symbol_c *IN_type_symbol = NULL; |
2690 /* Get the value from a foo(<param_value>) style call */ |
3140 |
2691 if (IN_param_value == NULL) |
3141 /* Get the value from a foo(<param_value>) style call */ |
2692 IN_param_value = function_call_param_iterator.next(); |
3142 if (IN_param_value == NULL) |
2693 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3143 IN_param_value = function_call_param_iterator.next(); |
2694 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3144 if (IN_param_value != NULL) { |
2695 |
3145 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2696 if(search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
3146 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
2697 { |
3147 } |
2698 |
3148 |
|
3149 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dint_type_name, last_type_symbol)) |
|
3150 { |
|
3151 |
|
3152 |
|
3153 if (IN_type_symbol == NULL) |
|
3154 IN_type_symbol = last_type_symbol; |
2699 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3155 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2700 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
3156 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
2701 function_type_prefix = return_type_symbol; |
3157 function_type_prefix = return_type_symbol; |
2702 break; |
3158 break; |
2703 |
3159 |
2719 |
3175 |
2720 { |
3176 { |
2721 identifier_c param_name("IN"); |
3177 identifier_c param_name("IN"); |
2722 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3178 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2723 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3179 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2724 |
3180 symbol_c *IN_type_symbol = NULL; |
2725 /* Get the value from a foo(<param_value>) style call */ |
3181 |
2726 if (IN_param_value == NULL) |
3182 /* Get the value from a foo(<param_value>) style call */ |
2727 IN_param_value = function_call_param_iterator.next(); |
3183 if (IN_param_value == NULL) |
2728 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3184 IN_param_value = function_call_param_iterator.next(); |
2729 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3185 if (IN_param_value != NULL) { |
2730 |
3186 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2731 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3187 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3188 } |
|
3189 |
|
3190 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
2732 { |
3191 { |
2733 |
3192 |
2734 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
3193 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
3194 |
|
3195 if (IN_type_symbol == NULL) |
|
3196 IN_type_symbol = last_type_symbol; |
2735 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3197 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2736 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
3198 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
2737 function_type_prefix = return_type_symbol; |
3199 function_type_prefix = return_type_symbol; |
2738 break; |
3200 break; |
2739 |
3201 |
2755 |
3217 |
2756 { |
3218 { |
2757 identifier_c param_name("IN"); |
3219 identifier_c param_name("IN"); |
2758 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3220 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2759 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3221 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2760 |
3222 symbol_c *IN_type_symbol = NULL; |
2761 /* Get the value from a foo(<param_value>) style call */ |
3223 |
2762 if (IN_param_value == NULL) |
3224 /* Get the value from a foo(<param_value>) style call */ |
2763 IN_param_value = function_call_param_iterator.next(); |
3225 if (IN_param_value == NULL) |
2764 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3226 IN_param_value = function_call_param_iterator.next(); |
2765 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3227 if (IN_param_value != NULL) { |
2766 |
3228 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2767 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3229 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3230 } |
|
3231 |
|
3232 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
2768 { |
3233 { |
2769 |
3234 |
2770 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3235 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3236 |
|
3237 if (IN_type_symbol == NULL) |
|
3238 IN_type_symbol = last_type_symbol; |
2771 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3239 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2772 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
3240 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
2773 function_type_prefix = return_type_symbol; |
3241 function_type_prefix = return_type_symbol; |
2774 break; |
3242 break; |
2775 |
3243 |
2791 |
3259 |
2792 { |
3260 { |
2793 identifier_c param_name("IN"); |
3261 identifier_c param_name("IN"); |
2794 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3262 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2795 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3263 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2796 |
3264 symbol_c *IN_type_symbol = NULL; |
2797 /* Get the value from a foo(<param_value>) style call */ |
3265 |
2798 if (IN_param_value == NULL) |
3266 /* Get the value from a foo(<param_value>) style call */ |
2799 IN_param_value = function_call_param_iterator.next(); |
3267 if (IN_param_value == NULL) |
2800 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3268 IN_param_value = function_call_param_iterator.next(); |
2801 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3269 if (IN_param_value != NULL) { |
2802 |
3270 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2803 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3271 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3272 } |
|
3273 |
|
3274 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
2804 { |
3275 { |
2805 |
3276 |
2806 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3277 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3278 |
|
3279 if (IN_type_symbol == NULL) |
|
3280 IN_type_symbol = last_type_symbol; |
2807 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3281 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2808 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
3282 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
2809 function_type_prefix = return_type_symbol; |
3283 function_type_prefix = return_type_symbol; |
2810 break; |
3284 break; |
2811 |
3285 |
2827 |
3301 |
2828 { |
3302 { |
2829 identifier_c param_name("IN"); |
3303 identifier_c param_name("IN"); |
2830 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3304 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2831 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3305 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2832 |
3306 symbol_c *IN_type_symbol = NULL; |
2833 /* Get the value from a foo(<param_value>) style call */ |
3307 |
2834 if (IN_param_value == NULL) |
3308 /* Get the value from a foo(<param_value>) style call */ |
2835 IN_param_value = function_call_param_iterator.next(); |
3309 if (IN_param_value == NULL) |
2836 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3310 IN_param_value = function_call_param_iterator.next(); |
2837 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3311 if (IN_param_value != NULL) { |
2838 |
3312 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2839 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3313 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3314 } |
|
3315 |
|
3316 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
2840 { |
3317 { |
2841 |
3318 |
2842 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3319 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3320 |
|
3321 if (IN_type_symbol == NULL) |
|
3322 IN_type_symbol = last_type_symbol; |
2843 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3323 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2844 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
3324 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
2845 function_type_prefix = return_type_symbol; |
3325 function_type_prefix = return_type_symbol; |
2846 break; |
3326 break; |
2847 |
3327 |
2863 |
3343 |
2864 { |
3344 { |
2865 identifier_c param_name("IN"); |
3345 identifier_c param_name("IN"); |
2866 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3346 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2867 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3347 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2868 |
3348 symbol_c *IN_type_symbol = NULL; |
2869 /* Get the value from a foo(<param_value>) style call */ |
3349 |
2870 if (IN_param_value == NULL) |
3350 /* Get the value from a foo(<param_value>) style call */ |
2871 IN_param_value = function_call_param_iterator.next(); |
3351 if (IN_param_value == NULL) |
2872 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3352 IN_param_value = function_call_param_iterator.next(); |
2873 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3353 if (IN_param_value != NULL) { |
2874 |
3354 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2875 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3355 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3356 } |
|
3357 |
|
3358 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
2876 { |
3359 { |
2877 |
3360 |
2878 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3361 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3362 |
|
3363 if (IN_type_symbol == NULL) |
|
3364 IN_type_symbol = last_type_symbol; |
2879 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3365 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2880 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
3366 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
2881 function_type_prefix = return_type_symbol; |
3367 function_type_prefix = return_type_symbol; |
2882 break; |
3368 break; |
2883 |
3369 |
2899 |
3385 |
2900 { |
3386 { |
2901 identifier_c param_name("IN"); |
3387 identifier_c param_name("IN"); |
2902 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3388 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2903 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3389 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2904 |
3390 symbol_c *IN_type_symbol = NULL; |
2905 /* Get the value from a foo(<param_value>) style call */ |
3391 |
2906 if (IN_param_value == NULL) |
3392 /* Get the value from a foo(<param_value>) style call */ |
2907 IN_param_value = function_call_param_iterator.next(); |
3393 if (IN_param_value == NULL) |
2908 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3394 IN_param_value = function_call_param_iterator.next(); |
2909 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3395 if (IN_param_value != NULL) { |
2910 |
3396 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2911 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3397 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3398 } |
|
3399 |
|
3400 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
2912 { |
3401 { |
2913 |
3402 |
2914 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3403 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3404 |
|
3405 if (IN_type_symbol == NULL) |
|
3406 IN_type_symbol = last_type_symbol; |
2915 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3407 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2916 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
3408 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
2917 function_type_prefix = return_type_symbol; |
3409 function_type_prefix = return_type_symbol; |
2918 break; |
3410 break; |
2919 |
3411 |
2935 |
3427 |
2936 { |
3428 { |
2937 identifier_c param_name("IN"); |
3429 identifier_c param_name("IN"); |
2938 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3430 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2939 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3431 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2940 |
3432 symbol_c *IN_type_symbol = NULL; |
2941 /* Get the value from a foo(<param_value>) style call */ |
3433 |
2942 if (IN_param_value == NULL) |
3434 /* Get the value from a foo(<param_value>) style call */ |
2943 IN_param_value = function_call_param_iterator.next(); |
3435 if (IN_param_value == NULL) |
2944 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3436 IN_param_value = function_call_param_iterator.next(); |
2945 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3437 if (IN_param_value != NULL) { |
2946 |
3438 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2947 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3439 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3440 } |
|
3441 |
|
3442 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
2948 { |
3443 { |
2949 |
3444 |
2950 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3445 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3446 |
|
3447 if (IN_type_symbol == NULL) |
|
3448 IN_type_symbol = last_type_symbol; |
2951 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3449 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2952 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
3450 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
2953 function_type_prefix = return_type_symbol; |
3451 function_type_prefix = return_type_symbol; |
2954 break; |
3452 break; |
2955 |
3453 |
2971 |
3469 |
2972 { |
3470 { |
2973 identifier_c param_name("IN"); |
3471 identifier_c param_name("IN"); |
2974 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3472 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
2975 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3473 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
2976 |
3474 symbol_c *IN_type_symbol = NULL; |
2977 /* Get the value from a foo(<param_value>) style call */ |
3475 |
2978 if (IN_param_value == NULL) |
3476 /* Get the value from a foo(<param_value>) style call */ |
2979 IN_param_value = function_call_param_iterator.next(); |
3477 if (IN_param_value == NULL) |
2980 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3478 IN_param_value = function_call_param_iterator.next(); |
2981 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3479 if (IN_param_value != NULL) { |
2982 |
3480 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
2983 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3481 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3482 } |
|
3483 |
|
3484 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
2984 { |
3485 { |
2985 |
3486 |
2986 function_name = (symbol_c*)(new pragma_c("__date_to_string")); |
3487 function_name = (symbol_c*)(new pragma_c("__date_to_string")); |
|
3488 |
|
3489 if (IN_type_symbol == NULL) |
|
3490 IN_type_symbol = last_type_symbol; |
2987 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3491 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
2988 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
3492 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
2989 function_type_prefix = return_type_symbol; |
3493 function_type_prefix = return_type_symbol; |
2990 break; |
3494 break; |
2991 |
3495 |
3007 |
3511 |
3008 { |
3512 { |
3009 identifier_c param_name("IN"); |
3513 identifier_c param_name("IN"); |
3010 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3514 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3011 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3515 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3012 |
3516 symbol_c *IN_type_symbol = NULL; |
3013 /* Get the value from a foo(<param_value>) style call */ |
3517 |
3014 if (IN_param_value == NULL) |
3518 /* Get the value from a foo(<param_value>) style call */ |
3015 IN_param_value = function_call_param_iterator.next(); |
3519 if (IN_param_value == NULL) |
3016 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3520 IN_param_value = function_call_param_iterator.next(); |
3017 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3521 if (IN_param_value != NULL) { |
3018 |
3522 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3019 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3523 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3524 } |
|
3525 |
|
3526 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3020 { |
3527 { |
3021 |
3528 |
3022 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3529 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3530 |
|
3531 if (IN_type_symbol == NULL) |
|
3532 IN_type_symbol = last_type_symbol; |
3023 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3533 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3024 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
3534 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
3025 function_type_prefix = return_type_symbol; |
3535 function_type_prefix = return_type_symbol; |
3026 break; |
3536 break; |
3027 |
3537 |
3043 |
3553 |
3044 { |
3554 { |
3045 identifier_c param_name("IN"); |
3555 identifier_c param_name("IN"); |
3046 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3556 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3047 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3557 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3048 |
3558 symbol_c *IN_type_symbol = NULL; |
3049 /* Get the value from a foo(<param_value>) style call */ |
3559 |
3050 if (IN_param_value == NULL) |
3560 /* Get the value from a foo(<param_value>) style call */ |
3051 IN_param_value = function_call_param_iterator.next(); |
3561 if (IN_param_value == NULL) |
3052 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3562 IN_param_value = function_call_param_iterator.next(); |
3053 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3563 if (IN_param_value != NULL) { |
3054 |
3564 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3055 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3565 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3566 } |
|
3567 |
|
3568 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3056 { |
3569 { |
3057 |
3570 |
3058 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3571 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3572 |
|
3573 if (IN_type_symbol == NULL) |
|
3574 IN_type_symbol = last_type_symbol; |
3059 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3575 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3060 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
3576 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
3061 function_type_prefix = return_type_symbol; |
3577 function_type_prefix = return_type_symbol; |
3062 break; |
3578 break; |
3063 |
3579 |
3079 |
3595 |
3080 { |
3596 { |
3081 identifier_c param_name("IN"); |
3597 identifier_c param_name("IN"); |
3082 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3598 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3083 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3599 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3084 |
3600 symbol_c *IN_type_symbol = NULL; |
3085 /* Get the value from a foo(<param_value>) style call */ |
3601 |
3086 if (IN_param_value == NULL) |
3602 /* Get the value from a foo(<param_value>) style call */ |
3087 IN_param_value = function_call_param_iterator.next(); |
3603 if (IN_param_value == NULL) |
3088 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3604 IN_param_value = function_call_param_iterator.next(); |
3089 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3605 if (IN_param_value != NULL) { |
3090 |
3606 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3091 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3607 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3608 } |
|
3609 |
|
3610 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3092 { |
3611 { |
3093 |
3612 |
3094 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
3613 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
3614 |
|
3615 if (IN_type_symbol == NULL) |
|
3616 IN_type_symbol = last_type_symbol; |
3095 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3617 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3096 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
3618 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
3097 function_type_prefix = return_type_symbol; |
3619 function_type_prefix = return_type_symbol; |
3098 break; |
3620 break; |
3099 |
3621 |
3115 |
3637 |
3116 { |
3638 { |
3117 identifier_c param_name("IN"); |
3639 identifier_c param_name("IN"); |
3118 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3640 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3119 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3641 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3120 |
3642 symbol_c *IN_type_symbol = NULL; |
3121 /* Get the value from a foo(<param_value>) style call */ |
3643 |
3122 if (IN_param_value == NULL) |
3644 /* Get the value from a foo(<param_value>) style call */ |
3123 IN_param_value = function_call_param_iterator.next(); |
3645 if (IN_param_value == NULL) |
3124 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3646 IN_param_value = function_call_param_iterator.next(); |
3125 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3647 if (IN_param_value != NULL) { |
3126 |
3648 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3127 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3649 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3650 } |
|
3651 |
|
3652 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3128 { |
3653 { |
3129 |
3654 |
3130 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3655 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3656 |
|
3657 if (IN_type_symbol == NULL) |
|
3658 IN_type_symbol = last_type_symbol; |
3131 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3659 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3132 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
3660 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
3133 function_type_prefix = return_type_symbol; |
3661 function_type_prefix = return_type_symbol; |
3134 break; |
3662 break; |
3135 |
3663 |
3151 |
3679 |
3152 { |
3680 { |
3153 identifier_c param_name("IN"); |
3681 identifier_c param_name("IN"); |
3154 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3682 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3155 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3683 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3156 |
3684 symbol_c *IN_type_symbol = NULL; |
3157 /* Get the value from a foo(<param_value>) style call */ |
3685 |
3158 if (IN_param_value == NULL) |
3686 /* Get the value from a foo(<param_value>) style call */ |
3159 IN_param_value = function_call_param_iterator.next(); |
3687 if (IN_param_value == NULL) |
3160 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3688 IN_param_value = function_call_param_iterator.next(); |
3161 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3689 if (IN_param_value != NULL) { |
3162 |
3690 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3163 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3691 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3692 } |
|
3693 |
|
3694 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3164 { |
3695 { |
3165 |
3696 |
3166 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3697 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3698 |
|
3699 if (IN_type_symbol == NULL) |
|
3700 IN_type_symbol = last_type_symbol; |
3167 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3701 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3168 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
3702 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
3169 function_type_prefix = return_type_symbol; |
3703 function_type_prefix = return_type_symbol; |
3170 break; |
3704 break; |
3171 |
3705 |
3187 |
3721 |
3188 { |
3722 { |
3189 identifier_c param_name("IN"); |
3723 identifier_c param_name("IN"); |
3190 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3724 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3191 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3725 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3192 |
3726 symbol_c *IN_type_symbol = NULL; |
3193 /* Get the value from a foo(<param_value>) style call */ |
3727 |
3194 if (IN_param_value == NULL) |
3728 /* Get the value from a foo(<param_value>) style call */ |
3195 IN_param_value = function_call_param_iterator.next(); |
3729 if (IN_param_value == NULL) |
3196 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3730 IN_param_value = function_call_param_iterator.next(); |
3197 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3731 if (IN_param_value != NULL) { |
3198 |
3732 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3199 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3733 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3734 } |
|
3735 |
|
3736 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3200 { |
3737 { |
3201 |
3738 |
3202 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3739 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3740 |
|
3741 if (IN_type_symbol == NULL) |
|
3742 IN_type_symbol = last_type_symbol; |
3203 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3743 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3204 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
3744 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
3205 function_type_prefix = return_type_symbol; |
3745 function_type_prefix = return_type_symbol; |
3206 break; |
3746 break; |
3207 |
3747 |
3223 |
3763 |
3224 { |
3764 { |
3225 identifier_c param_name("IN"); |
3765 identifier_c param_name("IN"); |
3226 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3766 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3227 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3767 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3228 |
3768 symbol_c *IN_type_symbol = NULL; |
3229 /* Get the value from a foo(<param_value>) style call */ |
3769 |
3230 if (IN_param_value == NULL) |
3770 /* Get the value from a foo(<param_value>) style call */ |
3231 IN_param_value = function_call_param_iterator.next(); |
3771 if (IN_param_value == NULL) |
3232 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3772 IN_param_value = function_call_param_iterator.next(); |
3233 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3773 if (IN_param_value != NULL) { |
3234 |
3774 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3235 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3775 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3776 } |
|
3777 |
|
3778 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
3236 { |
3779 { |
3237 |
3780 |
3238 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
3781 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
3782 |
|
3783 if (IN_type_symbol == NULL) |
|
3784 IN_type_symbol = last_type_symbol; |
3239 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3785 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3240 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
3786 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
3241 function_type_prefix = return_type_symbol; |
3787 function_type_prefix = return_type_symbol; |
3242 break; |
3788 break; |
3243 |
3789 |
3259 |
3805 |
3260 { |
3806 { |
3261 identifier_c param_name("IN"); |
3807 identifier_c param_name("IN"); |
3262 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3808 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3263 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3809 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3264 |
3810 symbol_c *IN_type_symbol = NULL; |
3265 /* Get the value from a foo(<param_value>) style call */ |
3811 |
3266 if (IN_param_value == NULL) |
3812 /* Get the value from a foo(<param_value>) style call */ |
3267 IN_param_value = function_call_param_iterator.next(); |
3813 if (IN_param_value == NULL) |
3268 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3814 IN_param_value = function_call_param_iterator.next(); |
3269 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3815 if (IN_param_value != NULL) { |
3270 |
3816 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3271 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
3817 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3272 { |
3818 } |
3273 |
3819 |
|
3820 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3821 { |
|
3822 |
|
3823 |
|
3824 if (IN_type_symbol == NULL) |
|
3825 IN_type_symbol = last_type_symbol; |
3274 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3826 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3275 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
3827 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
3276 function_type_prefix = return_type_symbol; |
3828 function_type_prefix = return_type_symbol; |
3277 break; |
3829 break; |
3278 |
3830 |
3294 |
3846 |
3295 { |
3847 { |
3296 identifier_c param_name("IN"); |
3848 identifier_c param_name("IN"); |
3297 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3849 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3298 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3850 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3299 |
3851 symbol_c *IN_type_symbol = NULL; |
3300 /* Get the value from a foo(<param_value>) style call */ |
3852 |
3301 if (IN_param_value == NULL) |
3853 /* Get the value from a foo(<param_value>) style call */ |
3302 IN_param_value = function_call_param_iterator.next(); |
3854 if (IN_param_value == NULL) |
3303 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3855 IN_param_value = function_call_param_iterator.next(); |
3304 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3856 if (IN_param_value != NULL) { |
3305 |
3857 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3306 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
3858 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3307 { |
3859 } |
3308 |
3860 |
|
3861 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3862 { |
|
3863 |
|
3864 |
|
3865 if (IN_type_symbol == NULL) |
|
3866 IN_type_symbol = last_type_symbol; |
3309 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3867 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3310 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
3868 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
3311 function_type_prefix = return_type_symbol; |
3869 function_type_prefix = return_type_symbol; |
3312 break; |
3870 break; |
3313 |
3871 |
3329 |
3887 |
3330 { |
3888 { |
3331 identifier_c param_name("IN"); |
3889 identifier_c param_name("IN"); |
3332 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3890 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3333 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3891 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3334 |
3892 symbol_c *IN_type_symbol = NULL; |
3335 /* Get the value from a foo(<param_value>) style call */ |
3893 |
3336 if (IN_param_value == NULL) |
3894 /* Get the value from a foo(<param_value>) style call */ |
3337 IN_param_value = function_call_param_iterator.next(); |
3895 if (IN_param_value == NULL) |
3338 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3896 IN_param_value = function_call_param_iterator.next(); |
3339 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3897 if (IN_param_value != NULL) { |
3340 |
3898 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3341 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
3899 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3342 { |
3900 } |
3343 |
3901 |
|
3902 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3903 { |
|
3904 |
|
3905 |
|
3906 if (IN_type_symbol == NULL) |
|
3907 IN_type_symbol = last_type_symbol; |
3344 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3908 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3345 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
3909 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
3346 function_type_prefix = return_type_symbol; |
3910 function_type_prefix = return_type_symbol; |
3347 break; |
3911 break; |
3348 |
3912 |
3364 |
3928 |
3365 { |
3929 { |
3366 identifier_c param_name("IN"); |
3930 identifier_c param_name("IN"); |
3367 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3931 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3368 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3932 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3369 |
3933 symbol_c *IN_type_symbol = NULL; |
3370 /* Get the value from a foo(<param_value>) style call */ |
3934 |
3371 if (IN_param_value == NULL) |
3935 /* Get the value from a foo(<param_value>) style call */ |
3372 IN_param_value = function_call_param_iterator.next(); |
3936 if (IN_param_value == NULL) |
3373 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3937 IN_param_value = function_call_param_iterator.next(); |
3374 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3938 if (IN_param_value != NULL) { |
3375 |
3939 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3376 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
3940 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3377 { |
3941 } |
3378 |
3942 |
|
3943 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
3944 { |
|
3945 |
|
3946 |
|
3947 if (IN_type_symbol == NULL) |
|
3948 IN_type_symbol = last_type_symbol; |
3379 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3949 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3380 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
3950 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
3381 function_type_prefix = return_type_symbol; |
3951 function_type_prefix = return_type_symbol; |
3382 break; |
3952 break; |
3383 |
3953 |
3399 |
3969 |
3400 { |
3970 { |
3401 identifier_c param_name("IN"); |
3971 identifier_c param_name("IN"); |
3402 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3972 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3403 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3973 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3404 |
3974 symbol_c *IN_type_symbol = NULL; |
3405 /* Get the value from a foo(<param_value>) style call */ |
3975 |
3406 if (IN_param_value == NULL) |
3976 /* Get the value from a foo(<param_value>) style call */ |
3407 IN_param_value = function_call_param_iterator.next(); |
3977 if (IN_param_value == NULL) |
3408 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3978 IN_param_value = function_call_param_iterator.next(); |
3409 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3979 if (IN_param_value != NULL) { |
3410 |
3980 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3411 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
3981 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
3982 } |
|
3983 |
|
3984 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
3412 { |
3985 { |
3413 |
3986 |
3414 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
3987 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
3988 |
|
3989 if (IN_type_symbol == NULL) |
|
3990 IN_type_symbol = last_type_symbol; |
3415 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3991 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3416 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
3992 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
3417 function_type_prefix = return_type_symbol; |
3993 function_type_prefix = return_type_symbol; |
3418 break; |
3994 break; |
3419 |
3995 |
3435 |
4011 |
3436 { |
4012 { |
3437 identifier_c param_name("IN"); |
4013 identifier_c param_name("IN"); |
3438 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4014 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3439 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4015 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3440 |
4016 symbol_c *IN_type_symbol = NULL; |
3441 /* Get the value from a foo(<param_value>) style call */ |
4017 |
3442 if (IN_param_value == NULL) |
4018 /* Get the value from a foo(<param_value>) style call */ |
3443 IN_param_value = function_call_param_iterator.next(); |
4019 if (IN_param_value == NULL) |
3444 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4020 IN_param_value = function_call_param_iterator.next(); |
3445 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4021 if (IN_param_value != NULL) { |
3446 |
4022 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3447 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4023 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4024 } |
|
4025 |
|
4026 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
3448 { |
4027 { |
3449 |
4028 |
3450 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
4029 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
4030 |
|
4031 if (IN_type_symbol == NULL) |
|
4032 IN_type_symbol = last_type_symbol; |
3451 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4033 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3452 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
4034 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
3453 function_type_prefix = return_type_symbol; |
4035 function_type_prefix = return_type_symbol; |
3454 break; |
4036 break; |
3455 |
4037 |
3471 |
4053 |
3472 { |
4054 { |
3473 identifier_c param_name("IN"); |
4055 identifier_c param_name("IN"); |
3474 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4056 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3475 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4057 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3476 |
4058 symbol_c *IN_type_symbol = NULL; |
3477 /* Get the value from a foo(<param_value>) style call */ |
4059 |
3478 if (IN_param_value == NULL) |
4060 /* Get the value from a foo(<param_value>) style call */ |
3479 IN_param_value = function_call_param_iterator.next(); |
4061 if (IN_param_value == NULL) |
3480 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4062 IN_param_value = function_call_param_iterator.next(); |
3481 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4063 if (IN_param_value != NULL) { |
3482 |
4064 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3483 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4065 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4066 } |
|
4067 |
|
4068 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
3484 { |
4069 { |
3485 |
4070 |
3486 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
4071 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
4072 |
|
4073 if (IN_type_symbol == NULL) |
|
4074 IN_type_symbol = last_type_symbol; |
3487 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4075 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3488 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
4076 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
3489 function_type_prefix = return_type_symbol; |
4077 function_type_prefix = return_type_symbol; |
3490 break; |
4078 break; |
3491 |
4079 |
3507 |
4095 |
3508 { |
4096 { |
3509 identifier_c param_name("IN"); |
4097 identifier_c param_name("IN"); |
3510 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4098 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3511 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4099 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3512 |
4100 symbol_c *IN_type_symbol = NULL; |
3513 /* Get the value from a foo(<param_value>) style call */ |
4101 |
3514 if (IN_param_value == NULL) |
4102 /* Get the value from a foo(<param_value>) style call */ |
3515 IN_param_value = function_call_param_iterator.next(); |
4103 if (IN_param_value == NULL) |
3516 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4104 IN_param_value = function_call_param_iterator.next(); |
3517 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4105 if (IN_param_value != NULL) { |
3518 |
4106 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3519 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4107 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3520 { |
4108 } |
3521 |
4109 |
|
4110 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4111 { |
|
4112 |
|
4113 |
|
4114 if (IN_type_symbol == NULL) |
|
4115 IN_type_symbol = last_type_symbol; |
3522 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4116 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3523 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
4117 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
3524 function_type_prefix = return_type_symbol; |
4118 function_type_prefix = return_type_symbol; |
3525 break; |
4119 break; |
3526 |
4120 |
3542 |
4136 |
3543 { |
4137 { |
3544 identifier_c param_name("IN"); |
4138 identifier_c param_name("IN"); |
3545 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4139 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3546 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4140 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3547 |
4141 symbol_c *IN_type_symbol = NULL; |
3548 /* Get the value from a foo(<param_value>) style call */ |
4142 |
3549 if (IN_param_value == NULL) |
4143 /* Get the value from a foo(<param_value>) style call */ |
3550 IN_param_value = function_call_param_iterator.next(); |
4144 if (IN_param_value == NULL) |
3551 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4145 IN_param_value = function_call_param_iterator.next(); |
3552 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4146 if (IN_param_value != NULL) { |
3553 |
4147 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3554 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4148 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3555 { |
4149 } |
3556 |
4150 |
|
4151 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4152 { |
|
4153 |
|
4154 |
|
4155 if (IN_type_symbol == NULL) |
|
4156 IN_type_symbol = last_type_symbol; |
3557 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4157 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3558 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
4158 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
3559 function_type_prefix = return_type_symbol; |
4159 function_type_prefix = return_type_symbol; |
3560 break; |
4160 break; |
3561 |
4161 |
3577 |
4177 |
3578 { |
4178 { |
3579 identifier_c param_name("IN"); |
4179 identifier_c param_name("IN"); |
3580 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4180 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3581 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4181 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3582 |
4182 symbol_c *IN_type_symbol = NULL; |
3583 /* Get the value from a foo(<param_value>) style call */ |
4183 |
3584 if (IN_param_value == NULL) |
4184 /* Get the value from a foo(<param_value>) style call */ |
3585 IN_param_value = function_call_param_iterator.next(); |
4185 if (IN_param_value == NULL) |
3586 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4186 IN_param_value = function_call_param_iterator.next(); |
3587 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4187 if (IN_param_value != NULL) { |
3588 |
4188 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3589 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4189 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4190 } |
|
4191 |
|
4192 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
3590 { |
4193 { |
3591 |
4194 |
3592 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
4195 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
4196 |
|
4197 if (IN_type_symbol == NULL) |
|
4198 IN_type_symbol = last_type_symbol; |
3593 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4199 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3594 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
4200 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
3595 function_type_prefix = return_type_symbol; |
4201 function_type_prefix = return_type_symbol; |
3596 break; |
4202 break; |
3597 |
4203 |
3613 |
4219 |
3614 { |
4220 { |
3615 identifier_c param_name("IN"); |
4221 identifier_c param_name("IN"); |
3616 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4222 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3617 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4223 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3618 |
4224 symbol_c *IN_type_symbol = NULL; |
3619 /* Get the value from a foo(<param_value>) style call */ |
4225 |
3620 if (IN_param_value == NULL) |
4226 /* Get the value from a foo(<param_value>) style call */ |
3621 IN_param_value = function_call_param_iterator.next(); |
4227 if (IN_param_value == NULL) |
3622 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4228 IN_param_value = function_call_param_iterator.next(); |
3623 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4229 if (IN_param_value != NULL) { |
3624 |
4230 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3625 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4231 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3626 { |
4232 } |
3627 |
4233 |
|
4234 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4235 { |
|
4236 |
|
4237 |
|
4238 if (IN_type_symbol == NULL) |
|
4239 IN_type_symbol = last_type_symbol; |
3628 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4240 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3629 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
4241 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
3630 function_type_prefix = return_type_symbol; |
4242 function_type_prefix = return_type_symbol; |
3631 break; |
4243 break; |
3632 |
4244 |
3648 |
4260 |
3649 { |
4261 { |
3650 identifier_c param_name("IN"); |
4262 identifier_c param_name("IN"); |
3651 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4263 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3652 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4264 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3653 |
4265 symbol_c *IN_type_symbol = NULL; |
3654 /* Get the value from a foo(<param_value>) style call */ |
4266 |
3655 if (IN_param_value == NULL) |
4267 /* Get the value from a foo(<param_value>) style call */ |
3656 IN_param_value = function_call_param_iterator.next(); |
4268 if (IN_param_value == NULL) |
3657 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4269 IN_param_value = function_call_param_iterator.next(); |
3658 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4270 if (IN_param_value != NULL) { |
3659 |
4271 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3660 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4272 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3661 { |
4273 } |
3662 |
4274 |
|
4275 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4276 { |
|
4277 |
|
4278 |
|
4279 if (IN_type_symbol == NULL) |
|
4280 IN_type_symbol = last_type_symbol; |
3663 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4281 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3664 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
4282 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
3665 function_type_prefix = return_type_symbol; |
4283 function_type_prefix = return_type_symbol; |
3666 break; |
4284 break; |
3667 |
4285 |
3683 |
4301 |
3684 { |
4302 { |
3685 identifier_c param_name("IN"); |
4303 identifier_c param_name("IN"); |
3686 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4304 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3687 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4305 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3688 |
4306 symbol_c *IN_type_symbol = NULL; |
3689 /* Get the value from a foo(<param_value>) style call */ |
4307 |
3690 if (IN_param_value == NULL) |
4308 /* Get the value from a foo(<param_value>) style call */ |
3691 IN_param_value = function_call_param_iterator.next(); |
4309 if (IN_param_value == NULL) |
3692 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4310 IN_param_value = function_call_param_iterator.next(); |
3693 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4311 if (IN_param_value != NULL) { |
3694 |
4312 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3695 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4313 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3696 { |
4314 } |
3697 |
4315 |
|
4316 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4317 { |
|
4318 |
|
4319 |
|
4320 if (IN_type_symbol == NULL) |
|
4321 IN_type_symbol = last_type_symbol; |
3698 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4322 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3699 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
4323 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
3700 function_type_prefix = return_type_symbol; |
4324 function_type_prefix = return_type_symbol; |
3701 break; |
4325 break; |
3702 |
4326 |
3718 |
4342 |
3719 { |
4343 { |
3720 identifier_c param_name("IN"); |
4344 identifier_c param_name("IN"); |
3721 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4345 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3722 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4346 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3723 |
4347 symbol_c *IN_type_symbol = NULL; |
3724 /* Get the value from a foo(<param_value>) style call */ |
4348 |
3725 if (IN_param_value == NULL) |
4349 /* Get the value from a foo(<param_value>) style call */ |
3726 IN_param_value = function_call_param_iterator.next(); |
4350 if (IN_param_value == NULL) |
3727 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4351 IN_param_value = function_call_param_iterator.next(); |
3728 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4352 if (IN_param_value != NULL) { |
3729 |
4353 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3730 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4354 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3731 { |
4355 } |
3732 |
4356 |
|
4357 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4358 { |
|
4359 |
|
4360 |
|
4361 if (IN_type_symbol == NULL) |
|
4362 IN_type_symbol = last_type_symbol; |
3733 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4363 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3734 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
4364 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
3735 function_type_prefix = return_type_symbol; |
4365 function_type_prefix = return_type_symbol; |
3736 break; |
4366 break; |
3737 |
4367 |
3753 |
4383 |
3754 { |
4384 { |
3755 identifier_c param_name("IN"); |
4385 identifier_c param_name("IN"); |
3756 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4386 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3757 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4387 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3758 |
4388 symbol_c *IN_type_symbol = NULL; |
3759 /* Get the value from a foo(<param_value>) style call */ |
4389 |
3760 if (IN_param_value == NULL) |
4390 /* Get the value from a foo(<param_value>) style call */ |
3761 IN_param_value = function_call_param_iterator.next(); |
4391 if (IN_param_value == NULL) |
3762 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4392 IN_param_value = function_call_param_iterator.next(); |
3763 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4393 if (IN_param_value != NULL) { |
3764 |
4394 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3765 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4395 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3766 { |
4396 } |
3767 |
4397 |
|
4398 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4399 { |
|
4400 |
|
4401 |
|
4402 if (IN_type_symbol == NULL) |
|
4403 IN_type_symbol = last_type_symbol; |
3768 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4404 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3769 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
4405 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
3770 function_type_prefix = return_type_symbol; |
4406 function_type_prefix = return_type_symbol; |
3771 break; |
4407 break; |
3772 |
4408 |
3788 |
4424 |
3789 { |
4425 { |
3790 identifier_c param_name("IN"); |
4426 identifier_c param_name("IN"); |
3791 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4427 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3792 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4428 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3793 |
4429 symbol_c *IN_type_symbol = NULL; |
3794 /* Get the value from a foo(<param_value>) style call */ |
4430 |
3795 if (IN_param_value == NULL) |
4431 /* Get the value from a foo(<param_value>) style call */ |
3796 IN_param_value = function_call_param_iterator.next(); |
4432 if (IN_param_value == NULL) |
3797 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4433 IN_param_value = function_call_param_iterator.next(); |
3798 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4434 if (IN_param_value != NULL) { |
3799 |
4435 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3800 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4436 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3801 { |
4437 } |
3802 |
4438 |
|
4439 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4440 { |
|
4441 |
|
4442 |
|
4443 if (IN_type_symbol == NULL) |
|
4444 IN_type_symbol = last_type_symbol; |
3803 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4445 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3804 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
4446 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
3805 function_type_prefix = return_type_symbol; |
4447 function_type_prefix = return_type_symbol; |
3806 break; |
4448 break; |
3807 |
4449 |
3823 |
4465 |
3824 { |
4466 { |
3825 identifier_c param_name("IN"); |
4467 identifier_c param_name("IN"); |
3826 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4468 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3827 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4469 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3828 |
4470 symbol_c *IN_type_symbol = NULL; |
3829 /* Get the value from a foo(<param_value>) style call */ |
4471 |
3830 if (IN_param_value == NULL) |
4472 /* Get the value from a foo(<param_value>) style call */ |
3831 IN_param_value = function_call_param_iterator.next(); |
4473 if (IN_param_value == NULL) |
3832 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4474 IN_param_value = function_call_param_iterator.next(); |
3833 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4475 if (IN_param_value != NULL) { |
3834 |
4476 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3835 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4477 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3836 { |
4478 } |
3837 |
4479 |
|
4480 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4481 { |
|
4482 |
|
4483 |
|
4484 if (IN_type_symbol == NULL) |
|
4485 IN_type_symbol = last_type_symbol; |
3838 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4486 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3839 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
4487 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
3840 function_type_prefix = return_type_symbol; |
4488 function_type_prefix = return_type_symbol; |
3841 break; |
4489 break; |
3842 |
4490 |
3858 |
4506 |
3859 { |
4507 { |
3860 identifier_c param_name("IN"); |
4508 identifier_c param_name("IN"); |
3861 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4509 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3862 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4510 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3863 |
4511 symbol_c *IN_type_symbol = NULL; |
3864 /* Get the value from a foo(<param_value>) style call */ |
4512 |
3865 if (IN_param_value == NULL) |
4513 /* Get the value from a foo(<param_value>) style call */ |
3866 IN_param_value = function_call_param_iterator.next(); |
4514 if (IN_param_value == NULL) |
3867 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4515 IN_param_value = function_call_param_iterator.next(); |
3868 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4516 if (IN_param_value != NULL) { |
3869 |
4517 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3870 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4518 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4519 } |
|
4520 |
|
4521 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
3871 { |
4522 { |
3872 |
4523 |
3873 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
4524 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
4525 |
|
4526 if (IN_type_symbol == NULL) |
|
4527 IN_type_symbol = last_type_symbol; |
3874 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4528 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3875 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
4529 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
3876 function_type_prefix = return_type_symbol; |
4530 function_type_prefix = return_type_symbol; |
3877 break; |
4531 break; |
3878 |
4532 |
3894 |
4548 |
3895 { |
4549 { |
3896 identifier_c param_name("IN"); |
4550 identifier_c param_name("IN"); |
3897 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4551 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3898 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4552 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3899 |
4553 symbol_c *IN_type_symbol = NULL; |
3900 /* Get the value from a foo(<param_value>) style call */ |
4554 |
3901 if (IN_param_value == NULL) |
4555 /* Get the value from a foo(<param_value>) style call */ |
3902 IN_param_value = function_call_param_iterator.next(); |
4556 if (IN_param_value == NULL) |
3903 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4557 IN_param_value = function_call_param_iterator.next(); |
3904 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4558 if (IN_param_value != NULL) { |
3905 |
4559 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3906 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
4560 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
3907 { |
4561 } |
3908 |
4562 |
|
4563 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
|
4564 { |
|
4565 |
|
4566 |
|
4567 if (IN_type_symbol == NULL) |
|
4568 IN_type_symbol = last_type_symbol; |
3909 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4569 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3910 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
4570 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
3911 function_type_prefix = return_type_symbol; |
4571 function_type_prefix = return_type_symbol; |
3912 break; |
4572 break; |
3913 |
4573 |
3929 |
4589 |
3930 { |
4590 { |
3931 identifier_c param_name("IN"); |
4591 identifier_c param_name("IN"); |
3932 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4592 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3933 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4593 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3934 |
4594 symbol_c *IN_type_symbol = NULL; |
3935 /* Get the value from a foo(<param_value>) style call */ |
4595 |
3936 if (IN_param_value == NULL) |
4596 /* Get the value from a foo(<param_value>) style call */ |
3937 IN_param_value = function_call_param_iterator.next(); |
4597 if (IN_param_value == NULL) |
3938 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4598 IN_param_value = function_call_param_iterator.next(); |
3939 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4599 if (IN_param_value != NULL) { |
3940 |
4600 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3941 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4601 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4602 } |
|
4603 |
|
4604 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
3942 { |
4605 { |
3943 |
4606 |
3944 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
4607 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
4608 |
|
4609 if (IN_type_symbol == NULL) |
|
4610 IN_type_symbol = last_type_symbol; |
3945 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4611 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3946 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
4612 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
3947 function_type_prefix = return_type_symbol; |
4613 function_type_prefix = return_type_symbol; |
3948 break; |
4614 break; |
3949 |
4615 |
3965 |
4631 |
3966 { |
4632 { |
3967 identifier_c param_name("IN"); |
4633 identifier_c param_name("IN"); |
3968 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4634 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
3969 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4635 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
3970 |
4636 symbol_c *IN_type_symbol = NULL; |
3971 /* Get the value from a foo(<param_value>) style call */ |
4637 |
3972 if (IN_param_value == NULL) |
4638 /* Get the value from a foo(<param_value>) style call */ |
3973 IN_param_value = function_call_param_iterator.next(); |
4639 if (IN_param_value == NULL) |
3974 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4640 IN_param_value = function_call_param_iterator.next(); |
3975 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4641 if (IN_param_value != NULL) { |
3976 |
4642 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
3977 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4643 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4644 } |
|
4645 |
|
4646 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
3978 { |
4647 { |
3979 |
4648 |
3980 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
4649 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4650 |
|
4651 if (IN_type_symbol == NULL) |
|
4652 IN_type_symbol = last_type_symbol; |
3981 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4653 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
3982 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
4654 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
3983 function_type_prefix = return_type_symbol; |
4655 function_type_prefix = return_type_symbol; |
3984 break; |
4656 break; |
3985 |
4657 |
4001 |
4673 |
4002 { |
4674 { |
4003 identifier_c param_name("IN"); |
4675 identifier_c param_name("IN"); |
4004 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4676 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4005 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4677 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4006 |
4678 symbol_c *IN_type_symbol = NULL; |
4007 /* Get the value from a foo(<param_value>) style call */ |
4679 |
4008 if (IN_param_value == NULL) |
4680 /* Get the value from a foo(<param_value>) style call */ |
4009 IN_param_value = function_call_param_iterator.next(); |
4681 if (IN_param_value == NULL) |
4010 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4682 IN_param_value = function_call_param_iterator.next(); |
4011 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4683 if (IN_param_value != NULL) { |
4012 |
4684 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4013 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4685 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4686 } |
|
4687 |
|
4688 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4014 { |
4689 { |
4015 |
4690 |
4016 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
4691 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4692 |
|
4693 if (IN_type_symbol == NULL) |
|
4694 IN_type_symbol = last_type_symbol; |
4017 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4695 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4018 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
4696 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
4019 function_type_prefix = return_type_symbol; |
4697 function_type_prefix = return_type_symbol; |
4020 break; |
4698 break; |
4021 |
4699 |
4037 |
4715 |
4038 { |
4716 { |
4039 identifier_c param_name("IN"); |
4717 identifier_c param_name("IN"); |
4040 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4718 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4041 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4719 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4042 |
4720 symbol_c *IN_type_symbol = NULL; |
4043 /* Get the value from a foo(<param_value>) style call */ |
4721 |
4044 if (IN_param_value == NULL) |
4722 /* Get the value from a foo(<param_value>) style call */ |
4045 IN_param_value = function_call_param_iterator.next(); |
4723 if (IN_param_value == NULL) |
4046 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4724 IN_param_value = function_call_param_iterator.next(); |
4047 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4725 if (IN_param_value != NULL) { |
4048 |
4726 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4049 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4727 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4728 } |
|
4729 |
|
4730 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4050 { |
4731 { |
4051 |
4732 |
4052 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
4733 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4734 |
|
4735 if (IN_type_symbol == NULL) |
|
4736 IN_type_symbol = last_type_symbol; |
4053 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4737 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4054 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
4738 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
4055 function_type_prefix = return_type_symbol; |
4739 function_type_prefix = return_type_symbol; |
4056 break; |
4740 break; |
4057 |
4741 |
4073 |
4757 |
4074 { |
4758 { |
4075 identifier_c param_name("IN"); |
4759 identifier_c param_name("IN"); |
4076 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4760 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4077 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4761 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4078 |
4762 symbol_c *IN_type_symbol = NULL; |
4079 /* Get the value from a foo(<param_value>) style call */ |
4763 |
4080 if (IN_param_value == NULL) |
4764 /* Get the value from a foo(<param_value>) style call */ |
4081 IN_param_value = function_call_param_iterator.next(); |
4765 if (IN_param_value == NULL) |
4082 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4766 IN_param_value = function_call_param_iterator.next(); |
4083 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4767 if (IN_param_value != NULL) { |
4084 |
4768 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4085 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4769 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4770 } |
|
4771 |
|
4772 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4086 { |
4773 { |
4087 |
4774 |
4088 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
4775 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4776 |
|
4777 if (IN_type_symbol == NULL) |
|
4778 IN_type_symbol = last_type_symbol; |
4089 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4779 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4090 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
4780 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
4091 function_type_prefix = return_type_symbol; |
4781 function_type_prefix = return_type_symbol; |
4092 break; |
4782 break; |
4093 |
4783 |
4109 |
4799 |
4110 { |
4800 { |
4111 identifier_c param_name("IN"); |
4801 identifier_c param_name("IN"); |
4112 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4802 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4113 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4803 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4114 |
4804 symbol_c *IN_type_symbol = NULL; |
4115 /* Get the value from a foo(<param_value>) style call */ |
4805 |
4116 if (IN_param_value == NULL) |
4806 /* Get the value from a foo(<param_value>) style call */ |
4117 IN_param_value = function_call_param_iterator.next(); |
4807 if (IN_param_value == NULL) |
4118 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4808 IN_param_value = function_call_param_iterator.next(); |
4119 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4809 if (IN_param_value != NULL) { |
4120 |
4810 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4121 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4811 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4812 } |
|
4813 |
|
4814 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4122 { |
4815 { |
4123 |
4816 |
4124 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
4817 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4818 |
|
4819 if (IN_type_symbol == NULL) |
|
4820 IN_type_symbol = last_type_symbol; |
4125 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4821 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4126 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
4822 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
4127 function_type_prefix = return_type_symbol; |
4823 function_type_prefix = return_type_symbol; |
4128 break; |
4824 break; |
4129 |
4825 |
4145 |
4841 |
4146 { |
4842 { |
4147 identifier_c param_name("IN"); |
4843 identifier_c param_name("IN"); |
4148 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4844 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4149 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4845 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4150 |
4846 symbol_c *IN_type_symbol = NULL; |
4151 /* Get the value from a foo(<param_value>) style call */ |
4847 |
4152 if (IN_param_value == NULL) |
4848 /* Get the value from a foo(<param_value>) style call */ |
4153 IN_param_value = function_call_param_iterator.next(); |
4849 if (IN_param_value == NULL) |
4154 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4850 IN_param_value = function_call_param_iterator.next(); |
4155 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4851 if (IN_param_value != NULL) { |
4156 |
4852 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4157 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4853 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4854 } |
|
4855 |
|
4856 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4158 { |
4857 { |
4159 |
4858 |
4160 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
4859 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4860 |
|
4861 if (IN_type_symbol == NULL) |
|
4862 IN_type_symbol = last_type_symbol; |
4161 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4863 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4162 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
4864 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
4163 function_type_prefix = return_type_symbol; |
4865 function_type_prefix = return_type_symbol; |
4164 break; |
4866 break; |
4165 |
4867 |
4181 |
4883 |
4182 { |
4884 { |
4183 identifier_c param_name("IN"); |
4885 identifier_c param_name("IN"); |
4184 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4886 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4185 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4887 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4186 |
4888 symbol_c *IN_type_symbol = NULL; |
4187 /* Get the value from a foo(<param_value>) style call */ |
4889 |
4188 if (IN_param_value == NULL) |
4890 /* Get the value from a foo(<param_value>) style call */ |
4189 IN_param_value = function_call_param_iterator.next(); |
4891 if (IN_param_value == NULL) |
4190 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4892 IN_param_value = function_call_param_iterator.next(); |
4191 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4893 if (IN_param_value != NULL) { |
4192 |
4894 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4193 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4895 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4896 } |
|
4897 |
|
4898 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4194 { |
4899 { |
4195 |
4900 |
4196 function_name = (symbol_c*)(new pragma_c("__dt_to_string")); |
4901 function_name = (symbol_c*)(new pragma_c("__dt_to_string")); |
|
4902 |
|
4903 if (IN_type_symbol == NULL) |
|
4904 IN_type_symbol = last_type_symbol; |
4197 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4905 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4198 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
4906 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
4199 function_type_prefix = return_type_symbol; |
4907 function_type_prefix = return_type_symbol; |
4200 break; |
4908 break; |
4201 |
4909 |
4217 |
4925 |
4218 { |
4926 { |
4219 identifier_c param_name("IN"); |
4927 identifier_c param_name("IN"); |
4220 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4928 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4221 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4929 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4222 |
4930 symbol_c *IN_type_symbol = NULL; |
4223 /* Get the value from a foo(<param_value>) style call */ |
4931 |
4224 if (IN_param_value == NULL) |
4932 /* Get the value from a foo(<param_value>) style call */ |
4225 IN_param_value = function_call_param_iterator.next(); |
4933 if (IN_param_value == NULL) |
4226 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4934 IN_param_value = function_call_param_iterator.next(); |
4227 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4935 if (IN_param_value != NULL) { |
4228 |
4936 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4229 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4937 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4938 } |
|
4939 |
|
4940 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4230 { |
4941 { |
4231 |
4942 |
4232 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
4943 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4944 |
|
4945 if (IN_type_symbol == NULL) |
|
4946 IN_type_symbol = last_type_symbol; |
4233 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4947 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4234 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
4948 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
4235 function_type_prefix = return_type_symbol; |
4949 function_type_prefix = return_type_symbol; |
4236 break; |
4950 break; |
4237 |
4951 |
4253 |
4967 |
4254 { |
4968 { |
4255 identifier_c param_name("IN"); |
4969 identifier_c param_name("IN"); |
4256 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4970 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4257 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4971 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4258 |
4972 symbol_c *IN_type_symbol = NULL; |
4259 /* Get the value from a foo(<param_value>) style call */ |
4973 |
4260 if (IN_param_value == NULL) |
4974 /* Get the value from a foo(<param_value>) style call */ |
4261 IN_param_value = function_call_param_iterator.next(); |
4975 if (IN_param_value == NULL) |
4262 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4976 IN_param_value = function_call_param_iterator.next(); |
4263 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
4977 if (IN_param_value != NULL) { |
4264 |
4978 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4265 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4979 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
4980 } |
|
4981 |
|
4982 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4266 { |
4983 { |
4267 |
4984 |
4268 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
4985 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
4986 |
|
4987 if (IN_type_symbol == NULL) |
|
4988 IN_type_symbol = last_type_symbol; |
4269 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4989 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4270 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
4990 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
4271 function_type_prefix = return_type_symbol; |
4991 function_type_prefix = return_type_symbol; |
4272 break; |
4992 break; |
4273 |
4993 |
4289 |
5009 |
4290 { |
5010 { |
4291 identifier_c param_name("IN"); |
5011 identifier_c param_name("IN"); |
4292 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5012 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4293 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5013 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4294 |
5014 symbol_c *IN_type_symbol = NULL; |
4295 /* Get the value from a foo(<param_value>) style call */ |
5015 |
4296 if (IN_param_value == NULL) |
5016 /* Get the value from a foo(<param_value>) style call */ |
4297 IN_param_value = function_call_param_iterator.next(); |
5017 if (IN_param_value == NULL) |
4298 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5018 IN_param_value = function_call_param_iterator.next(); |
4299 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5019 if (IN_param_value != NULL) { |
4300 |
5020 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4301 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
5021 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5022 } |
|
5023 |
|
5024 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4302 { |
5025 { |
4303 |
5026 |
4304 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
5027 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
5028 |
|
5029 if (IN_type_symbol == NULL) |
|
5030 IN_type_symbol = last_type_symbol; |
4305 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5031 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4306 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
5032 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
4307 function_type_prefix = return_type_symbol; |
5033 function_type_prefix = return_type_symbol; |
4308 break; |
5034 break; |
4309 |
5035 |
4325 |
5051 |
4326 { |
5052 { |
4327 identifier_c param_name("IN"); |
5053 identifier_c param_name("IN"); |
4328 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5054 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4329 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5055 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4330 |
5056 symbol_c *IN_type_symbol = NULL; |
4331 /* Get the value from a foo(<param_value>) style call */ |
5057 |
4332 if (IN_param_value == NULL) |
5058 /* Get the value from a foo(<param_value>) style call */ |
4333 IN_param_value = function_call_param_iterator.next(); |
5059 if (IN_param_value == NULL) |
4334 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5060 IN_param_value = function_call_param_iterator.next(); |
4335 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5061 if (IN_param_value != NULL) { |
4336 |
5062 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4337 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
5063 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5064 } |
|
5065 |
|
5066 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4338 { |
5067 { |
4339 |
5068 |
4340 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5069 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5070 |
|
5071 if (IN_type_symbol == NULL) |
|
5072 IN_type_symbol = last_type_symbol; |
4341 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5073 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4342 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
5074 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
4343 function_type_prefix = return_type_symbol; |
5075 function_type_prefix = return_type_symbol; |
4344 break; |
5076 break; |
4345 |
5077 |
4361 |
5093 |
4362 { |
5094 { |
4363 identifier_c param_name("IN"); |
5095 identifier_c param_name("IN"); |
4364 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5096 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4365 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5097 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4366 |
5098 symbol_c *IN_type_symbol = NULL; |
4367 /* Get the value from a foo(<param_value>) style call */ |
5099 |
4368 if (IN_param_value == NULL) |
5100 /* Get the value from a foo(<param_value>) style call */ |
4369 IN_param_value = function_call_param_iterator.next(); |
5101 if (IN_param_value == NULL) |
4370 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5102 IN_param_value = function_call_param_iterator.next(); |
4371 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5103 if (IN_param_value != NULL) { |
4372 |
5104 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4373 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
5105 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5106 } |
|
5107 |
|
5108 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4374 { |
5109 { |
4375 |
5110 |
4376 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5111 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5112 |
|
5113 if (IN_type_symbol == NULL) |
|
5114 IN_type_symbol = last_type_symbol; |
4377 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5115 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4378 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
5116 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
4379 function_type_prefix = return_type_symbol; |
5117 function_type_prefix = return_type_symbol; |
4380 break; |
5118 break; |
4381 |
5119 |
4397 |
5135 |
4398 { |
5136 { |
4399 identifier_c param_name("IN"); |
5137 identifier_c param_name("IN"); |
4400 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5138 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4401 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5139 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4402 |
5140 symbol_c *IN_type_symbol = NULL; |
4403 /* Get the value from a foo(<param_value>) style call */ |
5141 |
4404 if (IN_param_value == NULL) |
5142 /* Get the value from a foo(<param_value>) style call */ |
4405 IN_param_value = function_call_param_iterator.next(); |
5143 if (IN_param_value == NULL) |
4406 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5144 IN_param_value = function_call_param_iterator.next(); |
4407 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5145 if (IN_param_value != NULL) { |
4408 |
5146 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4409 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
5147 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5148 } |
|
5149 |
|
5150 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4410 { |
5151 { |
4411 |
5152 |
4412 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5153 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5154 |
|
5155 if (IN_type_symbol == NULL) |
|
5156 IN_type_symbol = last_type_symbol; |
4413 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5157 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4414 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
5158 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
4415 function_type_prefix = return_type_symbol; |
5159 function_type_prefix = return_type_symbol; |
4416 break; |
5160 break; |
4417 |
5161 |
4433 |
5177 |
4434 { |
5178 { |
4435 identifier_c param_name("IN"); |
5179 identifier_c param_name("IN"); |
4436 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5180 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4437 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5181 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4438 |
5182 symbol_c *IN_type_symbol = NULL; |
4439 /* Get the value from a foo(<param_value>) style call */ |
5183 |
4440 if (IN_param_value == NULL) |
5184 /* Get the value from a foo(<param_value>) style call */ |
4441 IN_param_value = function_call_param_iterator.next(); |
5185 if (IN_param_value == NULL) |
4442 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5186 IN_param_value = function_call_param_iterator.next(); |
4443 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5187 if (IN_param_value != NULL) { |
4444 |
5188 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4445 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
5189 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5190 } |
|
5191 |
|
5192 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
4446 { |
5193 { |
4447 |
5194 |
4448 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5195 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5196 |
|
5197 if (IN_type_symbol == NULL) |
|
5198 IN_type_symbol = last_type_symbol; |
4449 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5199 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4450 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
5200 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
4451 function_type_prefix = return_type_symbol; |
5201 function_type_prefix = return_type_symbol; |
4452 break; |
5202 break; |
4453 |
5203 |
4469 |
5219 |
4470 { |
5220 { |
4471 identifier_c param_name("IN"); |
5221 identifier_c param_name("IN"); |
4472 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5222 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4473 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5223 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4474 |
5224 symbol_c *IN_type_symbol = NULL; |
4475 /* Get the value from a foo(<param_value>) style call */ |
5225 |
4476 if (IN_param_value == NULL) |
5226 /* Get the value from a foo(<param_value>) style call */ |
4477 IN_param_value = function_call_param_iterator.next(); |
5227 if (IN_param_value == NULL) |
4478 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5228 IN_param_value = function_call_param_iterator.next(); |
4479 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5229 if (IN_param_value != NULL) { |
4480 |
5230 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4481 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5231 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5232 } |
|
5233 |
|
5234 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4482 { |
5235 { |
4483 |
5236 |
4484 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
5237 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
5238 |
|
5239 if (IN_type_symbol == NULL) |
|
5240 IN_type_symbol = last_type_symbol; |
4485 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5241 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4486 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
5242 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
4487 function_type_prefix = return_type_symbol; |
5243 function_type_prefix = return_type_symbol; |
4488 break; |
5244 break; |
4489 |
5245 |
4505 |
5261 |
4506 { |
5262 { |
4507 identifier_c param_name("IN"); |
5263 identifier_c param_name("IN"); |
4508 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5264 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4509 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5265 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4510 |
5266 symbol_c *IN_type_symbol = NULL; |
4511 /* Get the value from a foo(<param_value>) style call */ |
5267 |
4512 if (IN_param_value == NULL) |
5268 /* Get the value from a foo(<param_value>) style call */ |
4513 IN_param_value = function_call_param_iterator.next(); |
5269 if (IN_param_value == NULL) |
4514 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5270 IN_param_value = function_call_param_iterator.next(); |
4515 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5271 if (IN_param_value != NULL) { |
4516 |
5272 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4517 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5273 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5274 } |
|
5275 |
|
5276 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4518 { |
5277 { |
4519 |
5278 |
4520 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5279 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5280 |
|
5281 if (IN_type_symbol == NULL) |
|
5282 IN_type_symbol = last_type_symbol; |
4521 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5283 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4522 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
5284 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
4523 function_type_prefix = return_type_symbol; |
5285 function_type_prefix = return_type_symbol; |
4524 break; |
5286 break; |
4525 |
5287 |
4541 |
5303 |
4542 { |
5304 { |
4543 identifier_c param_name("IN"); |
5305 identifier_c param_name("IN"); |
4544 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5306 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4545 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5307 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4546 |
5308 symbol_c *IN_type_symbol = NULL; |
4547 /* Get the value from a foo(<param_value>) style call */ |
5309 |
4548 if (IN_param_value == NULL) |
5310 /* Get the value from a foo(<param_value>) style call */ |
4549 IN_param_value = function_call_param_iterator.next(); |
5311 if (IN_param_value == NULL) |
4550 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5312 IN_param_value = function_call_param_iterator.next(); |
4551 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5313 if (IN_param_value != NULL) { |
4552 |
5314 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4553 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5315 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5316 } |
|
5317 |
|
5318 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4554 { |
5319 { |
4555 |
5320 |
4556 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5321 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5322 |
|
5323 if (IN_type_symbol == NULL) |
|
5324 IN_type_symbol = last_type_symbol; |
4557 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5325 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4558 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
5326 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
4559 function_type_prefix = return_type_symbol; |
5327 function_type_prefix = return_type_symbol; |
4560 break; |
5328 break; |
4561 |
5329 |
4577 |
5345 |
4578 { |
5346 { |
4579 identifier_c param_name("IN"); |
5347 identifier_c param_name("IN"); |
4580 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5348 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4581 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5349 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4582 |
5350 symbol_c *IN_type_symbol = NULL; |
4583 /* Get the value from a foo(<param_value>) style call */ |
5351 |
4584 if (IN_param_value == NULL) |
5352 /* Get the value from a foo(<param_value>) style call */ |
4585 IN_param_value = function_call_param_iterator.next(); |
5353 if (IN_param_value == NULL) |
4586 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5354 IN_param_value = function_call_param_iterator.next(); |
4587 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5355 if (IN_param_value != NULL) { |
4588 |
5356 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4589 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5357 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5358 } |
|
5359 |
|
5360 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4590 { |
5361 { |
4591 |
5362 |
4592 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5363 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5364 |
|
5365 if (IN_type_symbol == NULL) |
|
5366 IN_type_symbol = last_type_symbol; |
4593 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5367 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4594 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
5368 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
4595 function_type_prefix = return_type_symbol; |
5369 function_type_prefix = return_type_symbol; |
4596 break; |
5370 break; |
4597 |
5371 |
4613 |
5387 |
4614 { |
5388 { |
4615 identifier_c param_name("IN"); |
5389 identifier_c param_name("IN"); |
4616 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5390 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4617 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5391 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4618 |
5392 symbol_c *IN_type_symbol = NULL; |
4619 /* Get the value from a foo(<param_value>) style call */ |
5393 |
4620 if (IN_param_value == NULL) |
5394 /* Get the value from a foo(<param_value>) style call */ |
4621 IN_param_value = function_call_param_iterator.next(); |
5395 if (IN_param_value == NULL) |
4622 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5396 IN_param_value = function_call_param_iterator.next(); |
4623 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5397 if (IN_param_value != NULL) { |
4624 |
5398 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4625 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5399 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5400 } |
|
5401 |
|
5402 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4626 { |
5403 { |
4627 |
5404 |
4628 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5405 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5406 |
|
5407 if (IN_type_symbol == NULL) |
|
5408 IN_type_symbol = last_type_symbol; |
4629 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5409 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4630 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
5410 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
4631 function_type_prefix = return_type_symbol; |
5411 function_type_prefix = return_type_symbol; |
4632 break; |
5412 break; |
4633 |
5413 |
4649 |
5429 |
4650 { |
5430 { |
4651 identifier_c param_name("IN"); |
5431 identifier_c param_name("IN"); |
4652 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5432 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4653 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5433 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4654 |
5434 symbol_c *IN_type_symbol = NULL; |
4655 /* Get the value from a foo(<param_value>) style call */ |
5435 |
4656 if (IN_param_value == NULL) |
5436 /* Get the value from a foo(<param_value>) style call */ |
4657 IN_param_value = function_call_param_iterator.next(); |
5437 if (IN_param_value == NULL) |
4658 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5438 IN_param_value = function_call_param_iterator.next(); |
4659 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5439 if (IN_param_value != NULL) { |
4660 |
5440 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4661 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5441 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5442 } |
|
5443 |
|
5444 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4662 { |
5445 { |
4663 |
5446 |
4664 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5447 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5448 |
|
5449 if (IN_type_symbol == NULL) |
|
5450 IN_type_symbol = last_type_symbol; |
4665 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5451 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4666 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
5452 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
4667 function_type_prefix = return_type_symbol; |
5453 function_type_prefix = return_type_symbol; |
4668 break; |
5454 break; |
4669 |
5455 |
4685 |
5471 |
4686 { |
5472 { |
4687 identifier_c param_name("IN"); |
5473 identifier_c param_name("IN"); |
4688 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5474 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4689 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5475 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4690 |
5476 symbol_c *IN_type_symbol = NULL; |
4691 /* Get the value from a foo(<param_value>) style call */ |
5477 |
4692 if (IN_param_value == NULL) |
5478 /* Get the value from a foo(<param_value>) style call */ |
4693 IN_param_value = function_call_param_iterator.next(); |
5479 if (IN_param_value == NULL) |
4694 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5480 IN_param_value = function_call_param_iterator.next(); |
4695 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5481 if (IN_param_value != NULL) { |
4696 |
5482 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4697 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5483 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5484 } |
|
5485 |
|
5486 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4698 { |
5487 { |
4699 |
5488 |
4700 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5489 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5490 |
|
5491 if (IN_type_symbol == NULL) |
|
5492 IN_type_symbol = last_type_symbol; |
4701 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5493 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4702 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
5494 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
4703 function_type_prefix = return_type_symbol; |
5495 function_type_prefix = return_type_symbol; |
4704 break; |
5496 break; |
4705 |
5497 |
4721 |
5513 |
4722 { |
5514 { |
4723 identifier_c param_name("IN"); |
5515 identifier_c param_name("IN"); |
4724 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5516 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4725 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5517 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4726 |
5518 symbol_c *IN_type_symbol = NULL; |
4727 /* Get the value from a foo(<param_value>) style call */ |
5519 |
4728 if (IN_param_value == NULL) |
5520 /* Get the value from a foo(<param_value>) style call */ |
4729 IN_param_value = function_call_param_iterator.next(); |
5521 if (IN_param_value == NULL) |
4730 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5522 IN_param_value = function_call_param_iterator.next(); |
4731 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5523 if (IN_param_value != NULL) { |
4732 |
5524 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4733 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5525 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5526 } |
|
5527 |
|
5528 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4734 { |
5529 { |
4735 |
5530 |
4736 function_name = (symbol_c*)(new pragma_c("__tod_to_string")); |
5531 function_name = (symbol_c*)(new pragma_c("__tod_to_string")); |
|
5532 |
|
5533 if (IN_type_symbol == NULL) |
|
5534 IN_type_symbol = last_type_symbol; |
4737 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5535 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4738 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
5536 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
4739 function_type_prefix = return_type_symbol; |
5537 function_type_prefix = return_type_symbol; |
4740 break; |
5538 break; |
4741 |
5539 |
4757 |
5555 |
4758 { |
5556 { |
4759 identifier_c param_name("IN"); |
5557 identifier_c param_name("IN"); |
4760 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5558 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4761 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5559 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4762 |
5560 symbol_c *IN_type_symbol = NULL; |
4763 /* Get the value from a foo(<param_value>) style call */ |
5561 |
4764 if (IN_param_value == NULL) |
5562 /* Get the value from a foo(<param_value>) style call */ |
4765 IN_param_value = function_call_param_iterator.next(); |
5563 if (IN_param_value == NULL) |
4766 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5564 IN_param_value = function_call_param_iterator.next(); |
4767 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5565 if (IN_param_value != NULL) { |
4768 |
5566 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4769 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5567 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5568 } |
|
5569 |
|
5570 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4770 { |
5571 { |
4771 |
5572 |
4772 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5573 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5574 |
|
5575 if (IN_type_symbol == NULL) |
|
5576 IN_type_symbol = last_type_symbol; |
4773 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5577 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4774 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
5578 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
4775 function_type_prefix = return_type_symbol; |
5579 function_type_prefix = return_type_symbol; |
4776 break; |
5580 break; |
4777 |
5581 |
4793 |
5597 |
4794 { |
5598 { |
4795 identifier_c param_name("IN"); |
5599 identifier_c param_name("IN"); |
4796 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5600 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4797 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5601 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4798 |
5602 symbol_c *IN_type_symbol = NULL; |
4799 /* Get the value from a foo(<param_value>) style call */ |
5603 |
4800 if (IN_param_value == NULL) |
5604 /* Get the value from a foo(<param_value>) style call */ |
4801 IN_param_value = function_call_param_iterator.next(); |
5605 if (IN_param_value == NULL) |
4802 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5606 IN_param_value = function_call_param_iterator.next(); |
4803 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5607 if (IN_param_value != NULL) { |
4804 |
5608 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4805 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5609 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5610 } |
|
5611 |
|
5612 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4806 { |
5613 { |
4807 |
5614 |
4808 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5615 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5616 |
|
5617 if (IN_type_symbol == NULL) |
|
5618 IN_type_symbol = last_type_symbol; |
4809 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5619 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4810 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
5620 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
4811 function_type_prefix = return_type_symbol; |
5621 function_type_prefix = return_type_symbol; |
4812 break; |
5622 break; |
4813 |
5623 |
4829 |
5639 |
4830 { |
5640 { |
4831 identifier_c param_name("IN"); |
5641 identifier_c param_name("IN"); |
4832 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5642 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4833 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5643 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4834 |
5644 symbol_c *IN_type_symbol = NULL; |
4835 /* Get the value from a foo(<param_value>) style call */ |
5645 |
4836 if (IN_param_value == NULL) |
5646 /* Get the value from a foo(<param_value>) style call */ |
4837 IN_param_value = function_call_param_iterator.next(); |
5647 if (IN_param_value == NULL) |
4838 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5648 IN_param_value = function_call_param_iterator.next(); |
4839 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5649 if (IN_param_value != NULL) { |
4840 |
5650 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4841 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5651 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5652 } |
|
5653 |
|
5654 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4842 { |
5655 { |
4843 |
5656 |
4844 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
5657 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
5658 |
|
5659 if (IN_type_symbol == NULL) |
|
5660 IN_type_symbol = last_type_symbol; |
4845 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5661 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4846 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
5662 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
4847 function_type_prefix = return_type_symbol; |
5663 function_type_prefix = return_type_symbol; |
4848 break; |
5664 break; |
4849 |
5665 |
4865 |
5681 |
4866 { |
5682 { |
4867 identifier_c param_name("IN"); |
5683 identifier_c param_name("IN"); |
4868 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5684 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4869 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5685 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4870 |
5686 symbol_c *IN_type_symbol = NULL; |
4871 /* Get the value from a foo(<param_value>) style call */ |
5687 |
4872 if (IN_param_value == NULL) |
5688 /* Get the value from a foo(<param_value>) style call */ |
4873 IN_param_value = function_call_param_iterator.next(); |
5689 if (IN_param_value == NULL) |
4874 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5690 IN_param_value = function_call_param_iterator.next(); |
4875 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5691 if (IN_param_value != NULL) { |
4876 |
5692 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4877 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5693 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5694 } |
|
5695 |
|
5696 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4878 { |
5697 { |
4879 |
5698 |
4880 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5699 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5700 |
|
5701 if (IN_type_symbol == NULL) |
|
5702 IN_type_symbol = last_type_symbol; |
4881 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5703 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4882 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
5704 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
4883 function_type_prefix = return_type_symbol; |
5705 function_type_prefix = return_type_symbol; |
4884 break; |
5706 break; |
4885 |
5707 |
4901 |
5723 |
4902 { |
5724 { |
4903 identifier_c param_name("IN"); |
5725 identifier_c param_name("IN"); |
4904 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5726 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4905 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5727 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4906 |
5728 symbol_c *IN_type_symbol = NULL; |
4907 /* Get the value from a foo(<param_value>) style call */ |
5729 |
4908 if (IN_param_value == NULL) |
5730 /* Get the value from a foo(<param_value>) style call */ |
4909 IN_param_value = function_call_param_iterator.next(); |
5731 if (IN_param_value == NULL) |
4910 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5732 IN_param_value = function_call_param_iterator.next(); |
4911 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5733 if (IN_param_value != NULL) { |
4912 |
5734 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4913 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5735 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5736 } |
|
5737 |
|
5738 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4914 { |
5739 { |
4915 |
5740 |
4916 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5741 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5742 |
|
5743 if (IN_type_symbol == NULL) |
|
5744 IN_type_symbol = last_type_symbol; |
4917 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5745 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4918 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
5746 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
4919 function_type_prefix = return_type_symbol; |
5747 function_type_prefix = return_type_symbol; |
4920 break; |
5748 break; |
4921 |
5749 |
4937 |
5765 |
4938 { |
5766 { |
4939 identifier_c param_name("IN"); |
5767 identifier_c param_name("IN"); |
4940 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5768 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4941 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5769 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4942 |
5770 symbol_c *IN_type_symbol = NULL; |
4943 /* Get the value from a foo(<param_value>) style call */ |
5771 |
4944 if (IN_param_value == NULL) |
5772 /* Get the value from a foo(<param_value>) style call */ |
4945 IN_param_value = function_call_param_iterator.next(); |
5773 if (IN_param_value == NULL) |
4946 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5774 IN_param_value = function_call_param_iterator.next(); |
4947 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5775 if (IN_param_value != NULL) { |
4948 |
5776 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4949 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5777 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5778 } |
|
5779 |
|
5780 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4950 { |
5781 { |
4951 |
5782 |
4952 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5783 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5784 |
|
5785 if (IN_type_symbol == NULL) |
|
5786 IN_type_symbol = last_type_symbol; |
4953 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5787 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4954 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
5788 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
4955 function_type_prefix = return_type_symbol; |
5789 function_type_prefix = return_type_symbol; |
4956 break; |
5790 break; |
4957 |
5791 |
4973 |
5807 |
4974 { |
5808 { |
4975 identifier_c param_name("IN"); |
5809 identifier_c param_name("IN"); |
4976 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5810 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
4977 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5811 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
4978 |
5812 symbol_c *IN_type_symbol = NULL; |
4979 /* Get the value from a foo(<param_value>) style call */ |
5813 |
4980 if (IN_param_value == NULL) |
5814 /* Get the value from a foo(<param_value>) style call */ |
4981 IN_param_value = function_call_param_iterator.next(); |
5815 if (IN_param_value == NULL) |
4982 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5816 IN_param_value = function_call_param_iterator.next(); |
4983 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5817 if (IN_param_value != NULL) { |
4984 |
5818 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
4985 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
5819 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
5820 } |
|
5821 |
|
5822 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
4986 { |
5823 { |
4987 |
5824 |
4988 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
5825 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
5826 |
|
5827 if (IN_type_symbol == NULL) |
|
5828 IN_type_symbol = last_type_symbol; |
4989 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5829 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
4990 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
5830 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
4991 function_type_prefix = return_type_symbol; |
5831 function_type_prefix = return_type_symbol; |
4992 break; |
5832 break; |
4993 |
5833 |
5009 |
5849 |
5010 { |
5850 { |
5011 identifier_c param_name("IN"); |
5851 identifier_c param_name("IN"); |
5012 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5852 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5013 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5853 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5014 |
5854 symbol_c *IN_type_symbol = NULL; |
5015 /* Get the value from a foo(<param_value>) style call */ |
5855 |
5016 if (IN_param_value == NULL) |
5856 /* Get the value from a foo(<param_value>) style call */ |
5017 IN_param_value = function_call_param_iterator.next(); |
5857 if (IN_param_value == NULL) |
5018 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5858 IN_param_value = function_call_param_iterator.next(); |
5019 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5859 if (IN_param_value != NULL) { |
5020 |
5860 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5021 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
5861 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5022 { |
5862 } |
5023 |
5863 |
|
5864 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5865 { |
|
5866 |
|
5867 |
|
5868 if (IN_type_symbol == NULL) |
|
5869 IN_type_symbol = last_type_symbol; |
5024 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5870 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5025 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
5871 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
5026 function_type_prefix = return_type_symbol; |
5872 function_type_prefix = return_type_symbol; |
5027 break; |
5873 break; |
5028 |
5874 |
5044 |
5890 |
5045 { |
5891 { |
5046 identifier_c param_name("IN"); |
5892 identifier_c param_name("IN"); |
5047 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5893 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5048 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5894 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5049 |
5895 symbol_c *IN_type_symbol = NULL; |
5050 /* Get the value from a foo(<param_value>) style call */ |
5896 |
5051 if (IN_param_value == NULL) |
5897 /* Get the value from a foo(<param_value>) style call */ |
5052 IN_param_value = function_call_param_iterator.next(); |
5898 if (IN_param_value == NULL) |
5053 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5899 IN_param_value = function_call_param_iterator.next(); |
5054 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5900 if (IN_param_value != NULL) { |
5055 |
5901 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5056 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
5902 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5057 { |
5903 } |
5058 |
5904 |
|
5905 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5906 { |
|
5907 |
|
5908 |
|
5909 if (IN_type_symbol == NULL) |
|
5910 IN_type_symbol = last_type_symbol; |
5059 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5911 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5060 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
5912 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
5061 function_type_prefix = return_type_symbol; |
5913 function_type_prefix = return_type_symbol; |
5062 break; |
5914 break; |
5063 |
5915 |
5079 |
5931 |
5080 { |
5932 { |
5081 identifier_c param_name("IN"); |
5933 identifier_c param_name("IN"); |
5082 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5934 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5083 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5935 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5084 |
5936 symbol_c *IN_type_symbol = NULL; |
5085 /* Get the value from a foo(<param_value>) style call */ |
5937 |
5086 if (IN_param_value == NULL) |
5938 /* Get the value from a foo(<param_value>) style call */ |
5087 IN_param_value = function_call_param_iterator.next(); |
5939 if (IN_param_value == NULL) |
5088 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5940 IN_param_value = function_call_param_iterator.next(); |
5089 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5941 if (IN_param_value != NULL) { |
5090 |
5942 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5091 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
5943 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5092 { |
5944 } |
5093 |
5945 |
|
5946 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5947 { |
|
5948 |
|
5949 |
|
5950 if (IN_type_symbol == NULL) |
|
5951 IN_type_symbol = last_type_symbol; |
5094 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5952 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5095 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
5953 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
5096 function_type_prefix = return_type_symbol; |
5954 function_type_prefix = return_type_symbol; |
5097 break; |
5955 break; |
5098 |
5956 |
5114 |
5972 |
5115 { |
5973 { |
5116 identifier_c param_name("IN"); |
5974 identifier_c param_name("IN"); |
5117 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5975 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5118 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5976 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5119 |
5977 symbol_c *IN_type_symbol = NULL; |
5120 /* Get the value from a foo(<param_value>) style call */ |
5978 |
5121 if (IN_param_value == NULL) |
5979 /* Get the value from a foo(<param_value>) style call */ |
5122 IN_param_value = function_call_param_iterator.next(); |
5980 if (IN_param_value == NULL) |
5123 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5981 IN_param_value = function_call_param_iterator.next(); |
5124 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5982 if (IN_param_value != NULL) { |
5125 |
5983 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5126 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
5984 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5127 { |
5985 } |
5128 |
5986 |
|
5987 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
5988 { |
|
5989 |
|
5990 |
|
5991 if (IN_type_symbol == NULL) |
|
5992 IN_type_symbol = last_type_symbol; |
5129 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5993 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5130 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
5994 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
5131 function_type_prefix = return_type_symbol; |
5995 function_type_prefix = return_type_symbol; |
5132 break; |
5996 break; |
5133 |
5997 |
5149 |
6013 |
5150 { |
6014 { |
5151 identifier_c param_name("IN"); |
6015 identifier_c param_name("IN"); |
5152 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6016 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5153 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6017 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5154 |
6018 symbol_c *IN_type_symbol = NULL; |
5155 /* Get the value from a foo(<param_value>) style call */ |
6019 |
5156 if (IN_param_value == NULL) |
6020 /* Get the value from a foo(<param_value>) style call */ |
5157 IN_param_value = function_call_param_iterator.next(); |
6021 if (IN_param_value == NULL) |
5158 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6022 IN_param_value = function_call_param_iterator.next(); |
5159 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6023 if (IN_param_value != NULL) { |
5160 |
6024 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5161 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6025 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
6026 } |
|
6027 |
|
6028 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
5162 { |
6029 { |
5163 |
6030 |
5164 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
6031 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6032 |
|
6033 if (IN_type_symbol == NULL) |
|
6034 IN_type_symbol = last_type_symbol; |
5165 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6035 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5166 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
6036 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
5167 function_type_prefix = return_type_symbol; |
6037 function_type_prefix = return_type_symbol; |
5168 break; |
6038 break; |
5169 |
6039 |
5185 |
6055 |
5186 { |
6056 { |
5187 identifier_c param_name("IN"); |
6057 identifier_c param_name("IN"); |
5188 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6058 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5189 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6059 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5190 |
6060 symbol_c *IN_type_symbol = NULL; |
5191 /* Get the value from a foo(<param_value>) style call */ |
6061 |
5192 if (IN_param_value == NULL) |
6062 /* Get the value from a foo(<param_value>) style call */ |
5193 IN_param_value = function_call_param_iterator.next(); |
6063 if (IN_param_value == NULL) |
5194 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6064 IN_param_value = function_call_param_iterator.next(); |
5195 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6065 if (IN_param_value != NULL) { |
5196 |
6066 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5197 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6067 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5198 { |
6068 } |
5199 |
6069 |
|
6070 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
6071 { |
|
6072 |
|
6073 |
|
6074 if (IN_type_symbol == NULL) |
|
6075 IN_type_symbol = last_type_symbol; |
5200 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6076 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5201 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
6077 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
5202 function_type_prefix = return_type_symbol; |
6078 function_type_prefix = return_type_symbol; |
5203 break; |
6079 break; |
5204 |
6080 |
5220 |
6096 |
5221 { |
6097 { |
5222 identifier_c param_name("IN"); |
6098 identifier_c param_name("IN"); |
5223 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6099 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5224 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6100 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5225 |
6101 symbol_c *IN_type_symbol = NULL; |
5226 /* Get the value from a foo(<param_value>) style call */ |
6102 |
5227 if (IN_param_value == NULL) |
6103 /* Get the value from a foo(<param_value>) style call */ |
5228 IN_param_value = function_call_param_iterator.next(); |
6104 if (IN_param_value == NULL) |
5229 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6105 IN_param_value = function_call_param_iterator.next(); |
5230 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6106 if (IN_param_value != NULL) { |
5231 |
6107 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5232 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6108 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
6109 } |
|
6110 |
|
6111 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
5233 { |
6112 { |
5234 |
6113 |
5235 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
6114 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6115 |
|
6116 if (IN_type_symbol == NULL) |
|
6117 IN_type_symbol = last_type_symbol; |
5236 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6118 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5237 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
6119 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
5238 function_type_prefix = return_type_symbol; |
6120 function_type_prefix = return_type_symbol; |
5239 break; |
6121 break; |
5240 |
6122 |
5256 |
6138 |
5257 { |
6139 { |
5258 identifier_c param_name("IN"); |
6140 identifier_c param_name("IN"); |
5259 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6141 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5260 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6142 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5261 |
6143 symbol_c *IN_type_symbol = NULL; |
5262 /* Get the value from a foo(<param_value>) style call */ |
6144 |
5263 if (IN_param_value == NULL) |
6145 /* Get the value from a foo(<param_value>) style call */ |
5264 IN_param_value = function_call_param_iterator.next(); |
6146 if (IN_param_value == NULL) |
5265 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6147 IN_param_value = function_call_param_iterator.next(); |
5266 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6148 if (IN_param_value != NULL) { |
5267 |
6149 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5268 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6150 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
6151 } |
|
6152 |
|
6153 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
5269 { |
6154 { |
5270 |
6155 |
5271 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
6156 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6157 |
|
6158 if (IN_type_symbol == NULL) |
|
6159 IN_type_symbol = last_type_symbol; |
5272 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6160 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5273 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
6161 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
5274 function_type_prefix = return_type_symbol; |
6162 function_type_prefix = return_type_symbol; |
5275 break; |
6163 break; |
5276 |
6164 |
5292 |
6180 |
5293 { |
6181 { |
5294 identifier_c param_name("IN"); |
6182 identifier_c param_name("IN"); |
5295 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6183 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5296 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6184 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5297 |
6185 symbol_c *IN_type_symbol = NULL; |
5298 /* Get the value from a foo(<param_value>) style call */ |
6186 |
5299 if (IN_param_value == NULL) |
6187 /* Get the value from a foo(<param_value>) style call */ |
5300 IN_param_value = function_call_param_iterator.next(); |
6188 if (IN_param_value == NULL) |
5301 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6189 IN_param_value = function_call_param_iterator.next(); |
5302 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6190 if (IN_param_value != NULL) { |
5303 |
6191 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5304 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6192 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5305 { |
6193 } |
5306 |
6194 |
|
6195 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
6196 { |
|
6197 |
|
6198 |
|
6199 if (IN_type_symbol == NULL) |
|
6200 IN_type_symbol = last_type_symbol; |
5307 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6201 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5308 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
6202 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
5309 function_type_prefix = return_type_symbol; |
6203 function_type_prefix = return_type_symbol; |
5310 break; |
6204 break; |
5311 |
6205 |
5327 |
6221 |
5328 { |
6222 { |
5329 identifier_c param_name("IN"); |
6223 identifier_c param_name("IN"); |
5330 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6224 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5331 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6225 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5332 |
6226 symbol_c *IN_type_symbol = NULL; |
5333 /* Get the value from a foo(<param_value>) style call */ |
6227 |
5334 if (IN_param_value == NULL) |
6228 /* Get the value from a foo(<param_value>) style call */ |
5335 IN_param_value = function_call_param_iterator.next(); |
6229 if (IN_param_value == NULL) |
5336 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6230 IN_param_value = function_call_param_iterator.next(); |
5337 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6231 if (IN_param_value != NULL) { |
5338 |
6232 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5339 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6233 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
6234 } |
|
6235 |
|
6236 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
5340 { |
6237 { |
5341 |
6238 |
5342 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
6239 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
6240 |
|
6241 if (IN_type_symbol == NULL) |
|
6242 IN_type_symbol = last_type_symbol; |
5343 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6243 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5344 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
6244 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
5345 function_type_prefix = return_type_symbol; |
6245 function_type_prefix = return_type_symbol; |
5346 break; |
6246 break; |
5347 |
6247 |
5363 |
6263 |
5364 { |
6264 { |
5365 identifier_c param_name("IN"); |
6265 identifier_c param_name("IN"); |
5366 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6266 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5367 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6267 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5368 |
6268 symbol_c *IN_type_symbol = NULL; |
5369 /* Get the value from a foo(<param_value>) style call */ |
6269 |
5370 if (IN_param_value == NULL) |
6270 /* Get the value from a foo(<param_value>) style call */ |
5371 IN_param_value = function_call_param_iterator.next(); |
6271 if (IN_param_value == NULL) |
5372 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6272 IN_param_value = function_call_param_iterator.next(); |
5373 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6273 if (IN_param_value != NULL) { |
5374 |
6274 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5375 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6275 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5376 { |
6276 } |
5377 |
6277 |
|
6278 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
6279 { |
|
6280 |
|
6281 |
|
6282 if (IN_type_symbol == NULL) |
|
6283 IN_type_symbol = last_type_symbol; |
5378 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6284 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5379 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
6285 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
5380 function_type_prefix = return_type_symbol; |
6286 function_type_prefix = return_type_symbol; |
5381 break; |
6287 break; |
5382 |
6288 |
5398 |
6304 |
5399 { |
6305 { |
5400 identifier_c param_name("IN"); |
6306 identifier_c param_name("IN"); |
5401 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6307 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5402 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6308 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5403 |
6309 symbol_c *IN_type_symbol = NULL; |
5404 /* Get the value from a foo(<param_value>) style call */ |
6310 |
5405 if (IN_param_value == NULL) |
6311 /* Get the value from a foo(<param_value>) style call */ |
5406 IN_param_value = function_call_param_iterator.next(); |
6312 if (IN_param_value == NULL) |
5407 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6313 IN_param_value = function_call_param_iterator.next(); |
5408 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6314 if (IN_param_value != NULL) { |
5409 |
6315 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5410 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6316 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5411 { |
6317 } |
5412 |
6318 |
|
6319 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
6320 { |
|
6321 |
|
6322 |
|
6323 if (IN_type_symbol == NULL) |
|
6324 IN_type_symbol = last_type_symbol; |
5413 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6325 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5414 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
6326 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
5415 function_type_prefix = return_type_symbol; |
6327 function_type_prefix = return_type_symbol; |
5416 break; |
6328 break; |
5417 |
6329 |
5433 |
6345 |
5434 { |
6346 { |
5435 identifier_c param_name("IN"); |
6347 identifier_c param_name("IN"); |
5436 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6348 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5437 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6349 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5438 |
6350 symbol_c *IN_type_symbol = NULL; |
5439 /* Get the value from a foo(<param_value>) style call */ |
6351 |
5440 if (IN_param_value == NULL) |
6352 /* Get the value from a foo(<param_value>) style call */ |
5441 IN_param_value = function_call_param_iterator.next(); |
6353 if (IN_param_value == NULL) |
5442 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6354 IN_param_value = function_call_param_iterator.next(); |
5443 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6355 if (IN_param_value != NULL) { |
5444 |
6356 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5445 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6357 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5446 { |
6358 } |
5447 |
6359 |
|
6360 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
6361 { |
|
6362 |
|
6363 |
|
6364 if (IN_type_symbol == NULL) |
|
6365 IN_type_symbol = last_type_symbol; |
5448 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6366 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5449 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
6367 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
5450 function_type_prefix = return_type_symbol; |
6368 function_type_prefix = return_type_symbol; |
5451 break; |
6369 break; |
5452 |
6370 |
5468 |
6386 |
5469 { |
6387 { |
5470 identifier_c param_name("IN"); |
6388 identifier_c param_name("IN"); |
5471 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6389 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5472 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6390 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5473 |
6391 symbol_c *IN_type_symbol = NULL; |
5474 /* Get the value from a foo(<param_value>) style call */ |
6392 |
5475 if (IN_param_value == NULL) |
6393 /* Get the value from a foo(<param_value>) style call */ |
5476 IN_param_value = function_call_param_iterator.next(); |
6394 if (IN_param_value == NULL) |
5477 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6395 IN_param_value = function_call_param_iterator.next(); |
5478 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6396 if (IN_param_value != NULL) { |
5479 |
6397 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5480 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6398 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5481 { |
6399 } |
5482 |
6400 |
|
6401 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
6402 { |
|
6403 |
|
6404 |
|
6405 if (IN_type_symbol == NULL) |
|
6406 IN_type_symbol = last_type_symbol; |
5483 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6407 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5484 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
6408 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
5485 function_type_prefix = return_type_symbol; |
6409 function_type_prefix = return_type_symbol; |
5486 break; |
6410 break; |
5487 |
6411 |
5503 |
6427 |
5504 { |
6428 { |
5505 identifier_c param_name("IN"); |
6429 identifier_c param_name("IN"); |
5506 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6430 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5507 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6431 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5508 |
6432 symbol_c *IN_type_symbol = NULL; |
5509 /* Get the value from a foo(<param_value>) style call */ |
6433 |
5510 if (IN_param_value == NULL) |
6434 /* Get the value from a foo(<param_value>) style call */ |
5511 IN_param_value = function_call_param_iterator.next(); |
6435 if (IN_param_value == NULL) |
5512 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6436 IN_param_value = function_call_param_iterator.next(); |
5513 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6437 if (IN_param_value != NULL) { |
5514 |
6438 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5515 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6439 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5516 { |
6440 } |
5517 |
6441 |
|
6442 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
6443 { |
|
6444 |
|
6445 |
|
6446 if (IN_type_symbol == NULL) |
|
6447 IN_type_symbol = last_type_symbol; |
5518 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6448 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5519 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
6449 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
5520 function_type_prefix = return_type_symbol; |
6450 function_type_prefix = return_type_symbol; |
5521 break; |
6451 break; |
5522 |
6452 |
5538 |
6468 |
5539 { |
6469 { |
5540 identifier_c param_name("IN"); |
6470 identifier_c param_name("IN"); |
5541 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6471 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5542 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6472 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5543 |
6473 symbol_c *IN_type_symbol = NULL; |
5544 /* Get the value from a foo(<param_value>) style call */ |
6474 |
5545 if (IN_param_value == NULL) |
6475 /* Get the value from a foo(<param_value>) style call */ |
5546 IN_param_value = function_call_param_iterator.next(); |
6476 if (IN_param_value == NULL) |
5547 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6477 IN_param_value = function_call_param_iterator.next(); |
5548 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6478 if (IN_param_value != NULL) { |
5549 |
6479 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5550 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6480 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5551 { |
6481 } |
5552 |
6482 |
|
6483 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
6484 { |
|
6485 |
|
6486 |
|
6487 if (IN_type_symbol == NULL) |
|
6488 IN_type_symbol = last_type_symbol; |
5553 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6489 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5554 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
6490 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
5555 function_type_prefix = return_type_symbol; |
6491 function_type_prefix = return_type_symbol; |
5556 break; |
6492 break; |
5557 |
6493 |
5573 |
6509 |
5574 { |
6510 { |
5575 identifier_c param_name("IN"); |
6511 identifier_c param_name("IN"); |
5576 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6512 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5577 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6513 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5578 |
6514 symbol_c *IN_type_symbol = NULL; |
5579 /* Get the value from a foo(<param_value>) style call */ |
6515 |
5580 if (IN_param_value == NULL) |
6516 /* Get the value from a foo(<param_value>) style call */ |
5581 IN_param_value = function_call_param_iterator.next(); |
6517 if (IN_param_value == NULL) |
5582 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6518 IN_param_value = function_call_param_iterator.next(); |
5583 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6519 if (IN_param_value != NULL) { |
5584 |
6520 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5585 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6521 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5586 { |
6522 } |
5587 |
6523 |
|
6524 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
6525 { |
|
6526 |
|
6527 |
|
6528 if (IN_type_symbol == NULL) |
|
6529 IN_type_symbol = last_type_symbol; |
5588 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6530 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5589 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
6531 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
5590 function_type_prefix = return_type_symbol; |
6532 function_type_prefix = return_type_symbol; |
5591 break; |
6533 break; |
5592 |
6534 |
5608 |
6550 |
5609 { |
6551 { |
5610 identifier_c param_name("IN"); |
6552 identifier_c param_name("IN"); |
5611 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6553 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5612 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6554 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5613 |
6555 symbol_c *IN_type_symbol = NULL; |
5614 /* Get the value from a foo(<param_value>) style call */ |
6556 |
5615 if (IN_param_value == NULL) |
6557 /* Get the value from a foo(<param_value>) style call */ |
5616 IN_param_value = function_call_param_iterator.next(); |
6558 if (IN_param_value == NULL) |
5617 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6559 IN_param_value = function_call_param_iterator.next(); |
5618 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6560 if (IN_param_value != NULL) { |
5619 |
6561 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5620 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6562 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
6563 } |
|
6564 |
|
6565 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
5621 { |
6566 { |
5622 |
6567 |
5623 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
6568 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6569 |
|
6570 if (IN_type_symbol == NULL) |
|
6571 IN_type_symbol = last_type_symbol; |
5624 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6572 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5625 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
6573 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
5626 function_type_prefix = return_type_symbol; |
6574 function_type_prefix = return_type_symbol; |
5627 break; |
6575 break; |
5628 |
6576 |
5644 |
6592 |
5645 { |
6593 { |
5646 identifier_c param_name("IN"); |
6594 identifier_c param_name("IN"); |
5647 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6595 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5648 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6596 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5649 |
6597 symbol_c *IN_type_symbol = NULL; |
5650 /* Get the value from a foo(<param_value>) style call */ |
6598 |
5651 if (IN_param_value == NULL) |
6599 /* Get the value from a foo(<param_value>) style call */ |
5652 IN_param_value = function_call_param_iterator.next(); |
6600 if (IN_param_value == NULL) |
5653 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6601 IN_param_value = function_call_param_iterator.next(); |
5654 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6602 if (IN_param_value != NULL) { |
5655 |
6603 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5656 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
6604 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5657 { |
6605 } |
5658 |
6606 |
|
6607 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
|
6608 { |
|
6609 |
|
6610 |
|
6611 if (IN_type_symbol == NULL) |
|
6612 IN_type_symbol = last_type_symbol; |
5659 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6613 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5660 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
6614 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
5661 function_type_prefix = return_type_symbol; |
6615 function_type_prefix = return_type_symbol; |
5662 break; |
6616 break; |
5663 |
6617 |
5679 |
6633 |
5680 { |
6634 { |
5681 identifier_c param_name("IN"); |
6635 identifier_c param_name("IN"); |
5682 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6636 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5683 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6637 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5684 |
6638 symbol_c *IN_type_symbol = NULL; |
5685 /* Get the value from a foo(<param_value>) style call */ |
6639 |
5686 if (IN_param_value == NULL) |
6640 /* Get the value from a foo(<param_value>) style call */ |
5687 IN_param_value = function_call_param_iterator.next(); |
6641 if (IN_param_value == NULL) |
5688 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6642 IN_param_value = function_call_param_iterator.next(); |
5689 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6643 if (IN_param_value != NULL) { |
5690 |
6644 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5691 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6645 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5692 { |
6646 } |
5693 |
6647 |
|
6648 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6649 { |
|
6650 |
|
6651 |
|
6652 if (IN_type_symbol == NULL) |
|
6653 IN_type_symbol = last_type_symbol; |
5694 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6654 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5695 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
6655 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
5696 function_type_prefix = return_type_symbol; |
6656 function_type_prefix = return_type_symbol; |
5697 break; |
6657 break; |
5698 |
6658 |
5714 |
6674 |
5715 { |
6675 { |
5716 identifier_c param_name("IN"); |
6676 identifier_c param_name("IN"); |
5717 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6677 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5718 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6678 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5719 |
6679 symbol_c *IN_type_symbol = NULL; |
5720 /* Get the value from a foo(<param_value>) style call */ |
6680 |
5721 if (IN_param_value == NULL) |
6681 /* Get the value from a foo(<param_value>) style call */ |
5722 IN_param_value = function_call_param_iterator.next(); |
6682 if (IN_param_value == NULL) |
5723 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6683 IN_param_value = function_call_param_iterator.next(); |
5724 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6684 if (IN_param_value != NULL) { |
5725 |
6685 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5726 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6686 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5727 { |
6687 } |
5728 |
6688 |
|
6689 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6690 { |
|
6691 |
|
6692 |
|
6693 if (IN_type_symbol == NULL) |
|
6694 IN_type_symbol = last_type_symbol; |
5729 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6695 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5730 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
6696 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
5731 function_type_prefix = return_type_symbol; |
6697 function_type_prefix = return_type_symbol; |
5732 break; |
6698 break; |
5733 |
6699 |
5749 |
6715 |
5750 { |
6716 { |
5751 identifier_c param_name("IN"); |
6717 identifier_c param_name("IN"); |
5752 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6718 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5753 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6719 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5754 |
6720 symbol_c *IN_type_symbol = NULL; |
5755 /* Get the value from a foo(<param_value>) style call */ |
6721 |
5756 if (IN_param_value == NULL) |
6722 /* Get the value from a foo(<param_value>) style call */ |
5757 IN_param_value = function_call_param_iterator.next(); |
6723 if (IN_param_value == NULL) |
5758 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6724 IN_param_value = function_call_param_iterator.next(); |
5759 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6725 if (IN_param_value != NULL) { |
5760 |
6726 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5761 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6727 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5762 { |
6728 } |
5763 |
6729 |
|
6730 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6731 { |
|
6732 |
|
6733 |
|
6734 if (IN_type_symbol == NULL) |
|
6735 IN_type_symbol = last_type_symbol; |
5764 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6736 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5765 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
6737 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
5766 function_type_prefix = return_type_symbol; |
6738 function_type_prefix = return_type_symbol; |
5767 break; |
6739 break; |
5768 |
6740 |
5784 |
6756 |
5785 { |
6757 { |
5786 identifier_c param_name("IN"); |
6758 identifier_c param_name("IN"); |
5787 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6759 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5788 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6760 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5789 |
6761 symbol_c *IN_type_symbol = NULL; |
5790 /* Get the value from a foo(<param_value>) style call */ |
6762 |
5791 if (IN_param_value == NULL) |
6763 /* Get the value from a foo(<param_value>) style call */ |
5792 IN_param_value = function_call_param_iterator.next(); |
6764 if (IN_param_value == NULL) |
5793 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6765 IN_param_value = function_call_param_iterator.next(); |
5794 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6766 if (IN_param_value != NULL) { |
5795 |
6767 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5796 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6768 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5797 { |
6769 } |
5798 |
6770 |
|
6771 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6772 { |
|
6773 |
|
6774 |
|
6775 if (IN_type_symbol == NULL) |
|
6776 IN_type_symbol = last_type_symbol; |
5799 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6777 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5800 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
6778 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
5801 function_type_prefix = return_type_symbol; |
6779 function_type_prefix = return_type_symbol; |
5802 break; |
6780 break; |
5803 |
6781 |
5819 |
6797 |
5820 { |
6798 { |
5821 identifier_c param_name("IN"); |
6799 identifier_c param_name("IN"); |
5822 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6800 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5823 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6801 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5824 |
6802 symbol_c *IN_type_symbol = NULL; |
5825 /* Get the value from a foo(<param_value>) style call */ |
6803 |
5826 if (IN_param_value == NULL) |
6804 /* Get the value from a foo(<param_value>) style call */ |
5827 IN_param_value = function_call_param_iterator.next(); |
6805 if (IN_param_value == NULL) |
5828 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6806 IN_param_value = function_call_param_iterator.next(); |
5829 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6807 if (IN_param_value != NULL) { |
5830 |
6808 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5831 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6809 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
6810 } |
|
6811 |
|
6812 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
5832 { |
6813 { |
5833 |
6814 |
5834 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
6815 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6816 |
|
6817 if (IN_type_symbol == NULL) |
|
6818 IN_type_symbol = last_type_symbol; |
5835 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6819 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5836 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
6820 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
5837 function_type_prefix = return_type_symbol; |
6821 function_type_prefix = return_type_symbol; |
5838 break; |
6822 break; |
5839 |
6823 |
5855 |
6839 |
5856 { |
6840 { |
5857 identifier_c param_name("IN"); |
6841 identifier_c param_name("IN"); |
5858 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6842 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5859 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6843 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5860 |
6844 symbol_c *IN_type_symbol = NULL; |
5861 /* Get the value from a foo(<param_value>) style call */ |
6845 |
5862 if (IN_param_value == NULL) |
6846 /* Get the value from a foo(<param_value>) style call */ |
5863 IN_param_value = function_call_param_iterator.next(); |
6847 if (IN_param_value == NULL) |
5864 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6848 IN_param_value = function_call_param_iterator.next(); |
5865 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6849 if (IN_param_value != NULL) { |
5866 |
6850 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5867 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6851 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5868 { |
6852 } |
5869 |
6853 |
|
6854 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6855 { |
|
6856 |
|
6857 |
|
6858 if (IN_type_symbol == NULL) |
|
6859 IN_type_symbol = last_type_symbol; |
5870 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6860 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5871 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
6861 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
5872 function_type_prefix = return_type_symbol; |
6862 function_type_prefix = return_type_symbol; |
5873 break; |
6863 break; |
5874 |
6864 |
5890 |
6880 |
5891 { |
6881 { |
5892 identifier_c param_name("IN"); |
6882 identifier_c param_name("IN"); |
5893 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6883 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5894 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6884 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5895 |
6885 symbol_c *IN_type_symbol = NULL; |
5896 /* Get the value from a foo(<param_value>) style call */ |
6886 |
5897 if (IN_param_value == NULL) |
6887 /* Get the value from a foo(<param_value>) style call */ |
5898 IN_param_value = function_call_param_iterator.next(); |
6888 if (IN_param_value == NULL) |
5899 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6889 IN_param_value = function_call_param_iterator.next(); |
5900 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6890 if (IN_param_value != NULL) { |
5901 |
6891 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5902 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6892 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
6893 } |
|
6894 |
|
6895 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
5903 { |
6896 { |
5904 |
6897 |
5905 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
6898 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6899 |
|
6900 if (IN_type_symbol == NULL) |
|
6901 IN_type_symbol = last_type_symbol; |
5906 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6902 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5907 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
6903 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
5908 function_type_prefix = return_type_symbol; |
6904 function_type_prefix = return_type_symbol; |
5909 break; |
6905 break; |
5910 |
6906 |
5926 |
6922 |
5927 { |
6923 { |
5928 identifier_c param_name("IN"); |
6924 identifier_c param_name("IN"); |
5929 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6925 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5930 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6926 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5931 |
6927 symbol_c *IN_type_symbol = NULL; |
5932 /* Get the value from a foo(<param_value>) style call */ |
6928 |
5933 if (IN_param_value == NULL) |
6929 /* Get the value from a foo(<param_value>) style call */ |
5934 IN_param_value = function_call_param_iterator.next(); |
6930 if (IN_param_value == NULL) |
5935 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6931 IN_param_value = function_call_param_iterator.next(); |
5936 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6932 if (IN_param_value != NULL) { |
5937 |
6933 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5938 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6934 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
6935 } |
|
6936 |
|
6937 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
5939 { |
6938 { |
5940 |
6939 |
5941 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
6940 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
6941 |
|
6942 if (IN_type_symbol == NULL) |
|
6943 IN_type_symbol = last_type_symbol; |
5942 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6944 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5943 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
6945 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
5944 function_type_prefix = return_type_symbol; |
6946 function_type_prefix = return_type_symbol; |
5945 break; |
6947 break; |
5946 |
6948 |
5962 |
6964 |
5963 { |
6965 { |
5964 identifier_c param_name("IN"); |
6966 identifier_c param_name("IN"); |
5965 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6967 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
5966 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6968 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
5967 |
6969 symbol_c *IN_type_symbol = NULL; |
5968 /* Get the value from a foo(<param_value>) style call */ |
6970 |
5969 if (IN_param_value == NULL) |
6971 /* Get the value from a foo(<param_value>) style call */ |
5970 IN_param_value = function_call_param_iterator.next(); |
6972 if (IN_param_value == NULL) |
5971 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6973 IN_param_value = function_call_param_iterator.next(); |
5972 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6974 if (IN_param_value != NULL) { |
5973 |
6975 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
5974 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6976 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
5975 { |
6977 } |
5976 |
6978 |
|
6979 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
6980 { |
|
6981 |
|
6982 |
|
6983 if (IN_type_symbol == NULL) |
|
6984 IN_type_symbol = last_type_symbol; |
5977 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6985 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
5978 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
6986 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
5979 function_type_prefix = return_type_symbol; |
6987 function_type_prefix = return_type_symbol; |
5980 break; |
6988 break; |
5981 |
6989 |
5997 |
7005 |
5998 { |
7006 { |
5999 identifier_c param_name("IN"); |
7007 identifier_c param_name("IN"); |
6000 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7008 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6001 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7009 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6002 |
7010 symbol_c *IN_type_symbol = NULL; |
6003 /* Get the value from a foo(<param_value>) style call */ |
7011 |
6004 if (IN_param_value == NULL) |
7012 /* Get the value from a foo(<param_value>) style call */ |
6005 IN_param_value = function_call_param_iterator.next(); |
7013 if (IN_param_value == NULL) |
6006 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7014 IN_param_value = function_call_param_iterator.next(); |
6007 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7015 if (IN_param_value != NULL) { |
6008 |
7016 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6009 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
7017 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7018 } |
|
7019 |
|
7020 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6010 { |
7021 { |
6011 |
7022 |
6012 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
7023 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
7024 |
|
7025 if (IN_type_symbol == NULL) |
|
7026 IN_type_symbol = last_type_symbol; |
6013 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7027 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6014 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
7028 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
6015 function_type_prefix = return_type_symbol; |
7029 function_type_prefix = return_type_symbol; |
6016 break; |
7030 break; |
6017 |
7031 |
6033 |
7047 |
6034 { |
7048 { |
6035 identifier_c param_name("IN"); |
7049 identifier_c param_name("IN"); |
6036 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7050 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6037 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7051 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6038 |
7052 symbol_c *IN_type_symbol = NULL; |
6039 /* Get the value from a foo(<param_value>) style call */ |
7053 |
6040 if (IN_param_value == NULL) |
7054 /* Get the value from a foo(<param_value>) style call */ |
6041 IN_param_value = function_call_param_iterator.next(); |
7055 if (IN_param_value == NULL) |
6042 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7056 IN_param_value = function_call_param_iterator.next(); |
6043 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7057 if (IN_param_value != NULL) { |
6044 |
7058 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6045 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
7059 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6046 { |
7060 } |
6047 |
7061 |
|
7062 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
7063 { |
|
7064 |
|
7065 |
|
7066 if (IN_type_symbol == NULL) |
|
7067 IN_type_symbol = last_type_symbol; |
6048 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7068 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6049 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
7069 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
6050 function_type_prefix = return_type_symbol; |
7070 function_type_prefix = return_type_symbol; |
6051 break; |
7071 break; |
6052 |
7072 |
6068 |
7088 |
6069 { |
7089 { |
6070 identifier_c param_name("IN"); |
7090 identifier_c param_name("IN"); |
6071 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7091 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6072 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7092 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6073 |
7093 symbol_c *IN_type_symbol = NULL; |
6074 /* Get the value from a foo(<param_value>) style call */ |
7094 |
6075 if (IN_param_value == NULL) |
7095 /* Get the value from a foo(<param_value>) style call */ |
6076 IN_param_value = function_call_param_iterator.next(); |
7096 if (IN_param_value == NULL) |
6077 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7097 IN_param_value = function_call_param_iterator.next(); |
6078 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7098 if (IN_param_value != NULL) { |
6079 |
7099 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6080 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
7100 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6081 { |
7101 } |
6082 |
7102 |
|
7103 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
7104 { |
|
7105 |
|
7106 |
|
7107 if (IN_type_symbol == NULL) |
|
7108 IN_type_symbol = last_type_symbol; |
6083 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7109 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6084 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
7110 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
6085 function_type_prefix = return_type_symbol; |
7111 function_type_prefix = return_type_symbol; |
6086 break; |
7112 break; |
6087 |
7113 |
6103 |
7129 |
6104 { |
7130 { |
6105 identifier_c param_name("IN"); |
7131 identifier_c param_name("IN"); |
6106 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7132 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6107 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7133 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6108 |
7134 symbol_c *IN_type_symbol = NULL; |
6109 /* Get the value from a foo(<param_value>) style call */ |
7135 |
6110 if (IN_param_value == NULL) |
7136 /* Get the value from a foo(<param_value>) style call */ |
6111 IN_param_value = function_call_param_iterator.next(); |
7137 if (IN_param_value == NULL) |
6112 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7138 IN_param_value = function_call_param_iterator.next(); |
6113 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7139 if (IN_param_value != NULL) { |
6114 |
7140 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6115 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
7141 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6116 { |
7142 } |
6117 |
7143 |
|
7144 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
7145 { |
|
7146 |
|
7147 |
|
7148 if (IN_type_symbol == NULL) |
|
7149 IN_type_symbol = last_type_symbol; |
6118 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7150 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6119 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
7151 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
6120 function_type_prefix = return_type_symbol; |
7152 function_type_prefix = return_type_symbol; |
6121 break; |
7153 break; |
6122 |
7154 |
6138 |
7170 |
6139 { |
7171 { |
6140 identifier_c param_name("IN"); |
7172 identifier_c param_name("IN"); |
6141 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7173 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6142 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7174 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6143 |
7175 symbol_c *IN_type_symbol = NULL; |
6144 /* Get the value from a foo(<param_value>) style call */ |
7176 |
6145 if (IN_param_value == NULL) |
7177 /* Get the value from a foo(<param_value>) style call */ |
6146 IN_param_value = function_call_param_iterator.next(); |
7178 if (IN_param_value == NULL) |
6147 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7179 IN_param_value = function_call_param_iterator.next(); |
6148 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7180 if (IN_param_value != NULL) { |
6149 |
7181 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6150 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
7182 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6151 { |
7183 } |
6152 |
7184 |
|
7185 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
7186 { |
|
7187 |
|
7188 |
|
7189 if (IN_type_symbol == NULL) |
|
7190 IN_type_symbol = last_type_symbol; |
6153 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7191 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6154 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
7192 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
6155 function_type_prefix = return_type_symbol; |
7193 function_type_prefix = return_type_symbol; |
6156 break; |
7194 break; |
6157 |
7195 |
6173 |
7211 |
6174 { |
7212 { |
6175 identifier_c param_name("IN"); |
7213 identifier_c param_name("IN"); |
6176 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7214 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6177 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7215 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6178 |
7216 symbol_c *IN_type_symbol = NULL; |
6179 /* Get the value from a foo(<param_value>) style call */ |
7217 |
6180 if (IN_param_value == NULL) |
7218 /* Get the value from a foo(<param_value>) style call */ |
6181 IN_param_value = function_call_param_iterator.next(); |
7219 if (IN_param_value == NULL) |
6182 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7220 IN_param_value = function_call_param_iterator.next(); |
6183 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7221 if (IN_param_value != NULL) { |
6184 |
7222 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6185 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
7223 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6186 { |
7224 } |
6187 |
7225 |
|
7226 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
7227 { |
|
7228 |
|
7229 |
|
7230 if (IN_type_symbol == NULL) |
|
7231 IN_type_symbol = last_type_symbol; |
6188 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7232 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6189 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
7233 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
6190 function_type_prefix = return_type_symbol; |
7234 function_type_prefix = return_type_symbol; |
6191 break; |
7235 break; |
6192 |
7236 |
6208 |
7252 |
6209 { |
7253 { |
6210 identifier_c param_name("IN"); |
7254 identifier_c param_name("IN"); |
6211 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7255 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6212 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7256 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6213 |
7257 symbol_c *IN_type_symbol = NULL; |
6214 /* Get the value from a foo(<param_value>) style call */ |
7258 |
6215 if (IN_param_value == NULL) |
7259 /* Get the value from a foo(<param_value>) style call */ |
6216 IN_param_value = function_call_param_iterator.next(); |
7260 if (IN_param_value == NULL) |
6217 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7261 IN_param_value = function_call_param_iterator.next(); |
6218 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7262 if (IN_param_value != NULL) { |
6219 |
7263 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6220 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
7264 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6221 { |
7265 } |
6222 |
7266 |
|
7267 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
7268 { |
|
7269 |
|
7270 |
|
7271 if (IN_type_symbol == NULL) |
|
7272 IN_type_symbol = last_type_symbol; |
6223 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7273 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6224 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
7274 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
6225 function_type_prefix = return_type_symbol; |
7275 function_type_prefix = return_type_symbol; |
6226 break; |
7276 break; |
6227 |
7277 |
6243 |
7293 |
6244 { |
7294 { |
6245 identifier_c param_name("IN"); |
7295 identifier_c param_name("IN"); |
6246 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7296 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6247 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7297 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6248 |
7298 symbol_c *IN_type_symbol = NULL; |
6249 /* Get the value from a foo(<param_value>) style call */ |
7299 |
6250 if (IN_param_value == NULL) |
7300 /* Get the value from a foo(<param_value>) style call */ |
6251 IN_param_value = function_call_param_iterator.next(); |
7301 if (IN_param_value == NULL) |
6252 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7302 IN_param_value = function_call_param_iterator.next(); |
6253 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7303 if (IN_param_value != NULL) { |
6254 |
7304 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6255 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
7305 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6256 { |
7306 } |
6257 |
7307 |
|
7308 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
7309 { |
|
7310 |
|
7311 |
|
7312 if (IN_type_symbol == NULL) |
|
7313 IN_type_symbol = last_type_symbol; |
6258 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7314 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6259 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
7315 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
6260 function_type_prefix = return_type_symbol; |
7316 function_type_prefix = return_type_symbol; |
6261 break; |
7317 break; |
6262 |
7318 |
6278 |
7334 |
6279 { |
7335 { |
6280 identifier_c param_name("IN"); |
7336 identifier_c param_name("IN"); |
6281 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7337 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6282 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7338 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6283 |
7339 symbol_c *IN_type_symbol = NULL; |
6284 /* Get the value from a foo(<param_value>) style call */ |
7340 |
6285 if (IN_param_value == NULL) |
7341 /* Get the value from a foo(<param_value>) style call */ |
6286 IN_param_value = function_call_param_iterator.next(); |
7342 if (IN_param_value == NULL) |
6287 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7343 IN_param_value = function_call_param_iterator.next(); |
6288 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7344 if (IN_param_value != NULL) { |
6289 |
7345 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6290 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
7346 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7347 } |
|
7348 |
|
7349 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
6291 { |
7350 { |
6292 |
7351 |
6293 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
7352 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
7353 |
|
7354 if (IN_type_symbol == NULL) |
|
7355 IN_type_symbol = last_type_symbol; |
6294 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7356 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6295 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
7357 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
6296 function_type_prefix = return_type_symbol; |
7358 function_type_prefix = return_type_symbol; |
6297 break; |
7359 break; |
6298 |
7360 |
6314 |
7376 |
6315 { |
7377 { |
6316 identifier_c param_name("IN"); |
7378 identifier_c param_name("IN"); |
6317 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7379 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6318 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7380 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6319 |
7381 symbol_c *IN_type_symbol = NULL; |
6320 /* Get the value from a foo(<param_value>) style call */ |
7382 |
6321 if (IN_param_value == NULL) |
7383 /* Get the value from a foo(<param_value>) style call */ |
6322 IN_param_value = function_call_param_iterator.next(); |
7384 if (IN_param_value == NULL) |
6323 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7385 IN_param_value = function_call_param_iterator.next(); |
6324 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7386 if (IN_param_value != NULL) { |
6325 |
7387 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6326 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
7388 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
6327 { |
7389 } |
6328 |
7390 |
|
7391 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
|
7392 { |
|
7393 |
|
7394 |
|
7395 if (IN_type_symbol == NULL) |
|
7396 IN_type_symbol = last_type_symbol; |
6329 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7397 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6330 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
7398 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
6331 function_type_prefix = return_type_symbol; |
7399 function_type_prefix = return_type_symbol; |
6332 break; |
7400 break; |
6333 |
7401 |
6349 |
7417 |
6350 { |
7418 { |
6351 identifier_c param_name("IN"); |
7419 identifier_c param_name("IN"); |
6352 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7420 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6353 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7421 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6354 |
7422 symbol_c *IN_type_symbol = NULL; |
6355 /* Get the value from a foo(<param_value>) style call */ |
7423 |
6356 if (IN_param_value == NULL) |
7424 /* Get the value from a foo(<param_value>) style call */ |
6357 IN_param_value = function_call_param_iterator.next(); |
7425 if (IN_param_value == NULL) |
6358 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7426 IN_param_value = function_call_param_iterator.next(); |
6359 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7427 if (IN_param_value != NULL) { |
6360 |
7428 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6361 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7429 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7430 } |
|
7431 |
|
7432 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6362 { |
7433 { |
6363 |
7434 |
6364 function_name = (symbol_c*)(new pragma_c("__string_to_real")); |
7435 function_name = (symbol_c*)(new pragma_c("__string_to_real")); |
|
7436 |
|
7437 if (IN_type_symbol == NULL) |
|
7438 IN_type_symbol = last_type_symbol; |
6365 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7439 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6366 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
7440 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
6367 function_type_prefix = return_type_symbol; |
7441 function_type_prefix = return_type_symbol; |
6368 break; |
7442 break; |
6369 |
7443 |
6385 |
7459 |
6386 { |
7460 { |
6387 identifier_c param_name("IN"); |
7461 identifier_c param_name("IN"); |
6388 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7462 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6389 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7463 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6390 |
7464 symbol_c *IN_type_symbol = NULL; |
6391 /* Get the value from a foo(<param_value>) style call */ |
7465 |
6392 if (IN_param_value == NULL) |
7466 /* Get the value from a foo(<param_value>) style call */ |
6393 IN_param_value = function_call_param_iterator.next(); |
7467 if (IN_param_value == NULL) |
6394 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7468 IN_param_value = function_call_param_iterator.next(); |
6395 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7469 if (IN_param_value != NULL) { |
6396 |
7470 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6397 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7471 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7472 } |
|
7473 |
|
7474 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6398 { |
7475 { |
6399 |
7476 |
6400 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
7477 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
7478 |
|
7479 if (IN_type_symbol == NULL) |
|
7480 IN_type_symbol = last_type_symbol; |
6401 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7481 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6402 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
7482 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
6403 function_type_prefix = return_type_symbol; |
7483 function_type_prefix = return_type_symbol; |
6404 break; |
7484 break; |
6405 |
7485 |
6421 |
7501 |
6422 { |
7502 { |
6423 identifier_c param_name("IN"); |
7503 identifier_c param_name("IN"); |
6424 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7504 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6425 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7505 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6426 |
7506 symbol_c *IN_type_symbol = NULL; |
6427 /* Get the value from a foo(<param_value>) style call */ |
7507 |
6428 if (IN_param_value == NULL) |
7508 /* Get the value from a foo(<param_value>) style call */ |
6429 IN_param_value = function_call_param_iterator.next(); |
7509 if (IN_param_value == NULL) |
6430 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7510 IN_param_value = function_call_param_iterator.next(); |
6431 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7511 if (IN_param_value != NULL) { |
6432 |
7512 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6433 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7513 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7514 } |
|
7515 |
|
7516 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6434 { |
7517 { |
6435 |
7518 |
6436 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
7519 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
7520 |
|
7521 if (IN_type_symbol == NULL) |
|
7522 IN_type_symbol = last_type_symbol; |
6437 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7523 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6438 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
7524 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
6439 function_type_prefix = return_type_symbol; |
7525 function_type_prefix = return_type_symbol; |
6440 break; |
7526 break; |
6441 |
7527 |
6457 |
7543 |
6458 { |
7544 { |
6459 identifier_c param_name("IN"); |
7545 identifier_c param_name("IN"); |
6460 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7546 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6461 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7547 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6462 |
7548 symbol_c *IN_type_symbol = NULL; |
6463 /* Get the value from a foo(<param_value>) style call */ |
7549 |
6464 if (IN_param_value == NULL) |
7550 /* Get the value from a foo(<param_value>) style call */ |
6465 IN_param_value = function_call_param_iterator.next(); |
7551 if (IN_param_value == NULL) |
6466 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7552 IN_param_value = function_call_param_iterator.next(); |
6467 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7553 if (IN_param_value != NULL) { |
6468 |
7554 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6469 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7555 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7556 } |
|
7557 |
|
7558 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6470 { |
7559 { |
6471 |
7560 |
6472 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
7561 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
7562 |
|
7563 if (IN_type_symbol == NULL) |
|
7564 IN_type_symbol = last_type_symbol; |
6473 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7565 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6474 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
7566 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
6475 function_type_prefix = return_type_symbol; |
7567 function_type_prefix = return_type_symbol; |
6476 break; |
7568 break; |
6477 |
7569 |
6493 |
7585 |
6494 { |
7586 { |
6495 identifier_c param_name("IN"); |
7587 identifier_c param_name("IN"); |
6496 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7588 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6497 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7589 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6498 |
7590 symbol_c *IN_type_symbol = NULL; |
6499 /* Get the value from a foo(<param_value>) style call */ |
7591 |
6500 if (IN_param_value == NULL) |
7592 /* Get the value from a foo(<param_value>) style call */ |
6501 IN_param_value = function_call_param_iterator.next(); |
7593 if (IN_param_value == NULL) |
6502 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7594 IN_param_value = function_call_param_iterator.next(); |
6503 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7595 if (IN_param_value != NULL) { |
6504 |
7596 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6505 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7597 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7598 } |
|
7599 |
|
7600 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6506 { |
7601 { |
6507 |
7602 |
6508 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
7603 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
7604 |
|
7605 if (IN_type_symbol == NULL) |
|
7606 IN_type_symbol = last_type_symbol; |
6509 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7607 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6510 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
7608 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
6511 function_type_prefix = return_type_symbol; |
7609 function_type_prefix = return_type_symbol; |
6512 break; |
7610 break; |
6513 |
7611 |
6529 |
7627 |
6530 { |
7628 { |
6531 identifier_c param_name("IN"); |
7629 identifier_c param_name("IN"); |
6532 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7630 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6533 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7631 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6534 |
7632 symbol_c *IN_type_symbol = NULL; |
6535 /* Get the value from a foo(<param_value>) style call */ |
7633 |
6536 if (IN_param_value == NULL) |
7634 /* Get the value from a foo(<param_value>) style call */ |
6537 IN_param_value = function_call_param_iterator.next(); |
7635 if (IN_param_value == NULL) |
6538 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7636 IN_param_value = function_call_param_iterator.next(); |
6539 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7637 if (IN_param_value != NULL) { |
6540 |
7638 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6541 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7639 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7640 } |
|
7641 |
|
7642 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6542 { |
7643 { |
6543 |
7644 |
6544 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
7645 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
7646 |
|
7647 if (IN_type_symbol == NULL) |
|
7648 IN_type_symbol = last_type_symbol; |
6545 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7649 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6546 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
7650 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
6547 function_type_prefix = return_type_symbol; |
7651 function_type_prefix = return_type_symbol; |
6548 break; |
7652 break; |
6549 |
7653 |
6565 |
7669 |
6566 { |
7670 { |
6567 identifier_c param_name("IN"); |
7671 identifier_c param_name("IN"); |
6568 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7672 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6569 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7673 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6570 |
7674 symbol_c *IN_type_symbol = NULL; |
6571 /* Get the value from a foo(<param_value>) style call */ |
7675 |
6572 if (IN_param_value == NULL) |
7676 /* Get the value from a foo(<param_value>) style call */ |
6573 IN_param_value = function_call_param_iterator.next(); |
7677 if (IN_param_value == NULL) |
6574 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7678 IN_param_value = function_call_param_iterator.next(); |
6575 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7679 if (IN_param_value != NULL) { |
6576 |
7680 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6577 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7681 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7682 } |
|
7683 |
|
7684 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6578 { |
7685 { |
6579 |
7686 |
6580 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
7687 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
7688 |
|
7689 if (IN_type_symbol == NULL) |
|
7690 IN_type_symbol = last_type_symbol; |
6581 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7691 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6582 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
7692 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
6583 function_type_prefix = return_type_symbol; |
7693 function_type_prefix = return_type_symbol; |
6584 break; |
7694 break; |
6585 |
7695 |
6601 |
7711 |
6602 { |
7712 { |
6603 identifier_c param_name("IN"); |
7713 identifier_c param_name("IN"); |
6604 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7714 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6605 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7715 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6606 |
7716 symbol_c *IN_type_symbol = NULL; |
6607 /* Get the value from a foo(<param_value>) style call */ |
7717 |
6608 if (IN_param_value == NULL) |
7718 /* Get the value from a foo(<param_value>) style call */ |
6609 IN_param_value = function_call_param_iterator.next(); |
7719 if (IN_param_value == NULL) |
6610 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7720 IN_param_value = function_call_param_iterator.next(); |
6611 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7721 if (IN_param_value != NULL) { |
6612 |
7722 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6613 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7723 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7724 } |
|
7725 |
|
7726 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6614 { |
7727 { |
6615 |
7728 |
6616 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
7729 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
7730 |
|
7731 if (IN_type_symbol == NULL) |
|
7732 IN_type_symbol = last_type_symbol; |
6617 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7733 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6618 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
7734 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
6619 function_type_prefix = return_type_symbol; |
7735 function_type_prefix = return_type_symbol; |
6620 break; |
7736 break; |
6621 |
7737 |
6637 |
7753 |
6638 { |
7754 { |
6639 identifier_c param_name("IN"); |
7755 identifier_c param_name("IN"); |
6640 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7756 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6641 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7757 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6642 |
7758 symbol_c *IN_type_symbol = NULL; |
6643 /* Get the value from a foo(<param_value>) style call */ |
7759 |
6644 if (IN_param_value == NULL) |
7760 /* Get the value from a foo(<param_value>) style call */ |
6645 IN_param_value = function_call_param_iterator.next(); |
7761 if (IN_param_value == NULL) |
6646 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7762 IN_param_value = function_call_param_iterator.next(); |
6647 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7763 if (IN_param_value != NULL) { |
6648 |
7764 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6649 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7765 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7766 } |
|
7767 |
|
7768 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6650 { |
7769 { |
6651 |
7770 |
6652 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
7771 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
7772 |
|
7773 if (IN_type_symbol == NULL) |
|
7774 IN_type_symbol = last_type_symbol; |
6653 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7775 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6654 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
7776 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
6655 function_type_prefix = return_type_symbol; |
7777 function_type_prefix = return_type_symbol; |
6656 break; |
7778 break; |
6657 |
7779 |
6673 |
7795 |
6674 { |
7796 { |
6675 identifier_c param_name("IN"); |
7797 identifier_c param_name("IN"); |
6676 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7798 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6677 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7799 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6678 |
7800 symbol_c *IN_type_symbol = NULL; |
6679 /* Get the value from a foo(<param_value>) style call */ |
7801 |
6680 if (IN_param_value == NULL) |
7802 /* Get the value from a foo(<param_value>) style call */ |
6681 IN_param_value = function_call_param_iterator.next(); |
7803 if (IN_param_value == NULL) |
6682 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7804 IN_param_value = function_call_param_iterator.next(); |
6683 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7805 if (IN_param_value != NULL) { |
6684 |
7806 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6685 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7807 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7808 } |
|
7809 |
|
7810 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6686 { |
7811 { |
6687 |
7812 |
6688 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
7813 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
7814 |
|
7815 if (IN_type_symbol == NULL) |
|
7816 IN_type_symbol = last_type_symbol; |
6689 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7817 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6690 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
7818 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
6691 function_type_prefix = return_type_symbol; |
7819 function_type_prefix = return_type_symbol; |
6692 break; |
7820 break; |
6693 |
7821 |
6709 |
7837 |
6710 { |
7838 { |
6711 identifier_c param_name("IN"); |
7839 identifier_c param_name("IN"); |
6712 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7840 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6713 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7841 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6714 |
7842 symbol_c *IN_type_symbol = NULL; |
6715 /* Get the value from a foo(<param_value>) style call */ |
7843 |
6716 if (IN_param_value == NULL) |
7844 /* Get the value from a foo(<param_value>) style call */ |
6717 IN_param_value = function_call_param_iterator.next(); |
7845 if (IN_param_value == NULL) |
6718 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7846 IN_param_value = function_call_param_iterator.next(); |
6719 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7847 if (IN_param_value != NULL) { |
6720 |
7848 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6721 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7849 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7850 } |
|
7851 |
|
7852 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6722 { |
7853 { |
6723 |
7854 |
6724 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
7855 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
7856 |
|
7857 if (IN_type_symbol == NULL) |
|
7858 IN_type_symbol = last_type_symbol; |
6725 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7859 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6726 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
7860 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
6727 function_type_prefix = return_type_symbol; |
7861 function_type_prefix = return_type_symbol; |
6728 break; |
7862 break; |
6729 |
7863 |
6745 |
7879 |
6746 { |
7880 { |
6747 identifier_c param_name("IN"); |
7881 identifier_c param_name("IN"); |
6748 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7882 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6749 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7883 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6750 |
7884 symbol_c *IN_type_symbol = NULL; |
6751 /* Get the value from a foo(<param_value>) style call */ |
7885 |
6752 if (IN_param_value == NULL) |
7886 /* Get the value from a foo(<param_value>) style call */ |
6753 IN_param_value = function_call_param_iterator.next(); |
7887 if (IN_param_value == NULL) |
6754 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7888 IN_param_value = function_call_param_iterator.next(); |
6755 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7889 if (IN_param_value != NULL) { |
6756 |
7890 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6757 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7891 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7892 } |
|
7893 |
|
7894 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6758 { |
7895 { |
6759 |
7896 |
6760 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
7897 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
7898 |
|
7899 if (IN_type_symbol == NULL) |
|
7900 IN_type_symbol = last_type_symbol; |
6761 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7901 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6762 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
7902 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
6763 function_type_prefix = return_type_symbol; |
7903 function_type_prefix = return_type_symbol; |
6764 break; |
7904 break; |
6765 |
7905 |
6781 |
7921 |
6782 { |
7922 { |
6783 identifier_c param_name("IN"); |
7923 identifier_c param_name("IN"); |
6784 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7924 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6785 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7925 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6786 |
7926 symbol_c *IN_type_symbol = NULL; |
6787 /* Get the value from a foo(<param_value>) style call */ |
7927 |
6788 if (IN_param_value == NULL) |
7928 /* Get the value from a foo(<param_value>) style call */ |
6789 IN_param_value = function_call_param_iterator.next(); |
7929 if (IN_param_value == NULL) |
6790 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7930 IN_param_value = function_call_param_iterator.next(); |
6791 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7931 if (IN_param_value != NULL) { |
6792 |
7932 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6793 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7933 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7934 } |
|
7935 |
|
7936 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6794 { |
7937 { |
6795 |
7938 |
6796 function_name = (symbol_c*)(new pragma_c("__string_to_real")); |
7939 function_name = (symbol_c*)(new pragma_c("__string_to_real")); |
|
7940 |
|
7941 if (IN_type_symbol == NULL) |
|
7942 IN_type_symbol = last_type_symbol; |
6797 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7943 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6798 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
7944 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
6799 function_type_prefix = return_type_symbol; |
7945 function_type_prefix = return_type_symbol; |
6800 break; |
7946 break; |
6801 |
7947 |
6817 |
7963 |
6818 { |
7964 { |
6819 identifier_c param_name("IN"); |
7965 identifier_c param_name("IN"); |
6820 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7966 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6821 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7967 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6822 |
7968 symbol_c *IN_type_symbol = NULL; |
6823 /* Get the value from a foo(<param_value>) style call */ |
7969 |
6824 if (IN_param_value == NULL) |
7970 /* Get the value from a foo(<param_value>) style call */ |
6825 IN_param_value = function_call_param_iterator.next(); |
7971 if (IN_param_value == NULL) |
6826 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7972 IN_param_value = function_call_param_iterator.next(); |
6827 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7973 if (IN_param_value != NULL) { |
6828 |
7974 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6829 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7975 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
7976 } |
|
7977 |
|
7978 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6830 { |
7979 { |
6831 |
7980 |
6832 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
7981 function_name = (symbol_c*)(new pragma_c("__string_to_bit")); |
|
7982 |
|
7983 if (IN_type_symbol == NULL) |
|
7984 IN_type_symbol = last_type_symbol; |
6833 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7985 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6834 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
7986 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
6835 function_type_prefix = return_type_symbol; |
7987 function_type_prefix = return_type_symbol; |
6836 break; |
7988 break; |
6837 |
7989 |
6853 |
8005 |
6854 { |
8006 { |
6855 identifier_c param_name("IN"); |
8007 identifier_c param_name("IN"); |
6856 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8008 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6857 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8009 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6858 |
8010 symbol_c *IN_type_symbol = NULL; |
6859 /* Get the value from a foo(<param_value>) style call */ |
8011 |
6860 if (IN_param_value == NULL) |
8012 /* Get the value from a foo(<param_value>) style call */ |
6861 IN_param_value = function_call_param_iterator.next(); |
8013 if (IN_param_value == NULL) |
6862 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8014 IN_param_value = function_call_param_iterator.next(); |
6863 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8015 if (IN_param_value != NULL) { |
6864 |
8016 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6865 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
8017 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
8018 } |
|
8019 |
|
8020 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6866 { |
8021 { |
6867 |
8022 |
6868 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
8023 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
8024 |
|
8025 if (IN_type_symbol == NULL) |
|
8026 IN_type_symbol = last_type_symbol; |
6869 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8027 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6870 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
8028 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
6871 function_type_prefix = return_type_symbol; |
8029 function_type_prefix = return_type_symbol; |
6872 break; |
8030 break; |
6873 |
8031 |
6889 |
8047 |
6890 { |
8048 { |
6891 identifier_c param_name("IN"); |
8049 identifier_c param_name("IN"); |
6892 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8050 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6893 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8051 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6894 |
8052 symbol_c *IN_type_symbol = NULL; |
6895 /* Get the value from a foo(<param_value>) style call */ |
8053 |
6896 if (IN_param_value == NULL) |
8054 /* Get the value from a foo(<param_value>) style call */ |
6897 IN_param_value = function_call_param_iterator.next(); |
8055 if (IN_param_value == NULL) |
6898 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8056 IN_param_value = function_call_param_iterator.next(); |
6899 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8057 if (IN_param_value != NULL) { |
6900 |
8058 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6901 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
8059 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
8060 } |
|
8061 |
|
8062 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6902 { |
8063 { |
6903 |
8064 |
6904 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
8065 function_name = (symbol_c*)(new pragma_c("__string_to_uint")); |
|
8066 |
|
8067 if (IN_type_symbol == NULL) |
|
8068 IN_type_symbol = last_type_symbol; |
6905 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8069 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6906 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
8070 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
6907 function_type_prefix = return_type_symbol; |
8071 function_type_prefix = return_type_symbol; |
6908 break; |
8072 break; |
6909 |
8073 |
6925 |
8089 |
6926 { |
8090 { |
6927 identifier_c param_name("IN"); |
8091 identifier_c param_name("IN"); |
6928 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8092 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6929 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8093 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6930 |
8094 symbol_c *IN_type_symbol = NULL; |
6931 /* Get the value from a foo(<param_value>) style call */ |
8095 |
6932 if (IN_param_value == NULL) |
8096 /* Get the value from a foo(<param_value>) style call */ |
6933 IN_param_value = function_call_param_iterator.next(); |
8097 if (IN_param_value == NULL) |
6934 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8098 IN_param_value = function_call_param_iterator.next(); |
6935 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8099 if (IN_param_value != NULL) { |
6936 |
8100 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6937 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
8101 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
8102 } |
|
8103 |
|
8104 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6938 { |
8105 { |
6939 |
8106 |
6940 function_name = (symbol_c*)(new pragma_c("__string_to_bool")); |
8107 function_name = (symbol_c*)(new pragma_c("__string_to_bool")); |
|
8108 |
|
8109 if (IN_type_symbol == NULL) |
|
8110 IN_type_symbol = last_type_symbol; |
6941 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8111 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6942 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
8112 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
6943 function_type_prefix = return_type_symbol; |
8113 function_type_prefix = return_type_symbol; |
6944 break; |
8114 break; |
6945 |
8115 |
6961 |
8131 |
6962 { |
8132 { |
6963 identifier_c param_name("IN"); |
8133 identifier_c param_name("IN"); |
6964 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8134 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
6965 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8135 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
6966 |
8136 symbol_c *IN_type_symbol = NULL; |
6967 /* Get the value from a foo(<param_value>) style call */ |
8137 |
6968 if (IN_param_value == NULL) |
8138 /* Get the value from a foo(<param_value>) style call */ |
6969 IN_param_value = function_call_param_iterator.next(); |
8139 if (IN_param_value == NULL) |
6970 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8140 IN_param_value = function_call_param_iterator.next(); |
6971 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8141 if (IN_param_value != NULL) { |
6972 |
8142 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
6973 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
8143 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
8144 } |
|
8145 |
|
8146 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
6974 { |
8147 { |
6975 |
8148 |
6976 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
8149 function_name = (symbol_c*)(new pragma_c("__string_to_time")); |
|
8150 |
|
8151 if (IN_type_symbol == NULL) |
|
8152 IN_type_symbol = last_type_symbol; |
6977 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8153 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
6978 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
8154 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
6979 function_type_prefix = return_type_symbol; |
8155 function_type_prefix = return_type_symbol; |
6980 break; |
8156 break; |
6981 |
8157 |
6997 |
8173 |
6998 { |
8174 { |
6999 identifier_c param_name("IN"); |
8175 identifier_c param_name("IN"); |
7000 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8176 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7001 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8177 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7002 |
8178 symbol_c *IN_type_symbol = NULL; |
7003 /* Get the value from a foo(<param_value>) style call */ |
8179 |
7004 if (IN_param_value == NULL) |
8180 /* Get the value from a foo(<param_value>) style call */ |
7005 IN_param_value = function_call_param_iterator.next(); |
8181 if (IN_param_value == NULL) |
7006 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8182 IN_param_value = function_call_param_iterator.next(); |
7007 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8183 if (IN_param_value != NULL) { |
7008 |
8184 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7009 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
8185 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
8186 } |
|
8187 |
|
8188 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
7010 { |
8189 { |
7011 |
8190 |
7012 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
8191 function_name = (symbol_c*)(new pragma_c("__string_to_sint")); |
|
8192 |
|
8193 if (IN_type_symbol == NULL) |
|
8194 IN_type_symbol = last_type_symbol; |
7013 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8195 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7014 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
8196 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
7015 function_type_prefix = return_type_symbol; |
8197 function_type_prefix = return_type_symbol; |
7016 break; |
8198 break; |
7017 |
8199 |
7033 |
8215 |
7034 { |
8216 { |
7035 identifier_c param_name("IN"); |
8217 identifier_c param_name("IN"); |
7036 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8218 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7037 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8219 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7038 |
8220 symbol_c *IN_type_symbol = NULL; |
7039 /* Get the value from a foo(<param_value>) style call */ |
8221 |
7040 if (IN_param_value == NULL) |
8222 /* Get the value from a foo(<param_value>) style call */ |
7041 IN_param_value = function_call_param_iterator.next(); |
8223 if (IN_param_value == NULL) |
7042 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8224 IN_param_value = function_call_param_iterator.next(); |
7043 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8225 if (IN_param_value != NULL) { |
7044 |
8226 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7045 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8227 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7046 { |
8228 } |
7047 |
8229 |
|
8230 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8231 { |
|
8232 |
|
8233 |
|
8234 if (IN_type_symbol == NULL) |
|
8235 IN_type_symbol = last_type_symbol; |
7048 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8236 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7049 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
8237 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
7050 function_type_prefix = return_type_symbol; |
8238 function_type_prefix = return_type_symbol; |
7051 break; |
8239 break; |
7052 |
8240 |
7068 |
8256 |
7069 { |
8257 { |
7070 identifier_c param_name("IN"); |
8258 identifier_c param_name("IN"); |
7071 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8259 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7072 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8260 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7073 |
8261 symbol_c *IN_type_symbol = NULL; |
7074 /* Get the value from a foo(<param_value>) style call */ |
8262 |
7075 if (IN_param_value == NULL) |
8263 /* Get the value from a foo(<param_value>) style call */ |
7076 IN_param_value = function_call_param_iterator.next(); |
8264 if (IN_param_value == NULL) |
7077 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8265 IN_param_value = function_call_param_iterator.next(); |
7078 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8266 if (IN_param_value != NULL) { |
7079 |
8267 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7080 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8268 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7081 { |
8269 } |
7082 |
8270 |
|
8271 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8272 { |
|
8273 |
|
8274 |
|
8275 if (IN_type_symbol == NULL) |
|
8276 IN_type_symbol = last_type_symbol; |
7083 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8277 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7084 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
8278 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
7085 function_type_prefix = return_type_symbol; |
8279 function_type_prefix = return_type_symbol; |
7086 break; |
8280 break; |
7087 |
8281 |
7103 |
8297 |
7104 { |
8298 { |
7105 identifier_c param_name("IN"); |
8299 identifier_c param_name("IN"); |
7106 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8300 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7107 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8301 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7108 |
8302 symbol_c *IN_type_symbol = NULL; |
7109 /* Get the value from a foo(<param_value>) style call */ |
8303 |
7110 if (IN_param_value == NULL) |
8304 /* Get the value from a foo(<param_value>) style call */ |
7111 IN_param_value = function_call_param_iterator.next(); |
8305 if (IN_param_value == NULL) |
7112 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8306 IN_param_value = function_call_param_iterator.next(); |
7113 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8307 if (IN_param_value != NULL) { |
7114 |
8308 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7115 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8309 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7116 { |
8310 } |
7117 |
8311 |
|
8312 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8313 { |
|
8314 |
|
8315 |
|
8316 if (IN_type_symbol == NULL) |
|
8317 IN_type_symbol = last_type_symbol; |
7118 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8318 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7119 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
8319 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
7120 function_type_prefix = return_type_symbol; |
8320 function_type_prefix = return_type_symbol; |
7121 break; |
8321 break; |
7122 |
8322 |
7138 |
8338 |
7139 { |
8339 { |
7140 identifier_c param_name("IN"); |
8340 identifier_c param_name("IN"); |
7141 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8341 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7142 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8342 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7143 |
8343 symbol_c *IN_type_symbol = NULL; |
7144 /* Get the value from a foo(<param_value>) style call */ |
8344 |
7145 if (IN_param_value == NULL) |
8345 /* Get the value from a foo(<param_value>) style call */ |
7146 IN_param_value = function_call_param_iterator.next(); |
8346 if (IN_param_value == NULL) |
7147 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8347 IN_param_value = function_call_param_iterator.next(); |
7148 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8348 if (IN_param_value != NULL) { |
7149 |
8349 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7150 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8350 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7151 { |
8351 } |
7152 |
8352 |
|
8353 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8354 { |
|
8355 |
|
8356 |
|
8357 if (IN_type_symbol == NULL) |
|
8358 IN_type_symbol = last_type_symbol; |
7153 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8359 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7154 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
8360 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
7155 function_type_prefix = return_type_symbol; |
8361 function_type_prefix = return_type_symbol; |
7156 break; |
8362 break; |
7157 |
8363 |
7173 |
8379 |
7174 { |
8380 { |
7175 identifier_c param_name("IN"); |
8381 identifier_c param_name("IN"); |
7176 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8382 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7177 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8383 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7178 |
8384 symbol_c *IN_type_symbol = NULL; |
7179 /* Get the value from a foo(<param_value>) style call */ |
8385 |
7180 if (IN_param_value == NULL) |
8386 /* Get the value from a foo(<param_value>) style call */ |
7181 IN_param_value = function_call_param_iterator.next(); |
8387 if (IN_param_value == NULL) |
7182 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8388 IN_param_value = function_call_param_iterator.next(); |
7183 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8389 if (IN_param_value != NULL) { |
7184 |
8390 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7185 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8391 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
8392 } |
|
8393 |
|
8394 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
7186 { |
8395 { |
7187 |
8396 |
7188 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
8397 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8398 |
|
8399 if (IN_type_symbol == NULL) |
|
8400 IN_type_symbol = last_type_symbol; |
7189 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8401 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7190 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
8402 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
7191 function_type_prefix = return_type_symbol; |
8403 function_type_prefix = return_type_symbol; |
7192 break; |
8404 break; |
7193 |
8405 |
7209 |
8421 |
7210 { |
8422 { |
7211 identifier_c param_name("IN"); |
8423 identifier_c param_name("IN"); |
7212 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8424 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7213 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8425 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7214 |
8426 symbol_c *IN_type_symbol = NULL; |
7215 /* Get the value from a foo(<param_value>) style call */ |
8427 |
7216 if (IN_param_value == NULL) |
8428 /* Get the value from a foo(<param_value>) style call */ |
7217 IN_param_value = function_call_param_iterator.next(); |
8429 if (IN_param_value == NULL) |
7218 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8430 IN_param_value = function_call_param_iterator.next(); |
7219 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8431 if (IN_param_value != NULL) { |
7220 |
8432 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7221 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8433 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7222 { |
8434 } |
7223 |
8435 |
|
8436 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8437 { |
|
8438 |
|
8439 |
|
8440 if (IN_type_symbol == NULL) |
|
8441 IN_type_symbol = last_type_symbol; |
7224 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8442 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7225 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
8443 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
7226 function_type_prefix = return_type_symbol; |
8444 function_type_prefix = return_type_symbol; |
7227 break; |
8445 break; |
7228 |
8446 |
7244 |
8462 |
7245 { |
8463 { |
7246 identifier_c param_name("IN"); |
8464 identifier_c param_name("IN"); |
7247 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8465 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7248 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8466 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7249 |
8467 symbol_c *IN_type_symbol = NULL; |
7250 /* Get the value from a foo(<param_value>) style call */ |
8468 |
7251 if (IN_param_value == NULL) |
8469 /* Get the value from a foo(<param_value>) style call */ |
7252 IN_param_value = function_call_param_iterator.next(); |
8470 if (IN_param_value == NULL) |
7253 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8471 IN_param_value = function_call_param_iterator.next(); |
7254 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8472 if (IN_param_value != NULL) { |
7255 |
8473 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7256 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8474 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
8475 } |
|
8476 |
|
8477 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
7257 { |
8478 { |
7258 |
8479 |
7259 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
8480 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8481 |
|
8482 if (IN_type_symbol == NULL) |
|
8483 IN_type_symbol = last_type_symbol; |
7260 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8484 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7261 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
8485 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
7262 function_type_prefix = return_type_symbol; |
8486 function_type_prefix = return_type_symbol; |
7263 break; |
8487 break; |
7264 |
8488 |
7280 |
8504 |
7281 { |
8505 { |
7282 identifier_c param_name("IN"); |
8506 identifier_c param_name("IN"); |
7283 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8507 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7284 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8508 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7285 |
8509 symbol_c *IN_type_symbol = NULL; |
7286 /* Get the value from a foo(<param_value>) style call */ |
8510 |
7287 if (IN_param_value == NULL) |
8511 /* Get the value from a foo(<param_value>) style call */ |
7288 IN_param_value = function_call_param_iterator.next(); |
8512 if (IN_param_value == NULL) |
7289 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8513 IN_param_value = function_call_param_iterator.next(); |
7290 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8514 if (IN_param_value != NULL) { |
7291 |
8515 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7292 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8516 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
8517 } |
|
8518 |
|
8519 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
7293 { |
8520 { |
7294 |
8521 |
7295 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
8522 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8523 |
|
8524 if (IN_type_symbol == NULL) |
|
8525 IN_type_symbol = last_type_symbol; |
7296 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8526 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7297 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
8527 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
7298 function_type_prefix = return_type_symbol; |
8528 function_type_prefix = return_type_symbol; |
7299 break; |
8529 break; |
7300 |
8530 |
7316 |
8546 |
7317 { |
8547 { |
7318 identifier_c param_name("IN"); |
8548 identifier_c param_name("IN"); |
7319 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8549 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7320 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8550 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7321 |
8551 symbol_c *IN_type_symbol = NULL; |
7322 /* Get the value from a foo(<param_value>) style call */ |
8552 |
7323 if (IN_param_value == NULL) |
8553 /* Get the value from a foo(<param_value>) style call */ |
7324 IN_param_value = function_call_param_iterator.next(); |
8554 if (IN_param_value == NULL) |
7325 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8555 IN_param_value = function_call_param_iterator.next(); |
7326 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8556 if (IN_param_value != NULL) { |
7327 |
8557 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7328 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8558 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7329 { |
8559 } |
7330 |
8560 |
|
8561 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8562 { |
|
8563 |
|
8564 |
|
8565 if (IN_type_symbol == NULL) |
|
8566 IN_type_symbol = last_type_symbol; |
7331 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8567 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7332 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
8568 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
7333 function_type_prefix = return_type_symbol; |
8569 function_type_prefix = return_type_symbol; |
7334 break; |
8570 break; |
7335 |
8571 |
7351 |
8587 |
7352 { |
8588 { |
7353 identifier_c param_name("IN"); |
8589 identifier_c param_name("IN"); |
7354 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8590 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7355 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8591 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7356 |
8592 symbol_c *IN_type_symbol = NULL; |
7357 /* Get the value from a foo(<param_value>) style call */ |
8593 |
7358 if (IN_param_value == NULL) |
8594 /* Get the value from a foo(<param_value>) style call */ |
7359 IN_param_value = function_call_param_iterator.next(); |
8595 if (IN_param_value == NULL) |
7360 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8596 IN_param_value = function_call_param_iterator.next(); |
7361 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8597 if (IN_param_value != NULL) { |
7362 |
8598 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7363 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8599 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7364 { |
8600 } |
7365 |
8601 |
|
8602 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8603 { |
|
8604 |
|
8605 |
|
8606 if (IN_type_symbol == NULL) |
|
8607 IN_type_symbol = last_type_symbol; |
7366 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8608 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7367 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
8609 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
7368 function_type_prefix = return_type_symbol; |
8610 function_type_prefix = return_type_symbol; |
7369 break; |
8611 break; |
7370 |
8612 |
7386 |
8628 |
7387 { |
8629 { |
7388 identifier_c param_name("IN"); |
8630 identifier_c param_name("IN"); |
7389 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8631 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7390 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8632 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7391 |
8633 symbol_c *IN_type_symbol = NULL; |
7392 /* Get the value from a foo(<param_value>) style call */ |
8634 |
7393 if (IN_param_value == NULL) |
8635 /* Get the value from a foo(<param_value>) style call */ |
7394 IN_param_value = function_call_param_iterator.next(); |
8636 if (IN_param_value == NULL) |
7395 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8637 IN_param_value = function_call_param_iterator.next(); |
7396 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8638 if (IN_param_value != NULL) { |
7397 |
8639 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7398 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8640 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
8641 } |
|
8642 |
|
8643 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
7399 { |
8644 { |
7400 |
8645 |
7401 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
8646 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
8647 |
|
8648 if (IN_type_symbol == NULL) |
|
8649 IN_type_symbol = last_type_symbol; |
7402 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8650 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7403 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
8651 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
7404 function_type_prefix = return_type_symbol; |
8652 function_type_prefix = return_type_symbol; |
7405 break; |
8653 break; |
7406 |
8654 |
7422 |
8670 |
7423 { |
8671 { |
7424 identifier_c param_name("IN"); |
8672 identifier_c param_name("IN"); |
7425 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8673 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7426 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8674 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7427 |
8675 symbol_c *IN_type_symbol = NULL; |
7428 /* Get the value from a foo(<param_value>) style call */ |
8676 |
7429 if (IN_param_value == NULL) |
8677 /* Get the value from a foo(<param_value>) style call */ |
7430 IN_param_value = function_call_param_iterator.next(); |
8678 if (IN_param_value == NULL) |
7431 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8679 IN_param_value = function_call_param_iterator.next(); |
7432 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8680 if (IN_param_value != NULL) { |
7433 |
8681 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7434 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8682 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7435 { |
8683 } |
7436 |
8684 |
|
8685 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8686 { |
|
8687 |
|
8688 |
|
8689 if (IN_type_symbol == NULL) |
|
8690 IN_type_symbol = last_type_symbol; |
7437 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8691 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7438 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
8692 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
7439 function_type_prefix = return_type_symbol; |
8693 function_type_prefix = return_type_symbol; |
7440 break; |
8694 break; |
7441 |
8695 |
7457 |
8711 |
7458 { |
8712 { |
7459 identifier_c param_name("IN"); |
8713 identifier_c param_name("IN"); |
7460 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8714 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7461 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8715 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7462 |
8716 symbol_c *IN_type_symbol = NULL; |
7463 /* Get the value from a foo(<param_value>) style call */ |
8717 |
7464 if (IN_param_value == NULL) |
8718 /* Get the value from a foo(<param_value>) style call */ |
7465 IN_param_value = function_call_param_iterator.next(); |
8719 if (IN_param_value == NULL) |
7466 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8720 IN_param_value = function_call_param_iterator.next(); |
7467 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8721 if (IN_param_value != NULL) { |
7468 |
8722 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7469 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8723 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7470 { |
8724 } |
7471 |
8725 |
|
8726 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8727 { |
|
8728 |
|
8729 |
|
8730 if (IN_type_symbol == NULL) |
|
8731 IN_type_symbol = last_type_symbol; |
7472 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8732 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7473 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
8733 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
7474 function_type_prefix = return_type_symbol; |
8734 function_type_prefix = return_type_symbol; |
7475 break; |
8735 break; |
7476 |
8736 |
7492 |
8752 |
7493 { |
8753 { |
7494 identifier_c param_name("IN"); |
8754 identifier_c param_name("IN"); |
7495 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8755 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7496 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8756 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7497 |
8757 symbol_c *IN_type_symbol = NULL; |
7498 /* Get the value from a foo(<param_value>) style call */ |
8758 |
7499 if (IN_param_value == NULL) |
8759 /* Get the value from a foo(<param_value>) style call */ |
7500 IN_param_value = function_call_param_iterator.next(); |
8760 if (IN_param_value == NULL) |
7501 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8761 IN_param_value = function_call_param_iterator.next(); |
7502 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8762 if (IN_param_value != NULL) { |
7503 |
8763 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7504 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8764 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7505 { |
8765 } |
7506 |
8766 |
|
8767 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8768 { |
|
8769 |
|
8770 |
|
8771 if (IN_type_symbol == NULL) |
|
8772 IN_type_symbol = last_type_symbol; |
7507 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8773 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7508 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
8774 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
7509 function_type_prefix = return_type_symbol; |
8775 function_type_prefix = return_type_symbol; |
7510 break; |
8776 break; |
7511 |
8777 |
7527 |
8793 |
7528 { |
8794 { |
7529 identifier_c param_name("IN"); |
8795 identifier_c param_name("IN"); |
7530 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8796 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7531 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8797 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7532 |
8798 symbol_c *IN_type_symbol = NULL; |
7533 /* Get the value from a foo(<param_value>) style call */ |
8799 |
7534 if (IN_param_value == NULL) |
8800 /* Get the value from a foo(<param_value>) style call */ |
7535 IN_param_value = function_call_param_iterator.next(); |
8801 if (IN_param_value == NULL) |
7536 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8802 IN_param_value = function_call_param_iterator.next(); |
7537 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8803 if (IN_param_value != NULL) { |
7538 |
8804 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7539 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8805 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7540 { |
8806 } |
7541 |
8807 |
|
8808 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8809 { |
|
8810 |
|
8811 |
|
8812 if (IN_type_symbol == NULL) |
|
8813 IN_type_symbol = last_type_symbol; |
7542 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8814 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7543 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
8815 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
7544 function_type_prefix = return_type_symbol; |
8816 function_type_prefix = return_type_symbol; |
7545 break; |
8817 break; |
7546 |
8818 |
7562 |
8834 |
7563 { |
8835 { |
7564 identifier_c param_name("IN"); |
8836 identifier_c param_name("IN"); |
7565 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8837 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7566 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8838 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7567 |
8839 symbol_c *IN_type_symbol = NULL; |
7568 /* Get the value from a foo(<param_value>) style call */ |
8840 |
7569 if (IN_param_value == NULL) |
8841 /* Get the value from a foo(<param_value>) style call */ |
7570 IN_param_value = function_call_param_iterator.next(); |
8842 if (IN_param_value == NULL) |
7571 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8843 IN_param_value = function_call_param_iterator.next(); |
7572 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8844 if (IN_param_value != NULL) { |
7573 |
8845 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7574 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8846 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7575 { |
8847 } |
7576 |
8848 |
|
8849 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8850 { |
|
8851 |
|
8852 |
|
8853 if (IN_type_symbol == NULL) |
|
8854 IN_type_symbol = last_type_symbol; |
7577 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8855 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7578 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
8856 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
7579 function_type_prefix = return_type_symbol; |
8857 function_type_prefix = return_type_symbol; |
7580 break; |
8858 break; |
7581 |
8859 |
7597 |
8875 |
7598 { |
8876 { |
7599 identifier_c param_name("IN"); |
8877 identifier_c param_name("IN"); |
7600 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8878 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7601 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8879 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7602 |
8880 symbol_c *IN_type_symbol = NULL; |
7603 /* Get the value from a foo(<param_value>) style call */ |
8881 |
7604 if (IN_param_value == NULL) |
8882 /* Get the value from a foo(<param_value>) style call */ |
7605 IN_param_value = function_call_param_iterator.next(); |
8883 if (IN_param_value == NULL) |
7606 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8884 IN_param_value = function_call_param_iterator.next(); |
7607 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8885 if (IN_param_value != NULL) { |
7608 |
8886 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7609 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8887 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7610 { |
8888 } |
7611 |
8889 |
|
8890 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8891 { |
|
8892 |
|
8893 |
|
8894 if (IN_type_symbol == NULL) |
|
8895 IN_type_symbol = last_type_symbol; |
7612 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8896 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7613 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
8897 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
7614 function_type_prefix = return_type_symbol; |
8898 function_type_prefix = return_type_symbol; |
7615 break; |
8899 break; |
7616 |
8900 |
7632 |
8916 |
7633 { |
8917 { |
7634 identifier_c param_name("IN"); |
8918 identifier_c param_name("IN"); |
7635 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8919 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7636 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8920 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7637 |
8921 symbol_c *IN_type_symbol = NULL; |
7638 /* Get the value from a foo(<param_value>) style call */ |
8922 |
7639 if (IN_param_value == NULL) |
8923 /* Get the value from a foo(<param_value>) style call */ |
7640 IN_param_value = function_call_param_iterator.next(); |
8924 if (IN_param_value == NULL) |
7641 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8925 IN_param_value = function_call_param_iterator.next(); |
7642 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8926 if (IN_param_value != NULL) { |
7643 |
8927 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7644 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8928 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
8929 } |
|
8930 |
|
8931 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
7645 { |
8932 { |
7646 |
8933 |
7647 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
8934 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
8935 |
|
8936 if (IN_type_symbol == NULL) |
|
8937 IN_type_symbol = last_type_symbol; |
7648 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8938 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7649 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
8939 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
7650 function_type_prefix = return_type_symbol; |
8940 function_type_prefix = return_type_symbol; |
7651 break; |
8941 break; |
7652 |
8942 |
7668 |
8958 |
7669 { |
8959 { |
7670 identifier_c param_name("IN"); |
8960 identifier_c param_name("IN"); |
7671 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8961 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7672 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8962 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7673 |
8963 symbol_c *IN_type_symbol = NULL; |
7674 /* Get the value from a foo(<param_value>) style call */ |
8964 |
7675 if (IN_param_value == NULL) |
8965 /* Get the value from a foo(<param_value>) style call */ |
7676 IN_param_value = function_call_param_iterator.next(); |
8966 if (IN_param_value == NULL) |
7677 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8967 IN_param_value = function_call_param_iterator.next(); |
7678 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8968 if (IN_param_value != NULL) { |
7679 |
8969 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7680 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
8970 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7681 { |
8971 } |
7682 |
8972 |
|
8973 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
|
8974 { |
|
8975 |
|
8976 |
|
8977 if (IN_type_symbol == NULL) |
|
8978 IN_type_symbol = last_type_symbol; |
7683 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8979 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7684 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
8980 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
7685 function_type_prefix = return_type_symbol; |
8981 function_type_prefix = return_type_symbol; |
7686 break; |
8982 break; |
7687 |
8983 |
7703 |
8999 |
7704 { |
9000 { |
7705 identifier_c param_name("IN"); |
9001 identifier_c param_name("IN"); |
7706 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9002 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7707 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9003 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7708 |
9004 symbol_c *IN_type_symbol = NULL; |
7709 /* Get the value from a foo(<param_value>) style call */ |
9005 |
7710 if (IN_param_value == NULL) |
9006 /* Get the value from a foo(<param_value>) style call */ |
7711 IN_param_value = function_call_param_iterator.next(); |
9007 if (IN_param_value == NULL) |
7712 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9008 IN_param_value = function_call_param_iterator.next(); |
7713 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9009 if (IN_param_value != NULL) { |
7714 |
9010 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7715 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9011 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7716 { |
9012 } |
7717 |
9013 |
|
9014 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9015 { |
|
9016 |
|
9017 |
|
9018 if (IN_type_symbol == NULL) |
|
9019 IN_type_symbol = last_type_symbol; |
7718 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9020 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7719 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
9021 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
7720 function_type_prefix = return_type_symbol; |
9022 function_type_prefix = return_type_symbol; |
7721 break; |
9023 break; |
7722 |
9024 |
7738 |
9040 |
7739 { |
9041 { |
7740 identifier_c param_name("IN"); |
9042 identifier_c param_name("IN"); |
7741 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9043 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7742 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9044 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7743 |
9045 symbol_c *IN_type_symbol = NULL; |
7744 /* Get the value from a foo(<param_value>) style call */ |
9046 |
7745 if (IN_param_value == NULL) |
9047 /* Get the value from a foo(<param_value>) style call */ |
7746 IN_param_value = function_call_param_iterator.next(); |
9048 if (IN_param_value == NULL) |
7747 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9049 IN_param_value = function_call_param_iterator.next(); |
7748 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9050 if (IN_param_value != NULL) { |
7749 |
9051 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7750 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9052 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7751 { |
9053 } |
7752 |
9054 |
|
9055 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9056 { |
|
9057 |
|
9058 |
|
9059 if (IN_type_symbol == NULL) |
|
9060 IN_type_symbol = last_type_symbol; |
7753 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9061 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7754 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
9062 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
7755 function_type_prefix = return_type_symbol; |
9063 function_type_prefix = return_type_symbol; |
7756 break; |
9064 break; |
7757 |
9065 |
7773 |
9081 |
7774 { |
9082 { |
7775 identifier_c param_name("IN"); |
9083 identifier_c param_name("IN"); |
7776 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9084 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7777 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9085 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7778 |
9086 symbol_c *IN_type_symbol = NULL; |
7779 /* Get the value from a foo(<param_value>) style call */ |
9087 |
7780 if (IN_param_value == NULL) |
9088 /* Get the value from a foo(<param_value>) style call */ |
7781 IN_param_value = function_call_param_iterator.next(); |
9089 if (IN_param_value == NULL) |
7782 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9090 IN_param_value = function_call_param_iterator.next(); |
7783 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9091 if (IN_param_value != NULL) { |
7784 |
9092 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7785 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9093 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7786 { |
9094 } |
7787 |
9095 |
|
9096 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9097 { |
|
9098 |
|
9099 |
|
9100 if (IN_type_symbol == NULL) |
|
9101 IN_type_symbol = last_type_symbol; |
7788 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9102 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7789 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
9103 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
7790 function_type_prefix = return_type_symbol; |
9104 function_type_prefix = return_type_symbol; |
7791 break; |
9105 break; |
7792 |
9106 |
7808 |
9122 |
7809 { |
9123 { |
7810 identifier_c param_name("IN"); |
9124 identifier_c param_name("IN"); |
7811 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9125 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7812 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9126 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7813 |
9127 symbol_c *IN_type_symbol = NULL; |
7814 /* Get the value from a foo(<param_value>) style call */ |
9128 |
7815 if (IN_param_value == NULL) |
9129 /* Get the value from a foo(<param_value>) style call */ |
7816 IN_param_value = function_call_param_iterator.next(); |
9130 if (IN_param_value == NULL) |
7817 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9131 IN_param_value = function_call_param_iterator.next(); |
7818 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9132 if (IN_param_value != NULL) { |
7819 |
9133 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7820 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9134 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7821 { |
9135 } |
7822 |
9136 |
|
9137 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9138 { |
|
9139 |
|
9140 |
|
9141 if (IN_type_symbol == NULL) |
|
9142 IN_type_symbol = last_type_symbol; |
7823 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9143 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7824 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
9144 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
7825 function_type_prefix = return_type_symbol; |
9145 function_type_prefix = return_type_symbol; |
7826 break; |
9146 break; |
7827 |
9147 |
7843 |
9163 |
7844 { |
9164 { |
7845 identifier_c param_name("IN"); |
9165 identifier_c param_name("IN"); |
7846 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9166 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7847 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9167 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7848 |
9168 symbol_c *IN_type_symbol = NULL; |
7849 /* Get the value from a foo(<param_value>) style call */ |
9169 |
7850 if (IN_param_value == NULL) |
9170 /* Get the value from a foo(<param_value>) style call */ |
7851 IN_param_value = function_call_param_iterator.next(); |
9171 if (IN_param_value == NULL) |
7852 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9172 IN_param_value = function_call_param_iterator.next(); |
7853 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9173 if (IN_param_value != NULL) { |
7854 |
9174 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7855 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9175 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
9176 } |
|
9177 |
|
9178 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
7856 { |
9179 { |
7857 |
9180 |
7858 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
9181 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9182 |
|
9183 if (IN_type_symbol == NULL) |
|
9184 IN_type_symbol = last_type_symbol; |
7859 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9185 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7860 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
9186 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
7861 function_type_prefix = return_type_symbol; |
9187 function_type_prefix = return_type_symbol; |
7862 break; |
9188 break; |
7863 |
9189 |
7879 |
9205 |
7880 { |
9206 { |
7881 identifier_c param_name("IN"); |
9207 identifier_c param_name("IN"); |
7882 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9208 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7883 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9209 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7884 |
9210 symbol_c *IN_type_symbol = NULL; |
7885 /* Get the value from a foo(<param_value>) style call */ |
9211 |
7886 if (IN_param_value == NULL) |
9212 /* Get the value from a foo(<param_value>) style call */ |
7887 IN_param_value = function_call_param_iterator.next(); |
9213 if (IN_param_value == NULL) |
7888 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9214 IN_param_value = function_call_param_iterator.next(); |
7889 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9215 if (IN_param_value != NULL) { |
7890 |
9216 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7891 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9217 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7892 { |
9218 } |
7893 |
9219 |
|
9220 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9221 { |
|
9222 |
|
9223 |
|
9224 if (IN_type_symbol == NULL) |
|
9225 IN_type_symbol = last_type_symbol; |
7894 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9226 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7895 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
9227 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
7896 function_type_prefix = return_type_symbol; |
9228 function_type_prefix = return_type_symbol; |
7897 break; |
9229 break; |
7898 |
9230 |
7914 |
9246 |
7915 { |
9247 { |
7916 identifier_c param_name("IN"); |
9248 identifier_c param_name("IN"); |
7917 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9249 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7918 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9250 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7919 |
9251 symbol_c *IN_type_symbol = NULL; |
7920 /* Get the value from a foo(<param_value>) style call */ |
9252 |
7921 if (IN_param_value == NULL) |
9253 /* Get the value from a foo(<param_value>) style call */ |
7922 IN_param_value = function_call_param_iterator.next(); |
9254 if (IN_param_value == NULL) |
7923 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9255 IN_param_value = function_call_param_iterator.next(); |
7924 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9256 if (IN_param_value != NULL) { |
7925 |
9257 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7926 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9258 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
9259 } |
|
9260 |
|
9261 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
7927 { |
9262 { |
7928 |
9263 |
7929 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
9264 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9265 |
|
9266 if (IN_type_symbol == NULL) |
|
9267 IN_type_symbol = last_type_symbol; |
7930 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9268 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7931 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
9269 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
7932 function_type_prefix = return_type_symbol; |
9270 function_type_prefix = return_type_symbol; |
7933 break; |
9271 break; |
7934 |
9272 |
7950 |
9288 |
7951 { |
9289 { |
7952 identifier_c param_name("IN"); |
9290 identifier_c param_name("IN"); |
7953 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9291 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7954 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9292 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7955 |
9293 symbol_c *IN_type_symbol = NULL; |
7956 /* Get the value from a foo(<param_value>) style call */ |
9294 |
7957 if (IN_param_value == NULL) |
9295 /* Get the value from a foo(<param_value>) style call */ |
7958 IN_param_value = function_call_param_iterator.next(); |
9296 if (IN_param_value == NULL) |
7959 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9297 IN_param_value = function_call_param_iterator.next(); |
7960 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9298 if (IN_param_value != NULL) { |
7961 |
9299 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7962 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9300 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
9301 } |
|
9302 |
|
9303 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
7963 { |
9304 { |
7964 |
9305 |
7965 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
9306 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9307 |
|
9308 if (IN_type_symbol == NULL) |
|
9309 IN_type_symbol = last_type_symbol; |
7966 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9310 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
7967 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
9311 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
7968 function_type_prefix = return_type_symbol; |
9312 function_type_prefix = return_type_symbol; |
7969 break; |
9313 break; |
7970 |
9314 |
7986 |
9330 |
7987 { |
9331 { |
7988 identifier_c param_name("IN"); |
9332 identifier_c param_name("IN"); |
7989 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9333 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
7990 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9334 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
7991 |
9335 symbol_c *IN_type_symbol = NULL; |
7992 /* Get the value from a foo(<param_value>) style call */ |
9336 |
7993 if (IN_param_value == NULL) |
9337 /* Get the value from a foo(<param_value>) style call */ |
7994 IN_param_value = function_call_param_iterator.next(); |
9338 if (IN_param_value == NULL) |
7995 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9339 IN_param_value = function_call_param_iterator.next(); |
7996 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9340 if (IN_param_value != NULL) { |
7997 |
9341 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
7998 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9342 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
7999 { |
9343 } |
8000 |
9344 |
|
9345 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9346 { |
|
9347 |
|
9348 |
|
9349 if (IN_type_symbol == NULL) |
|
9350 IN_type_symbol = last_type_symbol; |
8001 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9351 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8002 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
9352 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
8003 function_type_prefix = return_type_symbol; |
9353 function_type_prefix = return_type_symbol; |
8004 break; |
9354 break; |
8005 |
9355 |
8021 |
9371 |
8022 { |
9372 { |
8023 identifier_c param_name("IN"); |
9373 identifier_c param_name("IN"); |
8024 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9374 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8025 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9375 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8026 |
9376 symbol_c *IN_type_symbol = NULL; |
8027 /* Get the value from a foo(<param_value>) style call */ |
9377 |
8028 if (IN_param_value == NULL) |
9378 /* Get the value from a foo(<param_value>) style call */ |
8029 IN_param_value = function_call_param_iterator.next(); |
9379 if (IN_param_value == NULL) |
8030 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9380 IN_param_value = function_call_param_iterator.next(); |
8031 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9381 if (IN_param_value != NULL) { |
8032 |
9382 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8033 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9383 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8034 { |
9384 } |
8035 |
9385 |
|
9386 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9387 { |
|
9388 |
|
9389 |
|
9390 if (IN_type_symbol == NULL) |
|
9391 IN_type_symbol = last_type_symbol; |
8036 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9392 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8037 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
9393 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
8038 function_type_prefix = return_type_symbol; |
9394 function_type_prefix = return_type_symbol; |
8039 break; |
9395 break; |
8040 |
9396 |
8056 |
9412 |
8057 { |
9413 { |
8058 identifier_c param_name("IN"); |
9414 identifier_c param_name("IN"); |
8059 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9415 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8060 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9416 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8061 |
9417 symbol_c *IN_type_symbol = NULL; |
8062 /* Get the value from a foo(<param_value>) style call */ |
9418 |
8063 if (IN_param_value == NULL) |
9419 /* Get the value from a foo(<param_value>) style call */ |
8064 IN_param_value = function_call_param_iterator.next(); |
9420 if (IN_param_value == NULL) |
8065 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9421 IN_param_value = function_call_param_iterator.next(); |
8066 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9422 if (IN_param_value != NULL) { |
8067 |
9423 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8068 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9424 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
9425 } |
|
9426 |
|
9427 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
8069 { |
9428 { |
8070 |
9429 |
8071 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
9430 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
9431 |
|
9432 if (IN_type_symbol == NULL) |
|
9433 IN_type_symbol = last_type_symbol; |
8072 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9434 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8073 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
9435 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
8074 function_type_prefix = return_type_symbol; |
9436 function_type_prefix = return_type_symbol; |
8075 break; |
9437 break; |
8076 |
9438 |
8092 |
9454 |
8093 { |
9455 { |
8094 identifier_c param_name("IN"); |
9456 identifier_c param_name("IN"); |
8095 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9457 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8096 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9458 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8097 |
9459 symbol_c *IN_type_symbol = NULL; |
8098 /* Get the value from a foo(<param_value>) style call */ |
9460 |
8099 if (IN_param_value == NULL) |
9461 /* Get the value from a foo(<param_value>) style call */ |
8100 IN_param_value = function_call_param_iterator.next(); |
9462 if (IN_param_value == NULL) |
8101 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9463 IN_param_value = function_call_param_iterator.next(); |
8102 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9464 if (IN_param_value != NULL) { |
8103 |
9465 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8104 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9466 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8105 { |
9467 } |
8106 |
9468 |
|
9469 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9470 { |
|
9471 |
|
9472 |
|
9473 if (IN_type_symbol == NULL) |
|
9474 IN_type_symbol = last_type_symbol; |
8107 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9475 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8108 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
9476 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
8109 function_type_prefix = return_type_symbol; |
9477 function_type_prefix = return_type_symbol; |
8110 break; |
9478 break; |
8111 |
9479 |
8127 |
9495 |
8128 { |
9496 { |
8129 identifier_c param_name("IN"); |
9497 identifier_c param_name("IN"); |
8130 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9498 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8131 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9499 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8132 |
9500 symbol_c *IN_type_symbol = NULL; |
8133 /* Get the value from a foo(<param_value>) style call */ |
9501 |
8134 if (IN_param_value == NULL) |
9502 /* Get the value from a foo(<param_value>) style call */ |
8135 IN_param_value = function_call_param_iterator.next(); |
9503 if (IN_param_value == NULL) |
8136 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9504 IN_param_value = function_call_param_iterator.next(); |
8137 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9505 if (IN_param_value != NULL) { |
8138 |
9506 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8139 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9507 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8140 { |
9508 } |
8141 |
9509 |
|
9510 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9511 { |
|
9512 |
|
9513 |
|
9514 if (IN_type_symbol == NULL) |
|
9515 IN_type_symbol = last_type_symbol; |
8142 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9516 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8143 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
9517 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
8144 function_type_prefix = return_type_symbol; |
9518 function_type_prefix = return_type_symbol; |
8145 break; |
9519 break; |
8146 |
9520 |
8162 |
9536 |
8163 { |
9537 { |
8164 identifier_c param_name("IN"); |
9538 identifier_c param_name("IN"); |
8165 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9539 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8166 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9540 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8167 |
9541 symbol_c *IN_type_symbol = NULL; |
8168 /* Get the value from a foo(<param_value>) style call */ |
9542 |
8169 if (IN_param_value == NULL) |
9543 /* Get the value from a foo(<param_value>) style call */ |
8170 IN_param_value = function_call_param_iterator.next(); |
9544 if (IN_param_value == NULL) |
8171 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9545 IN_param_value = function_call_param_iterator.next(); |
8172 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9546 if (IN_param_value != NULL) { |
8173 |
9547 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8174 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9548 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8175 { |
9549 } |
8176 |
9550 |
|
9551 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9552 { |
|
9553 |
|
9554 |
|
9555 if (IN_type_symbol == NULL) |
|
9556 IN_type_symbol = last_type_symbol; |
8177 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9557 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8178 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
9558 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
8179 function_type_prefix = return_type_symbol; |
9559 function_type_prefix = return_type_symbol; |
8180 break; |
9560 break; |
8181 |
9561 |
8197 |
9577 |
8198 { |
9578 { |
8199 identifier_c param_name("IN"); |
9579 identifier_c param_name("IN"); |
8200 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9580 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8201 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9581 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8202 |
9582 symbol_c *IN_type_symbol = NULL; |
8203 /* Get the value from a foo(<param_value>) style call */ |
9583 |
8204 if (IN_param_value == NULL) |
9584 /* Get the value from a foo(<param_value>) style call */ |
8205 IN_param_value = function_call_param_iterator.next(); |
9585 if (IN_param_value == NULL) |
8206 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9586 IN_param_value = function_call_param_iterator.next(); |
8207 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9587 if (IN_param_value != NULL) { |
8208 |
9588 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8209 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9589 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8210 { |
9590 } |
8211 |
9591 |
|
9592 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9593 { |
|
9594 |
|
9595 |
|
9596 if (IN_type_symbol == NULL) |
|
9597 IN_type_symbol = last_type_symbol; |
8212 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9598 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8213 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
9599 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
8214 function_type_prefix = return_type_symbol; |
9600 function_type_prefix = return_type_symbol; |
8215 break; |
9601 break; |
8216 |
9602 |
8232 |
9618 |
8233 { |
9619 { |
8234 identifier_c param_name("IN"); |
9620 identifier_c param_name("IN"); |
8235 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9621 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8236 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9622 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8237 |
9623 symbol_c *IN_type_symbol = NULL; |
8238 /* Get the value from a foo(<param_value>) style call */ |
9624 |
8239 if (IN_param_value == NULL) |
9625 /* Get the value from a foo(<param_value>) style call */ |
8240 IN_param_value = function_call_param_iterator.next(); |
9626 if (IN_param_value == NULL) |
8241 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9627 IN_param_value = function_call_param_iterator.next(); |
8242 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9628 if (IN_param_value != NULL) { |
8243 |
9629 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8244 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9630 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8245 { |
9631 } |
8246 |
9632 |
|
9633 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9634 { |
|
9635 |
|
9636 |
|
9637 if (IN_type_symbol == NULL) |
|
9638 IN_type_symbol = last_type_symbol; |
8247 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9639 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8248 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
9640 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
8249 function_type_prefix = return_type_symbol; |
9641 function_type_prefix = return_type_symbol; |
8250 break; |
9642 break; |
8251 |
9643 |
8267 |
9659 |
8268 { |
9660 { |
8269 identifier_c param_name("IN"); |
9661 identifier_c param_name("IN"); |
8270 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9662 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8271 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9663 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8272 |
9664 symbol_c *IN_type_symbol = NULL; |
8273 /* Get the value from a foo(<param_value>) style call */ |
9665 |
8274 if (IN_param_value == NULL) |
9666 /* Get the value from a foo(<param_value>) style call */ |
8275 IN_param_value = function_call_param_iterator.next(); |
9667 if (IN_param_value == NULL) |
8276 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9668 IN_param_value = function_call_param_iterator.next(); |
8277 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9669 if (IN_param_value != NULL) { |
8278 |
9670 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8279 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9671 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8280 { |
9672 } |
8281 |
9673 |
|
9674 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9675 { |
|
9676 |
|
9677 |
|
9678 if (IN_type_symbol == NULL) |
|
9679 IN_type_symbol = last_type_symbol; |
8282 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9680 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8283 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
9681 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
8284 function_type_prefix = return_type_symbol; |
9682 function_type_prefix = return_type_symbol; |
8285 break; |
9683 break; |
8286 |
9684 |
8302 |
9700 |
8303 { |
9701 { |
8304 identifier_c param_name("IN"); |
9702 identifier_c param_name("IN"); |
8305 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9703 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8306 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9704 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8307 |
9705 symbol_c *IN_type_symbol = NULL; |
8308 /* Get the value from a foo(<param_value>) style call */ |
9706 |
8309 if (IN_param_value == NULL) |
9707 /* Get the value from a foo(<param_value>) style call */ |
8310 IN_param_value = function_call_param_iterator.next(); |
9708 if (IN_param_value == NULL) |
8311 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9709 IN_param_value = function_call_param_iterator.next(); |
8312 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9710 if (IN_param_value != NULL) { |
8313 |
9711 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8314 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9712 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
9713 } |
|
9714 |
|
9715 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
8315 { |
9716 { |
8316 |
9717 |
8317 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
9718 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
9719 |
|
9720 if (IN_type_symbol == NULL) |
|
9721 IN_type_symbol = last_type_symbol; |
8318 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9722 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8319 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
9723 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
8320 function_type_prefix = return_type_symbol; |
9724 function_type_prefix = return_type_symbol; |
8321 break; |
9725 break; |
8322 |
9726 |
8338 |
9742 |
8339 { |
9743 { |
8340 identifier_c param_name("IN"); |
9744 identifier_c param_name("IN"); |
8341 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9745 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8342 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9746 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8343 |
9747 symbol_c *IN_type_symbol = NULL; |
8344 /* Get the value from a foo(<param_value>) style call */ |
9748 |
8345 if (IN_param_value == NULL) |
9749 /* Get the value from a foo(<param_value>) style call */ |
8346 IN_param_value = function_call_param_iterator.next(); |
9750 if (IN_param_value == NULL) |
8347 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9751 IN_param_value = function_call_param_iterator.next(); |
8348 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9752 if (IN_param_value != NULL) { |
8349 |
9753 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8350 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
9754 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8351 { |
9755 } |
8352 |
9756 |
|
9757 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
|
9758 { |
|
9759 |
|
9760 |
|
9761 if (IN_type_symbol == NULL) |
|
9762 IN_type_symbol = last_type_symbol; |
8353 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9763 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8354 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
9764 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
8355 function_type_prefix = return_type_symbol; |
9765 function_type_prefix = return_type_symbol; |
8356 break; |
9766 break; |
8357 |
9767 |
8373 |
9783 |
8374 { |
9784 { |
8375 identifier_c param_name("IN"); |
9785 identifier_c param_name("IN"); |
8376 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9786 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8377 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9787 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8378 |
9788 symbol_c *IN_type_symbol = NULL; |
8379 /* Get the value from a foo(<param_value>) style call */ |
9789 |
8380 if (IN_param_value == NULL) |
9790 /* Get the value from a foo(<param_value>) style call */ |
8381 IN_param_value = function_call_param_iterator.next(); |
9791 if (IN_param_value == NULL) |
8382 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9792 IN_param_value = function_call_param_iterator.next(); |
8383 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9793 if (IN_param_value != NULL) { |
8384 |
9794 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8385 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
9795 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8386 { |
9796 } |
8387 |
9797 |
|
9798 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9799 { |
|
9800 |
|
9801 |
|
9802 if (IN_type_symbol == NULL) |
|
9803 IN_type_symbol = last_type_symbol; |
8388 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9804 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8389 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
9805 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
8390 function_type_prefix = return_type_symbol; |
9806 function_type_prefix = return_type_symbol; |
8391 break; |
9807 break; |
8392 |
9808 |
8408 |
9824 |
8409 { |
9825 { |
8410 identifier_c param_name("IN"); |
9826 identifier_c param_name("IN"); |
8411 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9827 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8412 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9828 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8413 |
9829 symbol_c *IN_type_symbol = NULL; |
8414 /* Get the value from a foo(<param_value>) style call */ |
9830 |
8415 if (IN_param_value == NULL) |
9831 /* Get the value from a foo(<param_value>) style call */ |
8416 IN_param_value = function_call_param_iterator.next(); |
9832 if (IN_param_value == NULL) |
8417 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9833 IN_param_value = function_call_param_iterator.next(); |
8418 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9834 if (IN_param_value != NULL) { |
8419 |
9835 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8420 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
9836 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8421 { |
9837 } |
8422 |
9838 |
|
9839 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9840 { |
|
9841 |
|
9842 |
|
9843 if (IN_type_symbol == NULL) |
|
9844 IN_type_symbol = last_type_symbol; |
8423 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9845 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8424 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
9846 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
8425 function_type_prefix = return_type_symbol; |
9847 function_type_prefix = return_type_symbol; |
8426 break; |
9848 break; |
8427 |
9849 |
8443 |
9865 |
8444 { |
9866 { |
8445 identifier_c param_name("IN"); |
9867 identifier_c param_name("IN"); |
8446 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9868 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8447 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9869 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8448 |
9870 symbol_c *IN_type_symbol = NULL; |
8449 /* Get the value from a foo(<param_value>) style call */ |
9871 |
8450 if (IN_param_value == NULL) |
9872 /* Get the value from a foo(<param_value>) style call */ |
8451 IN_param_value = function_call_param_iterator.next(); |
9873 if (IN_param_value == NULL) |
8452 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9874 IN_param_value = function_call_param_iterator.next(); |
8453 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9875 if (IN_param_value != NULL) { |
8454 |
9876 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8455 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
9877 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8456 { |
9878 } |
8457 |
9879 |
|
9880 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9881 { |
|
9882 |
|
9883 |
|
9884 if (IN_type_symbol == NULL) |
|
9885 IN_type_symbol = last_type_symbol; |
8458 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9886 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8459 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
9887 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
8460 function_type_prefix = return_type_symbol; |
9888 function_type_prefix = return_type_symbol; |
8461 break; |
9889 break; |
8462 |
9890 |
8478 |
9906 |
8479 { |
9907 { |
8480 identifier_c param_name("IN"); |
9908 identifier_c param_name("IN"); |
8481 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9909 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8482 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9910 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8483 |
9911 symbol_c *IN_type_symbol = NULL; |
8484 /* Get the value from a foo(<param_value>) style call */ |
9912 |
8485 if (IN_param_value == NULL) |
9913 /* Get the value from a foo(<param_value>) style call */ |
8486 IN_param_value = function_call_param_iterator.next(); |
9914 if (IN_param_value == NULL) |
8487 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9915 IN_param_value = function_call_param_iterator.next(); |
8488 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9916 if (IN_param_value != NULL) { |
8489 |
9917 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8490 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
9918 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8491 { |
9919 } |
8492 |
9920 |
|
9921 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
9922 { |
|
9923 |
|
9924 |
|
9925 if (IN_type_symbol == NULL) |
|
9926 IN_type_symbol = last_type_symbol; |
8493 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9927 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8494 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
9928 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
8495 function_type_prefix = return_type_symbol; |
9929 function_type_prefix = return_type_symbol; |
8496 break; |
9930 break; |
8497 |
9931 |
8513 |
9947 |
8514 { |
9948 { |
8515 identifier_c param_name("IN"); |
9949 identifier_c param_name("IN"); |
8516 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9950 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8517 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9951 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8518 |
9952 symbol_c *IN_type_symbol = NULL; |
8519 /* Get the value from a foo(<param_value>) style call */ |
9953 |
8520 if (IN_param_value == NULL) |
9954 /* Get the value from a foo(<param_value>) style call */ |
8521 IN_param_value = function_call_param_iterator.next(); |
9955 if (IN_param_value == NULL) |
8522 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9956 IN_param_value = function_call_param_iterator.next(); |
8523 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9957 if (IN_param_value != NULL) { |
8524 |
9958 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8525 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
9959 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
9960 } |
|
9961 |
|
9962 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
8526 { |
9963 { |
8527 |
9964 |
8528 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
9965 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
9966 |
|
9967 if (IN_type_symbol == NULL) |
|
9968 IN_type_symbol = last_type_symbol; |
8529 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9969 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8530 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
9970 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
8531 function_type_prefix = return_type_symbol; |
9971 function_type_prefix = return_type_symbol; |
8532 break; |
9972 break; |
8533 |
9973 |
8549 |
9989 |
8550 { |
9990 { |
8551 identifier_c param_name("IN"); |
9991 identifier_c param_name("IN"); |
8552 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9992 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8553 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9993 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8554 |
9994 symbol_c *IN_type_symbol = NULL; |
8555 /* Get the value from a foo(<param_value>) style call */ |
9995 |
8556 if (IN_param_value == NULL) |
9996 /* Get the value from a foo(<param_value>) style call */ |
8557 IN_param_value = function_call_param_iterator.next(); |
9997 if (IN_param_value == NULL) |
8558 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9998 IN_param_value = function_call_param_iterator.next(); |
8559 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9999 if (IN_param_value != NULL) { |
8560 |
10000 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8561 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10001 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8562 { |
10002 } |
8563 |
10003 |
|
10004 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
10005 { |
|
10006 |
|
10007 |
|
10008 if (IN_type_symbol == NULL) |
|
10009 IN_type_symbol = last_type_symbol; |
8564 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10010 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8565 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
10011 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
8566 function_type_prefix = return_type_symbol; |
10012 function_type_prefix = return_type_symbol; |
8567 break; |
10013 break; |
8568 |
10014 |
8584 |
10030 |
8585 { |
10031 { |
8586 identifier_c param_name("IN"); |
10032 identifier_c param_name("IN"); |
8587 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10033 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8588 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10034 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8589 |
10035 symbol_c *IN_type_symbol = NULL; |
8590 /* Get the value from a foo(<param_value>) style call */ |
10036 |
8591 if (IN_param_value == NULL) |
10037 /* Get the value from a foo(<param_value>) style call */ |
8592 IN_param_value = function_call_param_iterator.next(); |
10038 if (IN_param_value == NULL) |
8593 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10039 IN_param_value = function_call_param_iterator.next(); |
8594 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10040 if (IN_param_value != NULL) { |
8595 |
10041 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8596 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10042 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
10043 } |
|
10044 |
|
10045 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
8597 { |
10046 { |
8598 |
10047 |
8599 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
10048 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
10049 |
|
10050 if (IN_type_symbol == NULL) |
|
10051 IN_type_symbol = last_type_symbol; |
8600 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10052 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8601 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
10053 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
8602 function_type_prefix = return_type_symbol; |
10054 function_type_prefix = return_type_symbol; |
8603 break; |
10055 break; |
8604 |
10056 |
8620 |
10072 |
8621 { |
10073 { |
8622 identifier_c param_name("IN"); |
10074 identifier_c param_name("IN"); |
8623 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10075 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8624 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10076 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8625 |
10077 symbol_c *IN_type_symbol = NULL; |
8626 /* Get the value from a foo(<param_value>) style call */ |
10078 |
8627 if (IN_param_value == NULL) |
10079 /* Get the value from a foo(<param_value>) style call */ |
8628 IN_param_value = function_call_param_iterator.next(); |
10080 if (IN_param_value == NULL) |
8629 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10081 IN_param_value = function_call_param_iterator.next(); |
8630 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10082 if (IN_param_value != NULL) { |
8631 |
10083 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8632 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10084 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
10085 } |
|
10086 |
|
10087 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
8633 { |
10088 { |
8634 |
10089 |
8635 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
10090 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
10091 |
|
10092 if (IN_type_symbol == NULL) |
|
10093 IN_type_symbol = last_type_symbol; |
8636 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10094 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8637 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
10095 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
8638 function_type_prefix = return_type_symbol; |
10096 function_type_prefix = return_type_symbol; |
8639 break; |
10097 break; |
8640 |
10098 |
8656 |
10114 |
8657 { |
10115 { |
8658 identifier_c param_name("IN"); |
10116 identifier_c param_name("IN"); |
8659 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10117 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8660 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10118 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8661 |
10119 symbol_c *IN_type_symbol = NULL; |
8662 /* Get the value from a foo(<param_value>) style call */ |
10120 |
8663 if (IN_param_value == NULL) |
10121 /* Get the value from a foo(<param_value>) style call */ |
8664 IN_param_value = function_call_param_iterator.next(); |
10122 if (IN_param_value == NULL) |
8665 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10123 IN_param_value = function_call_param_iterator.next(); |
8666 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10124 if (IN_param_value != NULL) { |
8667 |
10125 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8668 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10126 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8669 { |
10127 } |
8670 |
10128 |
|
10129 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
10130 { |
|
10131 |
|
10132 |
|
10133 if (IN_type_symbol == NULL) |
|
10134 IN_type_symbol = last_type_symbol; |
8671 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10135 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8672 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
10136 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
8673 function_type_prefix = return_type_symbol; |
10137 function_type_prefix = return_type_symbol; |
8674 break; |
10138 break; |
8675 |
10139 |
8691 |
10155 |
8692 { |
10156 { |
8693 identifier_c param_name("IN"); |
10157 identifier_c param_name("IN"); |
8694 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10158 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8695 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10159 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8696 |
10160 symbol_c *IN_type_symbol = NULL; |
8697 /* Get the value from a foo(<param_value>) style call */ |
10161 |
8698 if (IN_param_value == NULL) |
10162 /* Get the value from a foo(<param_value>) style call */ |
8699 IN_param_value = function_call_param_iterator.next(); |
10163 if (IN_param_value == NULL) |
8700 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10164 IN_param_value = function_call_param_iterator.next(); |
8701 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10165 if (IN_param_value != NULL) { |
8702 |
10166 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8703 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10167 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8704 { |
10168 } |
8705 |
10169 |
|
10170 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
10171 { |
|
10172 |
|
10173 |
|
10174 if (IN_type_symbol == NULL) |
|
10175 IN_type_symbol = last_type_symbol; |
8706 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10176 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8707 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
10177 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
8708 function_type_prefix = return_type_symbol; |
10178 function_type_prefix = return_type_symbol; |
8709 break; |
10179 break; |
8710 |
10180 |
8726 |
10196 |
8727 { |
10197 { |
8728 identifier_c param_name("IN"); |
10198 identifier_c param_name("IN"); |
8729 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10199 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8730 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10200 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8731 |
10201 symbol_c *IN_type_symbol = NULL; |
8732 /* Get the value from a foo(<param_value>) style call */ |
10202 |
8733 if (IN_param_value == NULL) |
10203 /* Get the value from a foo(<param_value>) style call */ |
8734 IN_param_value = function_call_param_iterator.next(); |
10204 if (IN_param_value == NULL) |
8735 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10205 IN_param_value = function_call_param_iterator.next(); |
8736 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10206 if (IN_param_value != NULL) { |
8737 |
10207 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8738 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10208 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
10209 } |
|
10210 |
|
10211 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
8739 { |
10212 { |
8740 |
10213 |
8741 function_name = (symbol_c*)(new pragma_c("__real_to_string")); |
10214 function_name = (symbol_c*)(new pragma_c("__real_to_string")); |
|
10215 |
|
10216 if (IN_type_symbol == NULL) |
|
10217 IN_type_symbol = last_type_symbol; |
8742 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10218 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8743 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
10219 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
8744 function_type_prefix = return_type_symbol; |
10220 function_type_prefix = return_type_symbol; |
8745 break; |
10221 break; |
8746 |
10222 |
8762 |
10238 |
8763 { |
10239 { |
8764 identifier_c param_name("IN"); |
10240 identifier_c param_name("IN"); |
8765 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10241 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8766 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10242 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8767 |
10243 symbol_c *IN_type_symbol = NULL; |
8768 /* Get the value from a foo(<param_value>) style call */ |
10244 |
8769 if (IN_param_value == NULL) |
10245 /* Get the value from a foo(<param_value>) style call */ |
8770 IN_param_value = function_call_param_iterator.next(); |
10246 if (IN_param_value == NULL) |
8771 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10247 IN_param_value = function_call_param_iterator.next(); |
8772 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10248 if (IN_param_value != NULL) { |
8773 |
10249 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8774 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10250 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8775 { |
10251 } |
8776 |
10252 |
|
10253 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
10254 { |
|
10255 |
|
10256 |
|
10257 if (IN_type_symbol == NULL) |
|
10258 IN_type_symbol = last_type_symbol; |
8777 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10259 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8778 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
10260 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
8779 function_type_prefix = return_type_symbol; |
10261 function_type_prefix = return_type_symbol; |
8780 break; |
10262 break; |
8781 |
10263 |
8797 |
10279 |
8798 { |
10280 { |
8799 identifier_c param_name("IN"); |
10281 identifier_c param_name("IN"); |
8800 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10282 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8801 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10283 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8802 |
10284 symbol_c *IN_type_symbol = NULL; |
8803 /* Get the value from a foo(<param_value>) style call */ |
10285 |
8804 if (IN_param_value == NULL) |
10286 /* Get the value from a foo(<param_value>) style call */ |
8805 IN_param_value = function_call_param_iterator.next(); |
10287 if (IN_param_value == NULL) |
8806 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10288 IN_param_value = function_call_param_iterator.next(); |
8807 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10289 if (IN_param_value != NULL) { |
8808 |
10290 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8809 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10291 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8810 { |
10292 } |
8811 |
10293 |
|
10294 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
10295 { |
|
10296 |
|
10297 |
|
10298 if (IN_type_symbol == NULL) |
|
10299 IN_type_symbol = last_type_symbol; |
8812 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10300 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8813 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
10301 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
8814 function_type_prefix = return_type_symbol; |
10302 function_type_prefix = return_type_symbol; |
8815 break; |
10303 break; |
8816 |
10304 |
8832 |
10320 |
8833 { |
10321 { |
8834 identifier_c param_name("IN"); |
10322 identifier_c param_name("IN"); |
8835 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10323 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8836 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10324 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8837 |
10325 symbol_c *IN_type_symbol = NULL; |
8838 /* Get the value from a foo(<param_value>) style call */ |
10326 |
8839 if (IN_param_value == NULL) |
10327 /* Get the value from a foo(<param_value>) style call */ |
8840 IN_param_value = function_call_param_iterator.next(); |
10328 if (IN_param_value == NULL) |
8841 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10329 IN_param_value = function_call_param_iterator.next(); |
8842 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10330 if (IN_param_value != NULL) { |
8843 |
10331 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8844 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10332 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8845 { |
10333 } |
8846 |
10334 |
|
10335 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
10336 { |
|
10337 |
|
10338 |
|
10339 if (IN_type_symbol == NULL) |
|
10340 IN_type_symbol = last_type_symbol; |
8847 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10341 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8848 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
10342 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
8849 function_type_prefix = return_type_symbol; |
10343 function_type_prefix = return_type_symbol; |
8850 break; |
10344 break; |
8851 |
10345 |
8867 |
10361 |
8868 { |
10362 { |
8869 identifier_c param_name("IN"); |
10363 identifier_c param_name("IN"); |
8870 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10364 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8871 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10365 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8872 |
10366 symbol_c *IN_type_symbol = NULL; |
8873 /* Get the value from a foo(<param_value>) style call */ |
10367 |
8874 if (IN_param_value == NULL) |
10368 /* Get the value from a foo(<param_value>) style call */ |
8875 IN_param_value = function_call_param_iterator.next(); |
10369 if (IN_param_value == NULL) |
8876 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10370 IN_param_value = function_call_param_iterator.next(); |
8877 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10371 if (IN_param_value != NULL) { |
8878 |
10372 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8879 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10373 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8880 { |
10374 } |
8881 |
10375 |
|
10376 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
10377 { |
|
10378 |
|
10379 |
|
10380 if (IN_type_symbol == NULL) |
|
10381 IN_type_symbol = last_type_symbol; |
8882 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10382 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8883 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
10383 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
8884 function_type_prefix = return_type_symbol; |
10384 function_type_prefix = return_type_symbol; |
8885 break; |
10385 break; |
8886 |
10386 |
8902 |
10402 |
8903 { |
10403 { |
8904 identifier_c param_name("IN"); |
10404 identifier_c param_name("IN"); |
8905 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10405 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8906 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10406 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8907 |
10407 symbol_c *IN_type_symbol = NULL; |
8908 /* Get the value from a foo(<param_value>) style call */ |
10408 |
8909 if (IN_param_value == NULL) |
10409 /* Get the value from a foo(<param_value>) style call */ |
8910 IN_param_value = function_call_param_iterator.next(); |
10410 if (IN_param_value == NULL) |
8911 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10411 IN_param_value = function_call_param_iterator.next(); |
8912 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10412 if (IN_param_value != NULL) { |
8913 |
10413 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8914 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10414 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8915 { |
10415 } |
8916 |
10416 |
|
10417 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
10418 { |
|
10419 |
|
10420 |
|
10421 if (IN_type_symbol == NULL) |
|
10422 IN_type_symbol = last_type_symbol; |
8917 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10423 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8918 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
10424 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
8919 function_type_prefix = return_type_symbol; |
10425 function_type_prefix = return_type_symbol; |
8920 break; |
10426 break; |
8921 |
10427 |
8937 |
10443 |
8938 { |
10444 { |
8939 identifier_c param_name("IN"); |
10445 identifier_c param_name("IN"); |
8940 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10446 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8941 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10447 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8942 |
10448 symbol_c *IN_type_symbol = NULL; |
8943 /* Get the value from a foo(<param_value>) style call */ |
10449 |
8944 if (IN_param_value == NULL) |
10450 /* Get the value from a foo(<param_value>) style call */ |
8945 IN_param_value = function_call_param_iterator.next(); |
10451 if (IN_param_value == NULL) |
8946 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10452 IN_param_value = function_call_param_iterator.next(); |
8947 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10453 if (IN_param_value != NULL) { |
8948 |
10454 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8949 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10455 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
8950 { |
10456 } |
8951 |
10457 |
|
10458 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
10459 { |
|
10460 |
|
10461 |
|
10462 if (IN_type_symbol == NULL) |
|
10463 IN_type_symbol = last_type_symbol; |
8952 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10464 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8953 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
10465 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
8954 function_type_prefix = return_type_symbol; |
10466 function_type_prefix = return_type_symbol; |
8955 break; |
10467 break; |
8956 |
10468 |
8972 |
10484 |
8973 { |
10485 { |
8974 identifier_c param_name("IN"); |
10486 identifier_c param_name("IN"); |
8975 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10487 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
8976 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10488 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
8977 |
10489 symbol_c *IN_type_symbol = NULL; |
8978 /* Get the value from a foo(<param_value>) style call */ |
10490 |
8979 if (IN_param_value == NULL) |
10491 /* Get the value from a foo(<param_value>) style call */ |
8980 IN_param_value = function_call_param_iterator.next(); |
10492 if (IN_param_value == NULL) |
8981 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10493 IN_param_value = function_call_param_iterator.next(); |
8982 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10494 if (IN_param_value != NULL) { |
8983 |
10495 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
8984 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10496 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
10497 } |
|
10498 |
|
10499 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
8985 { |
10500 { |
8986 |
10501 |
8987 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
10502 function_name = (symbol_c*)(new pragma_c("__real_to_time")); |
|
10503 |
|
10504 if (IN_type_symbol == NULL) |
|
10505 IN_type_symbol = last_type_symbol; |
8988 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10506 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
8989 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
10507 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
8990 function_type_prefix = return_type_symbol; |
10508 function_type_prefix = return_type_symbol; |
8991 break; |
10509 break; |
8992 |
10510 |
9008 |
10526 |
9009 { |
10527 { |
9010 identifier_c param_name("IN"); |
10528 identifier_c param_name("IN"); |
9011 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10529 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9012 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10530 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9013 |
10531 symbol_c *IN_type_symbol = NULL; |
9014 /* Get the value from a foo(<param_value>) style call */ |
10532 |
9015 if (IN_param_value == NULL) |
10533 /* Get the value from a foo(<param_value>) style call */ |
9016 IN_param_value = function_call_param_iterator.next(); |
10534 if (IN_param_value == NULL) |
9017 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10535 IN_param_value = function_call_param_iterator.next(); |
9018 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10536 if (IN_param_value != NULL) { |
9019 |
10537 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9020 if(search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
10538 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9021 { |
10539 } |
9022 |
10540 |
|
10541 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lreal_type_name, last_type_symbol)) |
|
10542 { |
|
10543 |
|
10544 |
|
10545 if (IN_type_symbol == NULL) |
|
10546 IN_type_symbol = last_type_symbol; |
9023 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10547 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9024 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
10548 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
9025 function_type_prefix = return_type_symbol; |
10549 function_type_prefix = return_type_symbol; |
9026 break; |
10550 break; |
9027 |
10551 |
9043 |
10567 |
9044 { |
10568 { |
9045 identifier_c param_name("IN"); |
10569 identifier_c param_name("IN"); |
9046 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10570 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9047 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10571 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9048 |
10572 symbol_c *IN_type_symbol = NULL; |
9049 /* Get the value from a foo(<param_value>) style call */ |
10573 |
9050 if (IN_param_value == NULL) |
10574 /* Get the value from a foo(<param_value>) style call */ |
9051 IN_param_value = function_call_param_iterator.next(); |
10575 if (IN_param_value == NULL) |
9052 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10576 IN_param_value = function_call_param_iterator.next(); |
9053 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10577 if (IN_param_value != NULL) { |
9054 |
10578 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9055 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10579 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9056 { |
10580 } |
9057 |
10581 |
|
10582 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
10583 { |
|
10584 |
|
10585 |
|
10586 if (IN_type_symbol == NULL) |
|
10587 IN_type_symbol = last_type_symbol; |
9058 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10588 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9059 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
10589 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
9060 function_type_prefix = return_type_symbol; |
10590 function_type_prefix = return_type_symbol; |
9061 break; |
10591 break; |
9062 |
10592 |
9078 |
10608 |
9079 { |
10609 { |
9080 identifier_c param_name("IN"); |
10610 identifier_c param_name("IN"); |
9081 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10611 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9082 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10612 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9083 |
10613 symbol_c *IN_type_symbol = NULL; |
9084 /* Get the value from a foo(<param_value>) style call */ |
10614 |
9085 if (IN_param_value == NULL) |
10615 /* Get the value from a foo(<param_value>) style call */ |
9086 IN_param_value = function_call_param_iterator.next(); |
10616 if (IN_param_value == NULL) |
9087 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10617 IN_param_value = function_call_param_iterator.next(); |
9088 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10618 if (IN_param_value != NULL) { |
9089 |
10619 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9090 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10620 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9091 { |
10621 } |
9092 |
10622 |
|
10623 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
10624 { |
|
10625 |
|
10626 |
|
10627 if (IN_type_symbol == NULL) |
|
10628 IN_type_symbol = last_type_symbol; |
9093 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10629 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9094 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
10630 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
9095 function_type_prefix = return_type_symbol; |
10631 function_type_prefix = return_type_symbol; |
9096 break; |
10632 break; |
9097 |
10633 |
9113 |
10649 |
9114 { |
10650 { |
9115 identifier_c param_name("IN"); |
10651 identifier_c param_name("IN"); |
9116 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10652 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9117 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10653 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9118 |
10654 symbol_c *IN_type_symbol = NULL; |
9119 /* Get the value from a foo(<param_value>) style call */ |
10655 |
9120 if (IN_param_value == NULL) |
10656 /* Get the value from a foo(<param_value>) style call */ |
9121 IN_param_value = function_call_param_iterator.next(); |
10657 if (IN_param_value == NULL) |
9122 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10658 IN_param_value = function_call_param_iterator.next(); |
9123 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10659 if (IN_param_value != NULL) { |
9124 |
10660 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9125 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10661 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9126 { |
10662 } |
9127 |
10663 |
|
10664 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
10665 { |
|
10666 |
|
10667 |
|
10668 if (IN_type_symbol == NULL) |
|
10669 IN_type_symbol = last_type_symbol; |
9128 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10670 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9129 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
10671 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
9130 function_type_prefix = return_type_symbol; |
10672 function_type_prefix = return_type_symbol; |
9131 break; |
10673 break; |
9132 |
10674 |
9148 |
10690 |
9149 { |
10691 { |
9150 identifier_c param_name("IN"); |
10692 identifier_c param_name("IN"); |
9151 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10693 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9152 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10694 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9153 |
10695 symbol_c *IN_type_symbol = NULL; |
9154 /* Get the value from a foo(<param_value>) style call */ |
10696 |
9155 if (IN_param_value == NULL) |
10697 /* Get the value from a foo(<param_value>) style call */ |
9156 IN_param_value = function_call_param_iterator.next(); |
10698 if (IN_param_value == NULL) |
9157 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10699 IN_param_value = function_call_param_iterator.next(); |
9158 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10700 if (IN_param_value != NULL) { |
9159 |
10701 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9160 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10702 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9161 { |
10703 } |
9162 |
10704 |
|
10705 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
10706 { |
|
10707 |
|
10708 |
|
10709 if (IN_type_symbol == NULL) |
|
10710 IN_type_symbol = last_type_symbol; |
9163 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10711 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9164 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
10712 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
9165 function_type_prefix = return_type_symbol; |
10713 function_type_prefix = return_type_symbol; |
9166 break; |
10714 break; |
9167 |
10715 |
9183 |
10731 |
9184 { |
10732 { |
9185 identifier_c param_name("IN"); |
10733 identifier_c param_name("IN"); |
9186 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10734 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9187 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10735 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9188 |
10736 symbol_c *IN_type_symbol = NULL; |
9189 /* Get the value from a foo(<param_value>) style call */ |
10737 |
9190 if (IN_param_value == NULL) |
10738 /* Get the value from a foo(<param_value>) style call */ |
9191 IN_param_value = function_call_param_iterator.next(); |
10739 if (IN_param_value == NULL) |
9192 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10740 IN_param_value = function_call_param_iterator.next(); |
9193 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10741 if (IN_param_value != NULL) { |
9194 |
10742 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9195 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10743 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
10744 } |
|
10745 |
|
10746 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
9196 { |
10747 { |
9197 |
10748 |
9198 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
10749 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10750 |
|
10751 if (IN_type_symbol == NULL) |
|
10752 IN_type_symbol = last_type_symbol; |
9199 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10753 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9200 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
10754 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
9201 function_type_prefix = return_type_symbol; |
10755 function_type_prefix = return_type_symbol; |
9202 break; |
10756 break; |
9203 |
10757 |
9219 |
10773 |
9220 { |
10774 { |
9221 identifier_c param_name("IN"); |
10775 identifier_c param_name("IN"); |
9222 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10776 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9223 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10777 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9224 |
10778 symbol_c *IN_type_symbol = NULL; |
9225 /* Get the value from a foo(<param_value>) style call */ |
10779 |
9226 if (IN_param_value == NULL) |
10780 /* Get the value from a foo(<param_value>) style call */ |
9227 IN_param_value = function_call_param_iterator.next(); |
10781 if (IN_param_value == NULL) |
9228 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10782 IN_param_value = function_call_param_iterator.next(); |
9229 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10783 if (IN_param_value != NULL) { |
9230 |
10784 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9231 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10785 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9232 { |
10786 } |
9233 |
10787 |
|
10788 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
10789 { |
|
10790 |
|
10791 |
|
10792 if (IN_type_symbol == NULL) |
|
10793 IN_type_symbol = last_type_symbol; |
9234 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10794 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9235 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
10795 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
9236 function_type_prefix = return_type_symbol; |
10796 function_type_prefix = return_type_symbol; |
9237 break; |
10797 break; |
9238 |
10798 |
9254 |
10814 |
9255 { |
10815 { |
9256 identifier_c param_name("IN"); |
10816 identifier_c param_name("IN"); |
9257 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10817 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9258 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10818 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9259 |
10819 symbol_c *IN_type_symbol = NULL; |
9260 /* Get the value from a foo(<param_value>) style call */ |
10820 |
9261 if (IN_param_value == NULL) |
10821 /* Get the value from a foo(<param_value>) style call */ |
9262 IN_param_value = function_call_param_iterator.next(); |
10822 if (IN_param_value == NULL) |
9263 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10823 IN_param_value = function_call_param_iterator.next(); |
9264 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10824 if (IN_param_value != NULL) { |
9265 |
10825 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9266 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10826 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
10827 } |
|
10828 |
|
10829 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
9267 { |
10830 { |
9268 |
10831 |
9269 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
10832 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10833 |
|
10834 if (IN_type_symbol == NULL) |
|
10835 IN_type_symbol = last_type_symbol; |
9270 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10836 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9271 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
10837 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
9272 function_type_prefix = return_type_symbol; |
10838 function_type_prefix = return_type_symbol; |
9273 break; |
10839 break; |
9274 |
10840 |
9290 |
10856 |
9291 { |
10857 { |
9292 identifier_c param_name("IN"); |
10858 identifier_c param_name("IN"); |
9293 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10859 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9294 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10860 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9295 |
10861 symbol_c *IN_type_symbol = NULL; |
9296 /* Get the value from a foo(<param_value>) style call */ |
10862 |
9297 if (IN_param_value == NULL) |
10863 /* Get the value from a foo(<param_value>) style call */ |
9298 IN_param_value = function_call_param_iterator.next(); |
10864 if (IN_param_value == NULL) |
9299 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10865 IN_param_value = function_call_param_iterator.next(); |
9300 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10866 if (IN_param_value != NULL) { |
9301 |
10867 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9302 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10868 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
10869 } |
|
10870 |
|
10871 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
9303 { |
10872 { |
9304 |
10873 |
9305 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
10874 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
10875 |
|
10876 if (IN_type_symbol == NULL) |
|
10877 IN_type_symbol = last_type_symbol; |
9306 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10878 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9307 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
10879 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
9308 function_type_prefix = return_type_symbol; |
10880 function_type_prefix = return_type_symbol; |
9309 break; |
10881 break; |
9310 |
10882 |
9326 |
10898 |
9327 { |
10899 { |
9328 identifier_c param_name("IN"); |
10900 identifier_c param_name("IN"); |
9329 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10901 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9330 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10902 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9331 |
10903 symbol_c *IN_type_symbol = NULL; |
9332 /* Get the value from a foo(<param_value>) style call */ |
10904 |
9333 if (IN_param_value == NULL) |
10905 /* Get the value from a foo(<param_value>) style call */ |
9334 IN_param_value = function_call_param_iterator.next(); |
10906 if (IN_param_value == NULL) |
9335 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10907 IN_param_value = function_call_param_iterator.next(); |
9336 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10908 if (IN_param_value != NULL) { |
9337 |
10909 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9338 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10910 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9339 { |
10911 } |
9340 |
10912 |
|
10913 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
10914 { |
|
10915 |
|
10916 |
|
10917 if (IN_type_symbol == NULL) |
|
10918 IN_type_symbol = last_type_symbol; |
9341 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10919 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9342 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
10920 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
9343 function_type_prefix = return_type_symbol; |
10921 function_type_prefix = return_type_symbol; |
9344 break; |
10922 break; |
9345 |
10923 |
9361 |
10939 |
9362 { |
10940 { |
9363 identifier_c param_name("IN"); |
10941 identifier_c param_name("IN"); |
9364 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10942 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9365 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10943 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9366 |
10944 symbol_c *IN_type_symbol = NULL; |
9367 /* Get the value from a foo(<param_value>) style call */ |
10945 |
9368 if (IN_param_value == NULL) |
10946 /* Get the value from a foo(<param_value>) style call */ |
9369 IN_param_value = function_call_param_iterator.next(); |
10947 if (IN_param_value == NULL) |
9370 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10948 IN_param_value = function_call_param_iterator.next(); |
9371 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10949 if (IN_param_value != NULL) { |
9372 |
10950 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9373 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10951 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9374 { |
10952 } |
9375 |
10953 |
|
10954 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
10955 { |
|
10956 |
|
10957 |
|
10958 if (IN_type_symbol == NULL) |
|
10959 IN_type_symbol = last_type_symbol; |
9376 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10960 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9377 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
10961 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
9378 function_type_prefix = return_type_symbol; |
10962 function_type_prefix = return_type_symbol; |
9379 break; |
10963 break; |
9380 |
10964 |
9396 |
10980 |
9397 { |
10981 { |
9398 identifier_c param_name("IN"); |
10982 identifier_c param_name("IN"); |
9399 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10983 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9400 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10984 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9401 |
10985 symbol_c *IN_type_symbol = NULL; |
9402 /* Get the value from a foo(<param_value>) style call */ |
10986 |
9403 if (IN_param_value == NULL) |
10987 /* Get the value from a foo(<param_value>) style call */ |
9404 IN_param_value = function_call_param_iterator.next(); |
10988 if (IN_param_value == NULL) |
9405 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10989 IN_param_value = function_call_param_iterator.next(); |
9406 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10990 if (IN_param_value != NULL) { |
9407 |
10991 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9408 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
10992 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
10993 } |
|
10994 |
|
10995 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
9409 { |
10996 { |
9410 |
10997 |
9411 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
10998 function_name = (symbol_c*)(new pragma_c("__bit_to_string")); |
|
10999 |
|
11000 if (IN_type_symbol == NULL) |
|
11001 IN_type_symbol = last_type_symbol; |
9412 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11002 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9413 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
11003 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
9414 function_type_prefix = return_type_symbol; |
11004 function_type_prefix = return_type_symbol; |
9415 break; |
11005 break; |
9416 |
11006 |
9432 |
11022 |
9433 { |
11023 { |
9434 identifier_c param_name("IN"); |
11024 identifier_c param_name("IN"); |
9435 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11025 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9436 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11026 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9437 |
11027 symbol_c *IN_type_symbol = NULL; |
9438 /* Get the value from a foo(<param_value>) style call */ |
11028 |
9439 if (IN_param_value == NULL) |
11029 /* Get the value from a foo(<param_value>) style call */ |
9440 IN_param_value = function_call_param_iterator.next(); |
11030 if (IN_param_value == NULL) |
9441 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11031 IN_param_value = function_call_param_iterator.next(); |
9442 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11032 if (IN_param_value != NULL) { |
9443 |
11033 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9444 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
11034 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9445 { |
11035 } |
9446 |
11036 |
|
11037 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
11038 { |
|
11039 |
|
11040 |
|
11041 if (IN_type_symbol == NULL) |
|
11042 IN_type_symbol = last_type_symbol; |
9447 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11043 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9448 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
11044 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
9449 function_type_prefix = return_type_symbol; |
11045 function_type_prefix = return_type_symbol; |
9450 break; |
11046 break; |
9451 |
11047 |
9467 |
11063 |
9468 { |
11064 { |
9469 identifier_c param_name("IN"); |
11065 identifier_c param_name("IN"); |
9470 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11066 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9471 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11067 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9472 |
11068 symbol_c *IN_type_symbol = NULL; |
9473 /* Get the value from a foo(<param_value>) style call */ |
11069 |
9474 if (IN_param_value == NULL) |
11070 /* Get the value from a foo(<param_value>) style call */ |
9475 IN_param_value = function_call_param_iterator.next(); |
11071 if (IN_param_value == NULL) |
9476 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11072 IN_param_value = function_call_param_iterator.next(); |
9477 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11073 if (IN_param_value != NULL) { |
9478 |
11074 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9479 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
11075 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9480 { |
11076 } |
9481 |
11077 |
|
11078 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
11079 { |
|
11080 |
|
11081 |
|
11082 if (IN_type_symbol == NULL) |
|
11083 IN_type_symbol = last_type_symbol; |
9482 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11084 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9483 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
11085 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
9484 function_type_prefix = return_type_symbol; |
11086 function_type_prefix = return_type_symbol; |
9485 break; |
11087 break; |
9486 |
11088 |
9502 |
11104 |
9503 { |
11105 { |
9504 identifier_c param_name("IN"); |
11106 identifier_c param_name("IN"); |
9505 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11107 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9506 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11108 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9507 |
11109 symbol_c *IN_type_symbol = NULL; |
9508 /* Get the value from a foo(<param_value>) style call */ |
11110 |
9509 if (IN_param_value == NULL) |
11111 /* Get the value from a foo(<param_value>) style call */ |
9510 IN_param_value = function_call_param_iterator.next(); |
11112 if (IN_param_value == NULL) |
9511 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11113 IN_param_value = function_call_param_iterator.next(); |
9512 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11114 if (IN_param_value != NULL) { |
9513 |
11115 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9514 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
11116 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9515 { |
11117 } |
9516 |
11118 |
|
11119 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
11120 { |
|
11121 |
|
11122 |
|
11123 if (IN_type_symbol == NULL) |
|
11124 IN_type_symbol = last_type_symbol; |
9517 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11125 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9518 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
11126 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
9519 function_type_prefix = return_type_symbol; |
11127 function_type_prefix = return_type_symbol; |
9520 break; |
11128 break; |
9521 |
11129 |
9537 |
11145 |
9538 { |
11146 { |
9539 identifier_c param_name("IN"); |
11147 identifier_c param_name("IN"); |
9540 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11148 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9541 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11149 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9542 |
11150 symbol_c *IN_type_symbol = NULL; |
9543 /* Get the value from a foo(<param_value>) style call */ |
11151 |
9544 if (IN_param_value == NULL) |
11152 /* Get the value from a foo(<param_value>) style call */ |
9545 IN_param_value = function_call_param_iterator.next(); |
11153 if (IN_param_value == NULL) |
9546 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11154 IN_param_value = function_call_param_iterator.next(); |
9547 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11155 if (IN_param_value != NULL) { |
9548 |
11156 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9549 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
11157 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9550 { |
11158 } |
9551 |
11159 |
|
11160 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
11161 { |
|
11162 |
|
11163 |
|
11164 if (IN_type_symbol == NULL) |
|
11165 IN_type_symbol = last_type_symbol; |
9552 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11166 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9553 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
11167 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
9554 function_type_prefix = return_type_symbol; |
11168 function_type_prefix = return_type_symbol; |
9555 break; |
11169 break; |
9556 |
11170 |
9572 |
11186 |
9573 { |
11187 { |
9574 identifier_c param_name("IN"); |
11188 identifier_c param_name("IN"); |
9575 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11189 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9576 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11190 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9577 |
11191 symbol_c *IN_type_symbol = NULL; |
9578 /* Get the value from a foo(<param_value>) style call */ |
11192 |
9579 if (IN_param_value == NULL) |
11193 /* Get the value from a foo(<param_value>) style call */ |
9580 IN_param_value = function_call_param_iterator.next(); |
11194 if (IN_param_value == NULL) |
9581 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11195 IN_param_value = function_call_param_iterator.next(); |
9582 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11196 if (IN_param_value != NULL) { |
9583 |
11197 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9584 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
11198 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9585 { |
11199 } |
9586 |
11200 |
|
11201 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
11202 { |
|
11203 |
|
11204 |
|
11205 if (IN_type_symbol == NULL) |
|
11206 IN_type_symbol = last_type_symbol; |
9587 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11207 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9588 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
11208 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
9589 function_type_prefix = return_type_symbol; |
11209 function_type_prefix = return_type_symbol; |
9590 break; |
11210 break; |
9591 |
11211 |
9607 |
11227 |
9608 { |
11228 { |
9609 identifier_c param_name("IN"); |
11229 identifier_c param_name("IN"); |
9610 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11230 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9611 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11231 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9612 |
11232 symbol_c *IN_type_symbol = NULL; |
9613 /* Get the value from a foo(<param_value>) style call */ |
11233 |
9614 if (IN_param_value == NULL) |
11234 /* Get the value from a foo(<param_value>) style call */ |
9615 IN_param_value = function_call_param_iterator.next(); |
11235 if (IN_param_value == NULL) |
9616 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11236 IN_param_value = function_call_param_iterator.next(); |
9617 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11237 if (IN_param_value != NULL) { |
9618 |
11238 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9619 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
11239 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9620 { |
11240 } |
9621 |
11241 |
|
11242 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
11243 { |
|
11244 |
|
11245 |
|
11246 if (IN_type_symbol == NULL) |
|
11247 IN_type_symbol = last_type_symbol; |
9622 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11248 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9623 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
11249 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
9624 function_type_prefix = return_type_symbol; |
11250 function_type_prefix = return_type_symbol; |
9625 break; |
11251 break; |
9626 |
11252 |
9642 |
11268 |
9643 { |
11269 { |
9644 identifier_c param_name("IN"); |
11270 identifier_c param_name("IN"); |
9645 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11271 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9646 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11272 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9647 |
11273 symbol_c *IN_type_symbol = NULL; |
9648 /* Get the value from a foo(<param_value>) style call */ |
11274 |
9649 if (IN_param_value == NULL) |
11275 /* Get the value from a foo(<param_value>) style call */ |
9650 IN_param_value = function_call_param_iterator.next(); |
11276 if (IN_param_value == NULL) |
9651 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11277 IN_param_value = function_call_param_iterator.next(); |
9652 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11278 if (IN_param_value != NULL) { |
9653 |
11279 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9654 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
11280 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
11281 } |
|
11282 |
|
11283 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
9655 { |
11284 { |
9656 |
11285 |
9657 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
11286 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11287 |
|
11288 if (IN_type_symbol == NULL) |
|
11289 IN_type_symbol = last_type_symbol; |
9658 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11290 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9659 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
11291 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
9660 function_type_prefix = return_type_symbol; |
11292 function_type_prefix = return_type_symbol; |
9661 break; |
11293 break; |
9662 |
11294 |
9678 |
11310 |
9679 { |
11311 { |
9680 identifier_c param_name("IN"); |
11312 identifier_c param_name("IN"); |
9681 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11313 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9682 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11314 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9683 |
11315 symbol_c *IN_type_symbol = NULL; |
9684 /* Get the value from a foo(<param_value>) style call */ |
11316 |
9685 if (IN_param_value == NULL) |
11317 /* Get the value from a foo(<param_value>) style call */ |
9686 IN_param_value = function_call_param_iterator.next(); |
11318 if (IN_param_value == NULL) |
9687 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11319 IN_param_value = function_call_param_iterator.next(); |
9688 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11320 if (IN_param_value != NULL) { |
9689 |
11321 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9690 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
11322 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9691 { |
11323 } |
9692 |
11324 |
|
11325 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
|
11326 { |
|
11327 |
|
11328 |
|
11329 if (IN_type_symbol == NULL) |
|
11330 IN_type_symbol = last_type_symbol; |
9693 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11331 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9694 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
11332 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
9695 function_type_prefix = return_type_symbol; |
11333 function_type_prefix = return_type_symbol; |
9696 break; |
11334 break; |
9697 |
11335 |
9713 |
11351 |
9714 { |
11352 { |
9715 identifier_c param_name("IN"); |
11353 identifier_c param_name("IN"); |
9716 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11354 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9717 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11355 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9718 |
11356 symbol_c *IN_type_symbol = NULL; |
9719 /* Get the value from a foo(<param_value>) style call */ |
11357 |
9720 if (IN_param_value == NULL) |
11358 /* Get the value from a foo(<param_value>) style call */ |
9721 IN_param_value = function_call_param_iterator.next(); |
11359 if (IN_param_value == NULL) |
9722 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11360 IN_param_value = function_call_param_iterator.next(); |
9723 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11361 if (IN_param_value != NULL) { |
9724 |
11362 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9725 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11363 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9726 { |
11364 } |
9727 |
11365 |
|
11366 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11367 { |
|
11368 |
|
11369 |
|
11370 if (IN_type_symbol == NULL) |
|
11371 IN_type_symbol = last_type_symbol; |
9728 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11372 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9729 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
11373 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
9730 function_type_prefix = return_type_symbol; |
11374 function_type_prefix = return_type_symbol; |
9731 break; |
11375 break; |
9732 |
11376 |
9748 |
11392 |
9749 { |
11393 { |
9750 identifier_c param_name("IN"); |
11394 identifier_c param_name("IN"); |
9751 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11395 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9752 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11396 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9753 |
11397 symbol_c *IN_type_symbol = NULL; |
9754 /* Get the value from a foo(<param_value>) style call */ |
11398 |
9755 if (IN_param_value == NULL) |
11399 /* Get the value from a foo(<param_value>) style call */ |
9756 IN_param_value = function_call_param_iterator.next(); |
11400 if (IN_param_value == NULL) |
9757 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11401 IN_param_value = function_call_param_iterator.next(); |
9758 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11402 if (IN_param_value != NULL) { |
9759 |
11403 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9760 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11404 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9761 { |
11405 } |
9762 |
11406 |
|
11407 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11408 { |
|
11409 |
|
11410 |
|
11411 if (IN_type_symbol == NULL) |
|
11412 IN_type_symbol = last_type_symbol; |
9763 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11413 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9764 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
11414 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
9765 function_type_prefix = return_type_symbol; |
11415 function_type_prefix = return_type_symbol; |
9766 break; |
11416 break; |
9767 |
11417 |
9783 |
11433 |
9784 { |
11434 { |
9785 identifier_c param_name("IN"); |
11435 identifier_c param_name("IN"); |
9786 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11436 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9787 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11437 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9788 |
11438 symbol_c *IN_type_symbol = NULL; |
9789 /* Get the value from a foo(<param_value>) style call */ |
11439 |
9790 if (IN_param_value == NULL) |
11440 /* Get the value from a foo(<param_value>) style call */ |
9791 IN_param_value = function_call_param_iterator.next(); |
11441 if (IN_param_value == NULL) |
9792 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11442 IN_param_value = function_call_param_iterator.next(); |
9793 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11443 if (IN_param_value != NULL) { |
9794 |
11444 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9795 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11445 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9796 { |
11446 } |
9797 |
11447 |
|
11448 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11449 { |
|
11450 |
|
11451 |
|
11452 if (IN_type_symbol == NULL) |
|
11453 IN_type_symbol = last_type_symbol; |
9798 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11454 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9799 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
11455 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
9800 function_type_prefix = return_type_symbol; |
11456 function_type_prefix = return_type_symbol; |
9801 break; |
11457 break; |
9802 |
11458 |
9818 |
11474 |
9819 { |
11475 { |
9820 identifier_c param_name("IN"); |
11476 identifier_c param_name("IN"); |
9821 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11477 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9822 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11478 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9823 |
11479 symbol_c *IN_type_symbol = NULL; |
9824 /* Get the value from a foo(<param_value>) style call */ |
11480 |
9825 if (IN_param_value == NULL) |
11481 /* Get the value from a foo(<param_value>) style call */ |
9826 IN_param_value = function_call_param_iterator.next(); |
11482 if (IN_param_value == NULL) |
9827 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11483 IN_param_value = function_call_param_iterator.next(); |
9828 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11484 if (IN_param_value != NULL) { |
9829 |
11485 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9830 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11486 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9831 { |
11487 } |
9832 |
11488 |
|
11489 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11490 { |
|
11491 |
|
11492 |
|
11493 if (IN_type_symbol == NULL) |
|
11494 IN_type_symbol = last_type_symbol; |
9833 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11495 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9834 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
11496 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
9835 function_type_prefix = return_type_symbol; |
11497 function_type_prefix = return_type_symbol; |
9836 break; |
11498 break; |
9837 |
11499 |
9853 |
11515 |
9854 { |
11516 { |
9855 identifier_c param_name("IN"); |
11517 identifier_c param_name("IN"); |
9856 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11518 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9857 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11519 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9858 |
11520 symbol_c *IN_type_symbol = NULL; |
9859 /* Get the value from a foo(<param_value>) style call */ |
11521 |
9860 if (IN_param_value == NULL) |
11522 /* Get the value from a foo(<param_value>) style call */ |
9861 IN_param_value = function_call_param_iterator.next(); |
11523 if (IN_param_value == NULL) |
9862 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11524 IN_param_value = function_call_param_iterator.next(); |
9863 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11525 if (IN_param_value != NULL) { |
9864 |
11526 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9865 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11527 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
11528 } |
|
11529 |
|
11530 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
9866 { |
11531 { |
9867 |
11532 |
9868 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
11533 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11534 |
|
11535 if (IN_type_symbol == NULL) |
|
11536 IN_type_symbol = last_type_symbol; |
9869 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11537 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9870 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
11538 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
9871 function_type_prefix = return_type_symbol; |
11539 function_type_prefix = return_type_symbol; |
9872 break; |
11540 break; |
9873 |
11541 |
9889 |
11557 |
9890 { |
11558 { |
9891 identifier_c param_name("IN"); |
11559 identifier_c param_name("IN"); |
9892 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11560 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9893 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11561 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9894 |
11562 symbol_c *IN_type_symbol = NULL; |
9895 /* Get the value from a foo(<param_value>) style call */ |
11563 |
9896 if (IN_param_value == NULL) |
11564 /* Get the value from a foo(<param_value>) style call */ |
9897 IN_param_value = function_call_param_iterator.next(); |
11565 if (IN_param_value == NULL) |
9898 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11566 IN_param_value = function_call_param_iterator.next(); |
9899 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11567 if (IN_param_value != NULL) { |
9900 |
11568 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9901 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11569 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
9902 { |
11570 } |
9903 |
11571 |
|
11572 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11573 { |
|
11574 |
|
11575 |
|
11576 if (IN_type_symbol == NULL) |
|
11577 IN_type_symbol = last_type_symbol; |
9904 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11578 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9905 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
11579 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
9906 function_type_prefix = return_type_symbol; |
11580 function_type_prefix = return_type_symbol; |
9907 break; |
11581 break; |
9908 |
11582 |
9924 |
11598 |
9925 { |
11599 { |
9926 identifier_c param_name("IN"); |
11600 identifier_c param_name("IN"); |
9927 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11601 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9928 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11602 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9929 |
11603 symbol_c *IN_type_symbol = NULL; |
9930 /* Get the value from a foo(<param_value>) style call */ |
11604 |
9931 if (IN_param_value == NULL) |
11605 /* Get the value from a foo(<param_value>) style call */ |
9932 IN_param_value = function_call_param_iterator.next(); |
11606 if (IN_param_value == NULL) |
9933 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11607 IN_param_value = function_call_param_iterator.next(); |
9934 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11608 if (IN_param_value != NULL) { |
9935 |
11609 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9936 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11610 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
11611 } |
|
11612 |
|
11613 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
9937 { |
11614 { |
9938 |
11615 |
9939 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
11616 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11617 |
|
11618 if (IN_type_symbol == NULL) |
|
11619 IN_type_symbol = last_type_symbol; |
9940 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11620 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9941 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
11621 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
9942 function_type_prefix = return_type_symbol; |
11622 function_type_prefix = return_type_symbol; |
9943 break; |
11623 break; |
9944 |
11624 |
9960 |
11640 |
9961 { |
11641 { |
9962 identifier_c param_name("IN"); |
11642 identifier_c param_name("IN"); |
9963 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11643 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
9964 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11644 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
9965 |
11645 symbol_c *IN_type_symbol = NULL; |
9966 /* Get the value from a foo(<param_value>) style call */ |
11646 |
9967 if (IN_param_value == NULL) |
11647 /* Get the value from a foo(<param_value>) style call */ |
9968 IN_param_value = function_call_param_iterator.next(); |
11648 if (IN_param_value == NULL) |
9969 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11649 IN_param_value = function_call_param_iterator.next(); |
9970 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11650 if (IN_param_value != NULL) { |
9971 |
11651 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
9972 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11652 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
11653 } |
|
11654 |
|
11655 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
9973 { |
11656 { |
9974 |
11657 |
9975 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
11658 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
11659 |
|
11660 if (IN_type_symbol == NULL) |
|
11661 IN_type_symbol = last_type_symbol; |
9976 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11662 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
9977 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
11663 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
9978 function_type_prefix = return_type_symbol; |
11664 function_type_prefix = return_type_symbol; |
9979 break; |
11665 break; |
9980 |
11666 |
9996 |
11682 |
9997 { |
11683 { |
9998 identifier_c param_name("IN"); |
11684 identifier_c param_name("IN"); |
9999 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11685 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10000 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11686 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10001 |
11687 symbol_c *IN_type_symbol = NULL; |
10002 /* Get the value from a foo(<param_value>) style call */ |
11688 |
10003 if (IN_param_value == NULL) |
11689 /* Get the value from a foo(<param_value>) style call */ |
10004 IN_param_value = function_call_param_iterator.next(); |
11690 if (IN_param_value == NULL) |
10005 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11691 IN_param_value = function_call_param_iterator.next(); |
10006 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11692 if (IN_param_value != NULL) { |
10007 |
11693 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10008 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11694 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10009 { |
11695 } |
10010 |
11696 |
|
11697 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11698 { |
|
11699 |
|
11700 |
|
11701 if (IN_type_symbol == NULL) |
|
11702 IN_type_symbol = last_type_symbol; |
10011 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11703 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10012 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
11704 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
10013 function_type_prefix = return_type_symbol; |
11705 function_type_prefix = return_type_symbol; |
10014 break; |
11706 break; |
10015 |
11707 |
10031 |
11723 |
10032 { |
11724 { |
10033 identifier_c param_name("IN"); |
11725 identifier_c param_name("IN"); |
10034 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11726 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10035 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11727 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10036 |
11728 symbol_c *IN_type_symbol = NULL; |
10037 /* Get the value from a foo(<param_value>) style call */ |
11729 |
10038 if (IN_param_value == NULL) |
11730 /* Get the value from a foo(<param_value>) style call */ |
10039 IN_param_value = function_call_param_iterator.next(); |
11731 if (IN_param_value == NULL) |
10040 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11732 IN_param_value = function_call_param_iterator.next(); |
10041 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11733 if (IN_param_value != NULL) { |
10042 |
11734 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10043 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11735 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10044 { |
11736 } |
10045 |
11737 |
|
11738 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11739 { |
|
11740 |
|
11741 |
|
11742 if (IN_type_symbol == NULL) |
|
11743 IN_type_symbol = last_type_symbol; |
10046 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11744 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10047 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
11745 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
10048 function_type_prefix = return_type_symbol; |
11746 function_type_prefix = return_type_symbol; |
10049 break; |
11747 break; |
10050 |
11748 |
10066 |
11764 |
10067 { |
11765 { |
10068 identifier_c param_name("IN"); |
11766 identifier_c param_name("IN"); |
10069 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11767 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10070 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11768 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10071 |
11769 symbol_c *IN_type_symbol = NULL; |
10072 /* Get the value from a foo(<param_value>) style call */ |
11770 |
10073 if (IN_param_value == NULL) |
11771 /* Get the value from a foo(<param_value>) style call */ |
10074 IN_param_value = function_call_param_iterator.next(); |
11772 if (IN_param_value == NULL) |
10075 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11773 IN_param_value = function_call_param_iterator.next(); |
10076 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11774 if (IN_param_value != NULL) { |
10077 |
11775 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10078 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11776 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
11777 } |
|
11778 |
|
11779 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
10079 { |
11780 { |
10080 |
11781 |
10081 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
11782 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
11783 |
|
11784 if (IN_type_symbol == NULL) |
|
11785 IN_type_symbol = last_type_symbol; |
10082 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11786 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10083 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
11787 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
10084 function_type_prefix = return_type_symbol; |
11788 function_type_prefix = return_type_symbol; |
10085 break; |
11789 break; |
10086 |
11790 |
10102 |
11806 |
10103 { |
11807 { |
10104 identifier_c param_name("IN"); |
11808 identifier_c param_name("IN"); |
10105 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11809 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10106 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11810 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10107 |
11811 symbol_c *IN_type_symbol = NULL; |
10108 /* Get the value from a foo(<param_value>) style call */ |
11812 |
10109 if (IN_param_value == NULL) |
11813 /* Get the value from a foo(<param_value>) style call */ |
10110 IN_param_value = function_call_param_iterator.next(); |
11814 if (IN_param_value == NULL) |
10111 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11815 IN_param_value = function_call_param_iterator.next(); |
10112 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11816 if (IN_param_value != NULL) { |
10113 |
11817 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10114 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11818 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10115 { |
11819 } |
10116 |
11820 |
|
11821 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11822 { |
|
11823 |
|
11824 |
|
11825 if (IN_type_symbol == NULL) |
|
11826 IN_type_symbol = last_type_symbol; |
10117 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11827 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10118 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
11828 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
10119 function_type_prefix = return_type_symbol; |
11829 function_type_prefix = return_type_symbol; |
10120 break; |
11830 break; |
10121 |
11831 |
10137 |
11847 |
10138 { |
11848 { |
10139 identifier_c param_name("IN"); |
11849 identifier_c param_name("IN"); |
10140 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11850 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10141 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11851 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10142 |
11852 symbol_c *IN_type_symbol = NULL; |
10143 /* Get the value from a foo(<param_value>) style call */ |
11853 |
10144 if (IN_param_value == NULL) |
11854 /* Get the value from a foo(<param_value>) style call */ |
10145 IN_param_value = function_call_param_iterator.next(); |
11855 if (IN_param_value == NULL) |
10146 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11856 IN_param_value = function_call_param_iterator.next(); |
10147 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11857 if (IN_param_value != NULL) { |
10148 |
11858 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10149 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11859 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10150 { |
11860 } |
10151 |
11861 |
|
11862 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11863 { |
|
11864 |
|
11865 |
|
11866 if (IN_type_symbol == NULL) |
|
11867 IN_type_symbol = last_type_symbol; |
10152 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11868 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10153 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
11869 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
10154 function_type_prefix = return_type_symbol; |
11870 function_type_prefix = return_type_symbol; |
10155 break; |
11871 break; |
10156 |
11872 |
10172 |
11888 |
10173 { |
11889 { |
10174 identifier_c param_name("IN"); |
11890 identifier_c param_name("IN"); |
10175 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11891 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10176 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11892 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10177 |
11893 symbol_c *IN_type_symbol = NULL; |
10178 /* Get the value from a foo(<param_value>) style call */ |
11894 |
10179 if (IN_param_value == NULL) |
11895 /* Get the value from a foo(<param_value>) style call */ |
10180 IN_param_value = function_call_param_iterator.next(); |
11896 if (IN_param_value == NULL) |
10181 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11897 IN_param_value = function_call_param_iterator.next(); |
10182 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11898 if (IN_param_value != NULL) { |
10183 |
11899 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10184 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11900 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10185 { |
11901 } |
10186 |
11902 |
|
11903 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11904 { |
|
11905 |
|
11906 |
|
11907 if (IN_type_symbol == NULL) |
|
11908 IN_type_symbol = last_type_symbol; |
10187 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11909 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10188 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
11910 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
10189 function_type_prefix = return_type_symbol; |
11911 function_type_prefix = return_type_symbol; |
10190 break; |
11912 break; |
10191 |
11913 |
10207 |
11929 |
10208 { |
11930 { |
10209 identifier_c param_name("IN"); |
11931 identifier_c param_name("IN"); |
10210 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11932 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10211 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11933 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10212 |
11934 symbol_c *IN_type_symbol = NULL; |
10213 /* Get the value from a foo(<param_value>) style call */ |
11935 |
10214 if (IN_param_value == NULL) |
11936 /* Get the value from a foo(<param_value>) style call */ |
10215 IN_param_value = function_call_param_iterator.next(); |
11937 if (IN_param_value == NULL) |
10216 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11938 IN_param_value = function_call_param_iterator.next(); |
10217 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11939 if (IN_param_value != NULL) { |
10218 |
11940 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10219 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11941 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10220 { |
11942 } |
10221 |
11943 |
|
11944 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11945 { |
|
11946 |
|
11947 |
|
11948 if (IN_type_symbol == NULL) |
|
11949 IN_type_symbol = last_type_symbol; |
10222 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11950 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10223 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
11951 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
10224 function_type_prefix = return_type_symbol; |
11952 function_type_prefix = return_type_symbol; |
10225 break; |
11953 break; |
10226 |
11954 |
10242 |
11970 |
10243 { |
11971 { |
10244 identifier_c param_name("IN"); |
11972 identifier_c param_name("IN"); |
10245 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11973 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10246 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11974 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10247 |
11975 symbol_c *IN_type_symbol = NULL; |
10248 /* Get the value from a foo(<param_value>) style call */ |
11976 |
10249 if (IN_param_value == NULL) |
11977 /* Get the value from a foo(<param_value>) style call */ |
10250 IN_param_value = function_call_param_iterator.next(); |
11978 if (IN_param_value == NULL) |
10251 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11979 IN_param_value = function_call_param_iterator.next(); |
10252 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11980 if (IN_param_value != NULL) { |
10253 |
11981 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10254 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
11982 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10255 { |
11983 } |
10256 |
11984 |
|
11985 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
11986 { |
|
11987 |
|
11988 |
|
11989 if (IN_type_symbol == NULL) |
|
11990 IN_type_symbol = last_type_symbol; |
10257 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11991 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10258 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
11992 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
10259 function_type_prefix = return_type_symbol; |
11993 function_type_prefix = return_type_symbol; |
10260 break; |
11994 break; |
10261 |
11995 |
10277 |
12011 |
10278 { |
12012 { |
10279 identifier_c param_name("IN"); |
12013 identifier_c param_name("IN"); |
10280 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12014 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10281 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12015 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10282 |
12016 symbol_c *IN_type_symbol = NULL; |
10283 /* Get the value from a foo(<param_value>) style call */ |
12017 |
10284 if (IN_param_value == NULL) |
12018 /* Get the value from a foo(<param_value>) style call */ |
10285 IN_param_value = function_call_param_iterator.next(); |
12019 if (IN_param_value == NULL) |
10286 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12020 IN_param_value = function_call_param_iterator.next(); |
10287 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12021 if (IN_param_value != NULL) { |
10288 |
12022 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10289 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
12023 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10290 { |
12024 } |
10291 |
12025 |
|
12026 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
12027 { |
|
12028 |
|
12029 |
|
12030 if (IN_type_symbol == NULL) |
|
12031 IN_type_symbol = last_type_symbol; |
10292 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12032 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10293 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
12033 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
10294 function_type_prefix = return_type_symbol; |
12034 function_type_prefix = return_type_symbol; |
10295 break; |
12035 break; |
10296 |
12036 |
10312 |
12052 |
10313 { |
12053 { |
10314 identifier_c param_name("IN"); |
12054 identifier_c param_name("IN"); |
10315 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12055 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10316 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12056 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10317 |
12057 symbol_c *IN_type_symbol = NULL; |
10318 /* Get the value from a foo(<param_value>) style call */ |
12058 |
10319 if (IN_param_value == NULL) |
12059 /* Get the value from a foo(<param_value>) style call */ |
10320 IN_param_value = function_call_param_iterator.next(); |
12060 if (IN_param_value == NULL) |
10321 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12061 IN_param_value = function_call_param_iterator.next(); |
10322 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12062 if (IN_param_value != NULL) { |
10323 |
12063 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10324 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
12064 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
12065 } |
|
12066 |
|
12067 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
10325 { |
12068 { |
10326 |
12069 |
10327 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
12070 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12071 |
|
12072 if (IN_type_symbol == NULL) |
|
12073 IN_type_symbol = last_type_symbol; |
10328 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12074 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10329 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
12075 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
10330 function_type_prefix = return_type_symbol; |
12076 function_type_prefix = return_type_symbol; |
10331 break; |
12077 break; |
10332 |
12078 |
10348 |
12094 |
10349 { |
12095 { |
10350 identifier_c param_name("IN"); |
12096 identifier_c param_name("IN"); |
10351 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12097 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10352 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12098 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10353 |
12099 symbol_c *IN_type_symbol = NULL; |
10354 /* Get the value from a foo(<param_value>) style call */ |
12100 |
10355 if (IN_param_value == NULL) |
12101 /* Get the value from a foo(<param_value>) style call */ |
10356 IN_param_value = function_call_param_iterator.next(); |
12102 if (IN_param_value == NULL) |
10357 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12103 IN_param_value = function_call_param_iterator.next(); |
10358 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12104 if (IN_param_value != NULL) { |
10359 |
12105 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10360 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
12106 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10361 { |
12107 } |
10362 |
12108 |
|
12109 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
|
12110 { |
|
12111 |
|
12112 |
|
12113 if (IN_type_symbol == NULL) |
|
12114 IN_type_symbol = last_type_symbol; |
10363 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12115 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10364 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
12116 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
10365 function_type_prefix = return_type_symbol; |
12117 function_type_prefix = return_type_symbol; |
10366 break; |
12118 break; |
10367 |
12119 |
10383 |
12135 |
10384 { |
12136 { |
10385 identifier_c param_name("IN"); |
12137 identifier_c param_name("IN"); |
10386 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12138 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10387 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12139 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10388 |
12140 symbol_c *IN_type_symbol = NULL; |
10389 /* Get the value from a foo(<param_value>) style call */ |
12141 |
10390 if (IN_param_value == NULL) |
12142 /* Get the value from a foo(<param_value>) style call */ |
10391 IN_param_value = function_call_param_iterator.next(); |
12143 if (IN_param_value == NULL) |
10392 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12144 IN_param_value = function_call_param_iterator.next(); |
10393 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12145 if (IN_param_value != NULL) { |
10394 |
12146 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10395 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12147 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10396 { |
12148 } |
10397 |
12149 |
|
12150 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12151 { |
|
12152 |
|
12153 |
|
12154 if (IN_type_symbol == NULL) |
|
12155 IN_type_symbol = last_type_symbol; |
10398 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12156 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10399 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
12157 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
10400 function_type_prefix = return_type_symbol; |
12158 function_type_prefix = return_type_symbol; |
10401 break; |
12159 break; |
10402 |
12160 |
10418 |
12176 |
10419 { |
12177 { |
10420 identifier_c param_name("IN"); |
12178 identifier_c param_name("IN"); |
10421 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12179 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10422 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12180 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10423 |
12181 symbol_c *IN_type_symbol = NULL; |
10424 /* Get the value from a foo(<param_value>) style call */ |
12182 |
10425 if (IN_param_value == NULL) |
12183 /* Get the value from a foo(<param_value>) style call */ |
10426 IN_param_value = function_call_param_iterator.next(); |
12184 if (IN_param_value == NULL) |
10427 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12185 IN_param_value = function_call_param_iterator.next(); |
10428 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12186 if (IN_param_value != NULL) { |
10429 |
12187 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10430 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12188 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10431 { |
12189 } |
10432 |
12190 |
|
12191 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12192 { |
|
12193 |
|
12194 |
|
12195 if (IN_type_symbol == NULL) |
|
12196 IN_type_symbol = last_type_symbol; |
10433 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12197 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10434 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
12198 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
10435 function_type_prefix = return_type_symbol; |
12199 function_type_prefix = return_type_symbol; |
10436 break; |
12200 break; |
10437 |
12201 |
10453 |
12217 |
10454 { |
12218 { |
10455 identifier_c param_name("IN"); |
12219 identifier_c param_name("IN"); |
10456 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12220 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10457 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12221 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10458 |
12222 symbol_c *IN_type_symbol = NULL; |
10459 /* Get the value from a foo(<param_value>) style call */ |
12223 |
10460 if (IN_param_value == NULL) |
12224 /* Get the value from a foo(<param_value>) style call */ |
10461 IN_param_value = function_call_param_iterator.next(); |
12225 if (IN_param_value == NULL) |
10462 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12226 IN_param_value = function_call_param_iterator.next(); |
10463 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12227 if (IN_param_value != NULL) { |
10464 |
12228 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10465 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12229 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10466 { |
12230 } |
10467 |
12231 |
|
12232 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12233 { |
|
12234 |
|
12235 |
|
12236 if (IN_type_symbol == NULL) |
|
12237 IN_type_symbol = last_type_symbol; |
10468 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12238 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10469 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
12239 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
10470 function_type_prefix = return_type_symbol; |
12240 function_type_prefix = return_type_symbol; |
10471 break; |
12241 break; |
10472 |
12242 |
10488 |
12258 |
10489 { |
12259 { |
10490 identifier_c param_name("IN"); |
12260 identifier_c param_name("IN"); |
10491 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12261 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10492 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12262 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10493 |
12263 symbol_c *IN_type_symbol = NULL; |
10494 /* Get the value from a foo(<param_value>) style call */ |
12264 |
10495 if (IN_param_value == NULL) |
12265 /* Get the value from a foo(<param_value>) style call */ |
10496 IN_param_value = function_call_param_iterator.next(); |
12266 if (IN_param_value == NULL) |
10497 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12267 IN_param_value = function_call_param_iterator.next(); |
10498 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12268 if (IN_param_value != NULL) { |
10499 |
12269 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10500 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12270 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10501 { |
12271 } |
10502 |
12272 |
|
12273 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12274 { |
|
12275 |
|
12276 |
|
12277 if (IN_type_symbol == NULL) |
|
12278 IN_type_symbol = last_type_symbol; |
10503 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12279 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10504 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
12280 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
10505 function_type_prefix = return_type_symbol; |
12281 function_type_prefix = return_type_symbol; |
10506 break; |
12282 break; |
10507 |
12283 |
10523 |
12299 |
10524 { |
12300 { |
10525 identifier_c param_name("IN"); |
12301 identifier_c param_name("IN"); |
10526 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12302 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10527 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12303 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10528 |
12304 symbol_c *IN_type_symbol = NULL; |
10529 /* Get the value from a foo(<param_value>) style call */ |
12305 |
10530 if (IN_param_value == NULL) |
12306 /* Get the value from a foo(<param_value>) style call */ |
10531 IN_param_value = function_call_param_iterator.next(); |
12307 if (IN_param_value == NULL) |
10532 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12308 IN_param_value = function_call_param_iterator.next(); |
10533 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12309 if (IN_param_value != NULL) { |
10534 |
12310 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10535 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12311 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
12312 } |
|
12313 |
|
12314 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
10536 { |
12315 { |
10537 |
12316 |
10538 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
12317 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12318 |
|
12319 if (IN_type_symbol == NULL) |
|
12320 IN_type_symbol = last_type_symbol; |
10539 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12321 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10540 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
12322 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
10541 function_type_prefix = return_type_symbol; |
12323 function_type_prefix = return_type_symbol; |
10542 break; |
12324 break; |
10543 |
12325 |
10559 |
12341 |
10560 { |
12342 { |
10561 identifier_c param_name("IN"); |
12343 identifier_c param_name("IN"); |
10562 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12344 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10563 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12345 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10564 |
12346 symbol_c *IN_type_symbol = NULL; |
10565 /* Get the value from a foo(<param_value>) style call */ |
12347 |
10566 if (IN_param_value == NULL) |
12348 /* Get the value from a foo(<param_value>) style call */ |
10567 IN_param_value = function_call_param_iterator.next(); |
12349 if (IN_param_value == NULL) |
10568 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12350 IN_param_value = function_call_param_iterator.next(); |
10569 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12351 if (IN_param_value != NULL) { |
10570 |
12352 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10571 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12353 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10572 { |
12354 } |
10573 |
12355 |
|
12356 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12357 { |
|
12358 |
|
12359 |
|
12360 if (IN_type_symbol == NULL) |
|
12361 IN_type_symbol = last_type_symbol; |
10574 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12362 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10575 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
12363 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
10576 function_type_prefix = return_type_symbol; |
12364 function_type_prefix = return_type_symbol; |
10577 break; |
12365 break; |
10578 |
12366 |
10594 |
12382 |
10595 { |
12383 { |
10596 identifier_c param_name("IN"); |
12384 identifier_c param_name("IN"); |
10597 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12385 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10598 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12386 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10599 |
12387 symbol_c *IN_type_symbol = NULL; |
10600 /* Get the value from a foo(<param_value>) style call */ |
12388 |
10601 if (IN_param_value == NULL) |
12389 /* Get the value from a foo(<param_value>) style call */ |
10602 IN_param_value = function_call_param_iterator.next(); |
12390 if (IN_param_value == NULL) |
10603 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12391 IN_param_value = function_call_param_iterator.next(); |
10604 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12392 if (IN_param_value != NULL) { |
10605 |
12393 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10606 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12394 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
12395 } |
|
12396 |
|
12397 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
10607 { |
12398 { |
10608 |
12399 |
10609 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
12400 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12401 |
|
12402 if (IN_type_symbol == NULL) |
|
12403 IN_type_symbol = last_type_symbol; |
10610 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12404 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10611 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
12405 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
10612 function_type_prefix = return_type_symbol; |
12406 function_type_prefix = return_type_symbol; |
10613 break; |
12407 break; |
10614 |
12408 |
10630 |
12424 |
10631 { |
12425 { |
10632 identifier_c param_name("IN"); |
12426 identifier_c param_name("IN"); |
10633 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12427 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10634 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12428 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10635 |
12429 symbol_c *IN_type_symbol = NULL; |
10636 /* Get the value from a foo(<param_value>) style call */ |
12430 |
10637 if (IN_param_value == NULL) |
12431 /* Get the value from a foo(<param_value>) style call */ |
10638 IN_param_value = function_call_param_iterator.next(); |
12432 if (IN_param_value == NULL) |
10639 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12433 IN_param_value = function_call_param_iterator.next(); |
10640 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12434 if (IN_param_value != NULL) { |
10641 |
12435 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10642 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12436 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
12437 } |
|
12438 |
|
12439 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
10643 { |
12440 { |
10644 |
12441 |
10645 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
12442 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12443 |
|
12444 if (IN_type_symbol == NULL) |
|
12445 IN_type_symbol = last_type_symbol; |
10646 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12446 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10647 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
12447 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
10648 function_type_prefix = return_type_symbol; |
12448 function_type_prefix = return_type_symbol; |
10649 break; |
12449 break; |
10650 |
12450 |
10666 |
12466 |
10667 { |
12467 { |
10668 identifier_c param_name("IN"); |
12468 identifier_c param_name("IN"); |
10669 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12469 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10670 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12470 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10671 |
12471 symbol_c *IN_type_symbol = NULL; |
10672 /* Get the value from a foo(<param_value>) style call */ |
12472 |
10673 if (IN_param_value == NULL) |
12473 /* Get the value from a foo(<param_value>) style call */ |
10674 IN_param_value = function_call_param_iterator.next(); |
12474 if (IN_param_value == NULL) |
10675 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12475 IN_param_value = function_call_param_iterator.next(); |
10676 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12476 if (IN_param_value != NULL) { |
10677 |
12477 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10678 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12478 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10679 { |
12479 } |
10680 |
12480 |
|
12481 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12482 { |
|
12483 |
|
12484 |
|
12485 if (IN_type_symbol == NULL) |
|
12486 IN_type_symbol = last_type_symbol; |
10681 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12487 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10682 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
12488 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
10683 function_type_prefix = return_type_symbol; |
12489 function_type_prefix = return_type_symbol; |
10684 break; |
12490 break; |
10685 |
12491 |
10701 |
12507 |
10702 { |
12508 { |
10703 identifier_c param_name("IN"); |
12509 identifier_c param_name("IN"); |
10704 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12510 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10705 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12511 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10706 |
12512 symbol_c *IN_type_symbol = NULL; |
10707 /* Get the value from a foo(<param_value>) style call */ |
12513 |
10708 if (IN_param_value == NULL) |
12514 /* Get the value from a foo(<param_value>) style call */ |
10709 IN_param_value = function_call_param_iterator.next(); |
12515 if (IN_param_value == NULL) |
10710 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12516 IN_param_value = function_call_param_iterator.next(); |
10711 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12517 if (IN_param_value != NULL) { |
10712 |
12518 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10713 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12519 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10714 { |
12520 } |
10715 |
12521 |
|
12522 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12523 { |
|
12524 |
|
12525 |
|
12526 if (IN_type_symbol == NULL) |
|
12527 IN_type_symbol = last_type_symbol; |
10716 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12528 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10717 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
12529 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
10718 function_type_prefix = return_type_symbol; |
12530 function_type_prefix = return_type_symbol; |
10719 break; |
12531 break; |
10720 |
12532 |
10736 |
12548 |
10737 { |
12549 { |
10738 identifier_c param_name("IN"); |
12550 identifier_c param_name("IN"); |
10739 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12551 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10740 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12552 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10741 |
12553 symbol_c *IN_type_symbol = NULL; |
10742 /* Get the value from a foo(<param_value>) style call */ |
12554 |
10743 if (IN_param_value == NULL) |
12555 /* Get the value from a foo(<param_value>) style call */ |
10744 IN_param_value = function_call_param_iterator.next(); |
12556 if (IN_param_value == NULL) |
10745 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12557 IN_param_value = function_call_param_iterator.next(); |
10746 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12558 if (IN_param_value != NULL) { |
10747 |
12559 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10748 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12560 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
12561 } |
|
12562 |
|
12563 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
10749 { |
12564 { |
10750 |
12565 |
10751 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
12566 function_name = (symbol_c*)(new pragma_c("__uint_to_string")); |
|
12567 |
|
12568 if (IN_type_symbol == NULL) |
|
12569 IN_type_symbol = last_type_symbol; |
10752 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12570 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10753 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
12571 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
10754 function_type_prefix = return_type_symbol; |
12572 function_type_prefix = return_type_symbol; |
10755 break; |
12573 break; |
10756 |
12574 |
10772 |
12590 |
10773 { |
12591 { |
10774 identifier_c param_name("IN"); |
12592 identifier_c param_name("IN"); |
10775 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12593 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10776 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12594 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10777 |
12595 symbol_c *IN_type_symbol = NULL; |
10778 /* Get the value from a foo(<param_value>) style call */ |
12596 |
10779 if (IN_param_value == NULL) |
12597 /* Get the value from a foo(<param_value>) style call */ |
10780 IN_param_value = function_call_param_iterator.next(); |
12598 if (IN_param_value == NULL) |
10781 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12599 IN_param_value = function_call_param_iterator.next(); |
10782 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12600 if (IN_param_value != NULL) { |
10783 |
12601 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10784 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12602 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10785 { |
12603 } |
10786 |
12604 |
|
12605 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12606 { |
|
12607 |
|
12608 |
|
12609 if (IN_type_symbol == NULL) |
|
12610 IN_type_symbol = last_type_symbol; |
10787 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12611 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10788 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
12612 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
10789 function_type_prefix = return_type_symbol; |
12613 function_type_prefix = return_type_symbol; |
10790 break; |
12614 break; |
10791 |
12615 |
10807 |
12631 |
10808 { |
12632 { |
10809 identifier_c param_name("IN"); |
12633 identifier_c param_name("IN"); |
10810 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12634 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10811 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12635 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10812 |
12636 symbol_c *IN_type_symbol = NULL; |
10813 /* Get the value from a foo(<param_value>) style call */ |
12637 |
10814 if (IN_param_value == NULL) |
12638 /* Get the value from a foo(<param_value>) style call */ |
10815 IN_param_value = function_call_param_iterator.next(); |
12639 if (IN_param_value == NULL) |
10816 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12640 IN_param_value = function_call_param_iterator.next(); |
10817 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12641 if (IN_param_value != NULL) { |
10818 |
12642 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10819 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12643 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10820 { |
12644 } |
10821 |
12645 |
|
12646 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12647 { |
|
12648 |
|
12649 |
|
12650 if (IN_type_symbol == NULL) |
|
12651 IN_type_symbol = last_type_symbol; |
10822 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12652 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10823 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
12653 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
10824 function_type_prefix = return_type_symbol; |
12654 function_type_prefix = return_type_symbol; |
10825 break; |
12655 break; |
10826 |
12656 |
10842 |
12672 |
10843 { |
12673 { |
10844 identifier_c param_name("IN"); |
12674 identifier_c param_name("IN"); |
10845 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12675 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10846 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12676 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10847 |
12677 symbol_c *IN_type_symbol = NULL; |
10848 /* Get the value from a foo(<param_value>) style call */ |
12678 |
10849 if (IN_param_value == NULL) |
12679 /* Get the value from a foo(<param_value>) style call */ |
10850 IN_param_value = function_call_param_iterator.next(); |
12680 if (IN_param_value == NULL) |
10851 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12681 IN_param_value = function_call_param_iterator.next(); |
10852 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12682 if (IN_param_value != NULL) { |
10853 |
12683 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10854 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12684 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10855 { |
12685 } |
10856 |
12686 |
|
12687 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12688 { |
|
12689 |
|
12690 |
|
12691 if (IN_type_symbol == NULL) |
|
12692 IN_type_symbol = last_type_symbol; |
10857 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12693 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10858 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
12694 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
10859 function_type_prefix = return_type_symbol; |
12695 function_type_prefix = return_type_symbol; |
10860 break; |
12696 break; |
10861 |
12697 |
10877 |
12713 |
10878 { |
12714 { |
10879 identifier_c param_name("IN"); |
12715 identifier_c param_name("IN"); |
10880 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12716 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10881 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12717 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10882 |
12718 symbol_c *IN_type_symbol = NULL; |
10883 /* Get the value from a foo(<param_value>) style call */ |
12719 |
10884 if (IN_param_value == NULL) |
12720 /* Get the value from a foo(<param_value>) style call */ |
10885 IN_param_value = function_call_param_iterator.next(); |
12721 if (IN_param_value == NULL) |
10886 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12722 IN_param_value = function_call_param_iterator.next(); |
10887 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12723 if (IN_param_value != NULL) { |
10888 |
12724 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10889 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12725 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10890 { |
12726 } |
10891 |
12727 |
|
12728 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12729 { |
|
12730 |
|
12731 |
|
12732 if (IN_type_symbol == NULL) |
|
12733 IN_type_symbol = last_type_symbol; |
10892 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12734 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10893 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
12735 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
10894 function_type_prefix = return_type_symbol; |
12736 function_type_prefix = return_type_symbol; |
10895 break; |
12737 break; |
10896 |
12738 |
10912 |
12754 |
10913 { |
12755 { |
10914 identifier_c param_name("IN"); |
12756 identifier_c param_name("IN"); |
10915 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12757 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10916 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12758 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10917 |
12759 symbol_c *IN_type_symbol = NULL; |
10918 /* Get the value from a foo(<param_value>) style call */ |
12760 |
10919 if (IN_param_value == NULL) |
12761 /* Get the value from a foo(<param_value>) style call */ |
10920 IN_param_value = function_call_param_iterator.next(); |
12762 if (IN_param_value == NULL) |
10921 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12763 IN_param_value = function_call_param_iterator.next(); |
10922 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12764 if (IN_param_value != NULL) { |
10923 |
12765 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10924 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12766 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10925 { |
12767 } |
10926 |
12768 |
|
12769 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12770 { |
|
12771 |
|
12772 |
|
12773 if (IN_type_symbol == NULL) |
|
12774 IN_type_symbol = last_type_symbol; |
10927 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12775 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10928 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
12776 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
10929 function_type_prefix = return_type_symbol; |
12777 function_type_prefix = return_type_symbol; |
10930 break; |
12778 break; |
10931 |
12779 |
10947 |
12795 |
10948 { |
12796 { |
10949 identifier_c param_name("IN"); |
12797 identifier_c param_name("IN"); |
10950 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12798 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10951 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12799 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10952 |
12800 symbol_c *IN_type_symbol = NULL; |
10953 /* Get the value from a foo(<param_value>) style call */ |
12801 |
10954 if (IN_param_value == NULL) |
12802 /* Get the value from a foo(<param_value>) style call */ |
10955 IN_param_value = function_call_param_iterator.next(); |
12803 if (IN_param_value == NULL) |
10956 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12804 IN_param_value = function_call_param_iterator.next(); |
10957 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12805 if (IN_param_value != NULL) { |
10958 |
12806 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10959 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12807 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
10960 { |
12808 } |
10961 |
12809 |
|
12810 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12811 { |
|
12812 |
|
12813 |
|
12814 if (IN_type_symbol == NULL) |
|
12815 IN_type_symbol = last_type_symbol; |
10962 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12816 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10963 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
12817 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
10964 function_type_prefix = return_type_symbol; |
12818 function_type_prefix = return_type_symbol; |
10965 break; |
12819 break; |
10966 |
12820 |
10982 |
12836 |
10983 { |
12837 { |
10984 identifier_c param_name("IN"); |
12838 identifier_c param_name("IN"); |
10985 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12839 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
10986 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12840 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
10987 |
12841 symbol_c *IN_type_symbol = NULL; |
10988 /* Get the value from a foo(<param_value>) style call */ |
12842 |
10989 if (IN_param_value == NULL) |
12843 /* Get the value from a foo(<param_value>) style call */ |
10990 IN_param_value = function_call_param_iterator.next(); |
12844 if (IN_param_value == NULL) |
10991 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12845 IN_param_value = function_call_param_iterator.next(); |
10992 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12846 if (IN_param_value != NULL) { |
10993 |
12847 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
10994 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12848 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
12849 } |
|
12850 |
|
12851 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
10995 { |
12852 { |
10996 |
12853 |
10997 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
12854 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
12855 |
|
12856 if (IN_type_symbol == NULL) |
|
12857 IN_type_symbol = last_type_symbol; |
10998 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12858 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
10999 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
12859 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
11000 function_type_prefix = return_type_symbol; |
12860 function_type_prefix = return_type_symbol; |
11001 break; |
12861 break; |
11002 |
12862 |
11018 |
12878 |
11019 { |
12879 { |
11020 identifier_c param_name("IN"); |
12880 identifier_c param_name("IN"); |
11021 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12881 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11022 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12882 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11023 |
12883 symbol_c *IN_type_symbol = NULL; |
11024 /* Get the value from a foo(<param_value>) style call */ |
12884 |
11025 if (IN_param_value == NULL) |
12885 /* Get the value from a foo(<param_value>) style call */ |
11026 IN_param_value = function_call_param_iterator.next(); |
12886 if (IN_param_value == NULL) |
11027 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12887 IN_param_value = function_call_param_iterator.next(); |
11028 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12888 if (IN_param_value != NULL) { |
11029 |
12889 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11030 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
12890 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11031 { |
12891 } |
11032 |
12892 |
|
12893 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
|
12894 { |
|
12895 |
|
12896 |
|
12897 if (IN_type_symbol == NULL) |
|
12898 IN_type_symbol = last_type_symbol; |
11033 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12899 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11034 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
12900 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
11035 function_type_prefix = return_type_symbol; |
12901 function_type_prefix = return_type_symbol; |
11036 break; |
12902 break; |
11037 |
12903 |
11053 |
12919 |
11054 { |
12920 { |
11055 identifier_c param_name("IN"); |
12921 identifier_c param_name("IN"); |
11056 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12922 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11057 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12923 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11058 |
12924 symbol_c *IN_type_symbol = NULL; |
11059 /* Get the value from a foo(<param_value>) style call */ |
12925 |
11060 if (IN_param_value == NULL) |
12926 /* Get the value from a foo(<param_value>) style call */ |
11061 IN_param_value = function_call_param_iterator.next(); |
12927 if (IN_param_value == NULL) |
11062 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12928 IN_param_value = function_call_param_iterator.next(); |
11063 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12929 if (IN_param_value != NULL) { |
11064 |
12930 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11065 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
12931 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11066 { |
12932 } |
11067 |
12933 |
|
12934 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
12935 { |
|
12936 |
|
12937 |
|
12938 if (IN_type_symbol == NULL) |
|
12939 IN_type_symbol = last_type_symbol; |
11068 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12940 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11069 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
12941 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
11070 function_type_prefix = return_type_symbol; |
12942 function_type_prefix = return_type_symbol; |
11071 break; |
12943 break; |
11072 |
12944 |
11088 |
12960 |
11089 { |
12961 { |
11090 identifier_c param_name("IN"); |
12962 identifier_c param_name("IN"); |
11091 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12963 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11092 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12964 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11093 |
12965 symbol_c *IN_type_symbol = NULL; |
11094 /* Get the value from a foo(<param_value>) style call */ |
12966 |
11095 if (IN_param_value == NULL) |
12967 /* Get the value from a foo(<param_value>) style call */ |
11096 IN_param_value = function_call_param_iterator.next(); |
12968 if (IN_param_value == NULL) |
11097 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12969 IN_param_value = function_call_param_iterator.next(); |
11098 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12970 if (IN_param_value != NULL) { |
11099 |
12971 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11100 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
12972 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11101 { |
12973 } |
11102 |
12974 |
|
12975 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
12976 { |
|
12977 |
|
12978 |
|
12979 if (IN_type_symbol == NULL) |
|
12980 IN_type_symbol = last_type_symbol; |
11103 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12981 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11104 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
12982 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
11105 function_type_prefix = return_type_symbol; |
12983 function_type_prefix = return_type_symbol; |
11106 break; |
12984 break; |
11107 |
12985 |
11123 |
13001 |
11124 { |
13002 { |
11125 identifier_c param_name("IN"); |
13003 identifier_c param_name("IN"); |
11126 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13004 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11127 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13005 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11128 |
13006 symbol_c *IN_type_symbol = NULL; |
11129 /* Get the value from a foo(<param_value>) style call */ |
13007 |
11130 if (IN_param_value == NULL) |
13008 /* Get the value from a foo(<param_value>) style call */ |
11131 IN_param_value = function_call_param_iterator.next(); |
13009 if (IN_param_value == NULL) |
11132 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13010 IN_param_value = function_call_param_iterator.next(); |
11133 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13011 if (IN_param_value != NULL) { |
11134 |
13012 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11135 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13013 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11136 { |
13014 } |
11137 |
13015 |
|
13016 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13017 { |
|
13018 |
|
13019 |
|
13020 if (IN_type_symbol == NULL) |
|
13021 IN_type_symbol = last_type_symbol; |
11138 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13022 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11139 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
13023 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
11140 function_type_prefix = return_type_symbol; |
13024 function_type_prefix = return_type_symbol; |
11141 break; |
13025 break; |
11142 |
13026 |
11158 |
13042 |
11159 { |
13043 { |
11160 identifier_c param_name("IN"); |
13044 identifier_c param_name("IN"); |
11161 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13045 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11162 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13046 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11163 |
13047 symbol_c *IN_type_symbol = NULL; |
11164 /* Get the value from a foo(<param_value>) style call */ |
13048 |
11165 if (IN_param_value == NULL) |
13049 /* Get the value from a foo(<param_value>) style call */ |
11166 IN_param_value = function_call_param_iterator.next(); |
13050 if (IN_param_value == NULL) |
11167 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13051 IN_param_value = function_call_param_iterator.next(); |
11168 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13052 if (IN_param_value != NULL) { |
11169 |
13053 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11170 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13054 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11171 { |
13055 } |
11172 |
13056 |
|
13057 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13058 { |
|
13059 |
|
13060 |
|
13061 if (IN_type_symbol == NULL) |
|
13062 IN_type_symbol = last_type_symbol; |
11173 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13063 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11174 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
13064 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
11175 function_type_prefix = return_type_symbol; |
13065 function_type_prefix = return_type_symbol; |
11176 break; |
13066 break; |
11177 |
13067 |
11193 |
13083 |
11194 { |
13084 { |
11195 identifier_c param_name("IN"); |
13085 identifier_c param_name("IN"); |
11196 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13086 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11197 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13087 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11198 |
13088 symbol_c *IN_type_symbol = NULL; |
11199 /* Get the value from a foo(<param_value>) style call */ |
13089 |
11200 if (IN_param_value == NULL) |
13090 /* Get the value from a foo(<param_value>) style call */ |
11201 IN_param_value = function_call_param_iterator.next(); |
13091 if (IN_param_value == NULL) |
11202 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13092 IN_param_value = function_call_param_iterator.next(); |
11203 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13093 if (IN_param_value != NULL) { |
11204 |
13094 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11205 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13095 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13096 } |
|
13097 |
|
13098 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11206 { |
13099 { |
11207 |
13100 |
11208 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
13101 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
13102 |
|
13103 if (IN_type_symbol == NULL) |
|
13104 IN_type_symbol = last_type_symbol; |
11209 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13105 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11210 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
13106 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
11211 function_type_prefix = return_type_symbol; |
13107 function_type_prefix = return_type_symbol; |
11212 break; |
13108 break; |
11213 |
13109 |
11229 |
13125 |
11230 { |
13126 { |
11231 identifier_c param_name("IN"); |
13127 identifier_c param_name("IN"); |
11232 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13128 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11233 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13129 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11234 |
13130 symbol_c *IN_type_symbol = NULL; |
11235 /* Get the value from a foo(<param_value>) style call */ |
13131 |
11236 if (IN_param_value == NULL) |
13132 /* Get the value from a foo(<param_value>) style call */ |
11237 IN_param_value = function_call_param_iterator.next(); |
13133 if (IN_param_value == NULL) |
11238 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13134 IN_param_value = function_call_param_iterator.next(); |
11239 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13135 if (IN_param_value != NULL) { |
11240 |
13136 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11241 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13137 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11242 { |
13138 } |
11243 |
13139 |
|
13140 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13141 { |
|
13142 |
|
13143 |
|
13144 if (IN_type_symbol == NULL) |
|
13145 IN_type_symbol = last_type_symbol; |
11244 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13146 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11245 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
13147 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
11246 function_type_prefix = return_type_symbol; |
13148 function_type_prefix = return_type_symbol; |
11247 break; |
13149 break; |
11248 |
13150 |
11264 |
13166 |
11265 { |
13167 { |
11266 identifier_c param_name("IN"); |
13168 identifier_c param_name("IN"); |
11267 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13169 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11268 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13170 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11269 |
13171 symbol_c *IN_type_symbol = NULL; |
11270 /* Get the value from a foo(<param_value>) style call */ |
13172 |
11271 if (IN_param_value == NULL) |
13173 /* Get the value from a foo(<param_value>) style call */ |
11272 IN_param_value = function_call_param_iterator.next(); |
13174 if (IN_param_value == NULL) |
11273 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13175 IN_param_value = function_call_param_iterator.next(); |
11274 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13176 if (IN_param_value != NULL) { |
11275 |
13177 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11276 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13178 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13179 } |
|
13180 |
|
13181 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11277 { |
13182 { |
11278 |
13183 |
11279 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
13184 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
13185 |
|
13186 if (IN_type_symbol == NULL) |
|
13187 IN_type_symbol = last_type_symbol; |
11280 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13188 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11281 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
13189 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
11282 function_type_prefix = return_type_symbol; |
13190 function_type_prefix = return_type_symbol; |
11283 break; |
13191 break; |
11284 |
13192 |
11300 |
13208 |
11301 { |
13209 { |
11302 identifier_c param_name("IN"); |
13210 identifier_c param_name("IN"); |
11303 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13211 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11304 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13212 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11305 |
13213 symbol_c *IN_type_symbol = NULL; |
11306 /* Get the value from a foo(<param_value>) style call */ |
13214 |
11307 if (IN_param_value == NULL) |
13215 /* Get the value from a foo(<param_value>) style call */ |
11308 IN_param_value = function_call_param_iterator.next(); |
13216 if (IN_param_value == NULL) |
11309 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13217 IN_param_value = function_call_param_iterator.next(); |
11310 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13218 if (IN_param_value != NULL) { |
11311 |
13219 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11312 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13220 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13221 } |
|
13222 |
|
13223 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11313 { |
13224 { |
11314 |
13225 |
11315 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
13226 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
13227 |
|
13228 if (IN_type_symbol == NULL) |
|
13229 IN_type_symbol = last_type_symbol; |
11316 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13230 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11317 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
13231 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
11318 function_type_prefix = return_type_symbol; |
13232 function_type_prefix = return_type_symbol; |
11319 break; |
13233 break; |
11320 |
13234 |
11336 |
13250 |
11337 { |
13251 { |
11338 identifier_c param_name("IN"); |
13252 identifier_c param_name("IN"); |
11339 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13253 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11340 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13254 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11341 |
13255 symbol_c *IN_type_symbol = NULL; |
11342 /* Get the value from a foo(<param_value>) style call */ |
13256 |
11343 if (IN_param_value == NULL) |
13257 /* Get the value from a foo(<param_value>) style call */ |
11344 IN_param_value = function_call_param_iterator.next(); |
13258 if (IN_param_value == NULL) |
11345 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13259 IN_param_value = function_call_param_iterator.next(); |
11346 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13260 if (IN_param_value != NULL) { |
11347 |
13261 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11348 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13262 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11349 { |
13263 } |
11350 |
13264 |
|
13265 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13266 { |
|
13267 |
|
13268 |
|
13269 if (IN_type_symbol == NULL) |
|
13270 IN_type_symbol = last_type_symbol; |
11351 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13271 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11352 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
13272 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
11353 function_type_prefix = return_type_symbol; |
13273 function_type_prefix = return_type_symbol; |
11354 break; |
13274 break; |
11355 |
13275 |
11371 |
13291 |
11372 { |
13292 { |
11373 identifier_c param_name("IN"); |
13293 identifier_c param_name("IN"); |
11374 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13294 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11375 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13295 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11376 |
13296 symbol_c *IN_type_symbol = NULL; |
11377 /* Get the value from a foo(<param_value>) style call */ |
13297 |
11378 if (IN_param_value == NULL) |
13298 /* Get the value from a foo(<param_value>) style call */ |
11379 IN_param_value = function_call_param_iterator.next(); |
13299 if (IN_param_value == NULL) |
11380 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13300 IN_param_value = function_call_param_iterator.next(); |
11381 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13301 if (IN_param_value != NULL) { |
11382 |
13302 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11383 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13303 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11384 { |
13304 } |
11385 |
13305 |
|
13306 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13307 { |
|
13308 |
|
13309 |
|
13310 if (IN_type_symbol == NULL) |
|
13311 IN_type_symbol = last_type_symbol; |
11386 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13312 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11387 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
13313 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
11388 function_type_prefix = return_type_symbol; |
13314 function_type_prefix = return_type_symbol; |
11389 break; |
13315 break; |
11390 |
13316 |
11406 |
13332 |
11407 { |
13333 { |
11408 identifier_c param_name("IN"); |
13334 identifier_c param_name("IN"); |
11409 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13335 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11410 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13336 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11411 |
13337 symbol_c *IN_type_symbol = NULL; |
11412 /* Get the value from a foo(<param_value>) style call */ |
13338 |
11413 if (IN_param_value == NULL) |
13339 /* Get the value from a foo(<param_value>) style call */ |
11414 IN_param_value = function_call_param_iterator.next(); |
13340 if (IN_param_value == NULL) |
11415 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13341 IN_param_value = function_call_param_iterator.next(); |
11416 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13342 if (IN_param_value != NULL) { |
11417 |
13343 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11418 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13344 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13345 } |
|
13346 |
|
13347 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11419 { |
13348 { |
11420 |
13349 |
11421 function_name = (symbol_c*)(new pragma_c("__bool_to_string")); |
13350 function_name = (symbol_c*)(new pragma_c("__bool_to_string")); |
|
13351 |
|
13352 if (IN_type_symbol == NULL) |
|
13353 IN_type_symbol = last_type_symbol; |
11422 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13354 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11423 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
13355 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
11424 function_type_prefix = return_type_symbol; |
13356 function_type_prefix = return_type_symbol; |
11425 break; |
13357 break; |
11426 |
13358 |
11442 |
13374 |
11443 { |
13375 { |
11444 identifier_c param_name("IN"); |
13376 identifier_c param_name("IN"); |
11445 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13377 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11446 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13378 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11447 |
13379 symbol_c *IN_type_symbol = NULL; |
11448 /* Get the value from a foo(<param_value>) style call */ |
13380 |
11449 if (IN_param_value == NULL) |
13381 /* Get the value from a foo(<param_value>) style call */ |
11450 IN_param_value = function_call_param_iterator.next(); |
13382 if (IN_param_value == NULL) |
11451 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13383 IN_param_value = function_call_param_iterator.next(); |
11452 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13384 if (IN_param_value != NULL) { |
11453 |
13385 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11454 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13386 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11455 { |
13387 } |
11456 |
13388 |
|
13389 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13390 { |
|
13391 |
|
13392 |
|
13393 if (IN_type_symbol == NULL) |
|
13394 IN_type_symbol = last_type_symbol; |
11457 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13395 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11458 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
13396 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
11459 function_type_prefix = return_type_symbol; |
13397 function_type_prefix = return_type_symbol; |
11460 break; |
13398 break; |
11461 |
13399 |
11477 |
13415 |
11478 { |
13416 { |
11479 identifier_c param_name("IN"); |
13417 identifier_c param_name("IN"); |
11480 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13418 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11481 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13419 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11482 |
13420 symbol_c *IN_type_symbol = NULL; |
11483 /* Get the value from a foo(<param_value>) style call */ |
13421 |
11484 if (IN_param_value == NULL) |
13422 /* Get the value from a foo(<param_value>) style call */ |
11485 IN_param_value = function_call_param_iterator.next(); |
13423 if (IN_param_value == NULL) |
11486 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13424 IN_param_value = function_call_param_iterator.next(); |
11487 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13425 if (IN_param_value != NULL) { |
11488 |
13426 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11489 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13427 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11490 { |
13428 } |
11491 |
13429 |
|
13430 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13431 { |
|
13432 |
|
13433 |
|
13434 if (IN_type_symbol == NULL) |
|
13435 IN_type_symbol = last_type_symbol; |
11492 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13436 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11493 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
13437 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
11494 function_type_prefix = return_type_symbol; |
13438 function_type_prefix = return_type_symbol; |
11495 break; |
13439 break; |
11496 |
13440 |
11512 |
13456 |
11513 { |
13457 { |
11514 identifier_c param_name("IN"); |
13458 identifier_c param_name("IN"); |
11515 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13459 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11516 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13460 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11517 |
13461 symbol_c *IN_type_symbol = NULL; |
11518 /* Get the value from a foo(<param_value>) style call */ |
13462 |
11519 if (IN_param_value == NULL) |
13463 /* Get the value from a foo(<param_value>) style call */ |
11520 IN_param_value = function_call_param_iterator.next(); |
13464 if (IN_param_value == NULL) |
11521 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13465 IN_param_value = function_call_param_iterator.next(); |
11522 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13466 if (IN_param_value != NULL) { |
11523 |
13467 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11524 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13468 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11525 { |
13469 } |
11526 |
13470 |
|
13471 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13472 { |
|
13473 |
|
13474 |
|
13475 if (IN_type_symbol == NULL) |
|
13476 IN_type_symbol = last_type_symbol; |
11527 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13477 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11528 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
13478 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
11529 function_type_prefix = return_type_symbol; |
13479 function_type_prefix = return_type_symbol; |
11530 break; |
13480 break; |
11531 |
13481 |
11547 |
13497 |
11548 { |
13498 { |
11549 identifier_c param_name("IN"); |
13499 identifier_c param_name("IN"); |
11550 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13500 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11551 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13501 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11552 |
13502 symbol_c *IN_type_symbol = NULL; |
11553 /* Get the value from a foo(<param_value>) style call */ |
13503 |
11554 if (IN_param_value == NULL) |
13504 /* Get the value from a foo(<param_value>) style call */ |
11555 IN_param_value = function_call_param_iterator.next(); |
13505 if (IN_param_value == NULL) |
11556 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13506 IN_param_value = function_call_param_iterator.next(); |
11557 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13507 if (IN_param_value != NULL) { |
11558 |
13508 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11559 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13509 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11560 { |
13510 } |
11561 |
13511 |
|
13512 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13513 { |
|
13514 |
|
13515 |
|
13516 if (IN_type_symbol == NULL) |
|
13517 IN_type_symbol = last_type_symbol; |
11562 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13518 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11563 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
13519 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
11564 function_type_prefix = return_type_symbol; |
13520 function_type_prefix = return_type_symbol; |
11565 break; |
13521 break; |
11566 |
13522 |
11582 |
13538 |
11583 { |
13539 { |
11584 identifier_c param_name("IN"); |
13540 identifier_c param_name("IN"); |
11585 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13541 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11586 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13542 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11587 |
13543 symbol_c *IN_type_symbol = NULL; |
11588 /* Get the value from a foo(<param_value>) style call */ |
13544 |
11589 if (IN_param_value == NULL) |
13545 /* Get the value from a foo(<param_value>) style call */ |
11590 IN_param_value = function_call_param_iterator.next(); |
13546 if (IN_param_value == NULL) |
11591 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13547 IN_param_value = function_call_param_iterator.next(); |
11592 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13548 if (IN_param_value != NULL) { |
11593 |
13549 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11594 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13550 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11595 { |
13551 } |
11596 |
13552 |
|
13553 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13554 { |
|
13555 |
|
13556 |
|
13557 if (IN_type_symbol == NULL) |
|
13558 IN_type_symbol = last_type_symbol; |
11597 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13559 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11598 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
13560 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
11599 function_type_prefix = return_type_symbol; |
13561 function_type_prefix = return_type_symbol; |
11600 break; |
13562 break; |
11601 |
13563 |
11617 |
13579 |
11618 { |
13580 { |
11619 identifier_c param_name("IN"); |
13581 identifier_c param_name("IN"); |
11620 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13582 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11621 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13583 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11622 |
13584 symbol_c *IN_type_symbol = NULL; |
11623 /* Get the value from a foo(<param_value>) style call */ |
13585 |
11624 if (IN_param_value == NULL) |
13586 /* Get the value from a foo(<param_value>) style call */ |
11625 IN_param_value = function_call_param_iterator.next(); |
13587 if (IN_param_value == NULL) |
11626 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13588 IN_param_value = function_call_param_iterator.next(); |
11627 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13589 if (IN_param_value != NULL) { |
11628 |
13590 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11629 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13591 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11630 { |
13592 } |
11631 |
13593 |
|
13594 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13595 { |
|
13596 |
|
13597 |
|
13598 if (IN_type_symbol == NULL) |
|
13599 IN_type_symbol = last_type_symbol; |
11632 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13600 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11633 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
13601 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
11634 function_type_prefix = return_type_symbol; |
13602 function_type_prefix = return_type_symbol; |
11635 break; |
13603 break; |
11636 |
13604 |
11652 |
13620 |
11653 { |
13621 { |
11654 identifier_c param_name("IN"); |
13622 identifier_c param_name("IN"); |
11655 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13623 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11656 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13624 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11657 |
13625 symbol_c *IN_type_symbol = NULL; |
11658 /* Get the value from a foo(<param_value>) style call */ |
13626 |
11659 if (IN_param_value == NULL) |
13627 /* Get the value from a foo(<param_value>) style call */ |
11660 IN_param_value = function_call_param_iterator.next(); |
13628 if (IN_param_value == NULL) |
11661 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13629 IN_param_value = function_call_param_iterator.next(); |
11662 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13630 if (IN_param_value != NULL) { |
11663 |
13631 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11664 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13632 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13633 } |
|
13634 |
|
13635 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
11665 { |
13636 { |
11666 |
13637 |
11667 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
13638 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
13639 |
|
13640 if (IN_type_symbol == NULL) |
|
13641 IN_type_symbol = last_type_symbol; |
11668 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13642 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11669 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
13643 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
11670 function_type_prefix = return_type_symbol; |
13644 function_type_prefix = return_type_symbol; |
11671 break; |
13645 break; |
11672 |
13646 |
11688 |
13662 |
11689 { |
13663 { |
11690 identifier_c param_name("IN"); |
13664 identifier_c param_name("IN"); |
11691 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13665 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11692 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13666 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11693 |
13667 symbol_c *IN_type_symbol = NULL; |
11694 /* Get the value from a foo(<param_value>) style call */ |
13668 |
11695 if (IN_param_value == NULL) |
13669 /* Get the value from a foo(<param_value>) style call */ |
11696 IN_param_value = function_call_param_iterator.next(); |
13670 if (IN_param_value == NULL) |
11697 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13671 IN_param_value = function_call_param_iterator.next(); |
11698 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13672 if (IN_param_value != NULL) { |
11699 |
13673 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11700 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
13674 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
11701 { |
13675 } |
11702 |
13676 |
|
13677 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
|
13678 { |
|
13679 |
|
13680 |
|
13681 if (IN_type_symbol == NULL) |
|
13682 IN_type_symbol = last_type_symbol; |
11703 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13683 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11704 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
13684 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
11705 function_type_prefix = return_type_symbol; |
13685 function_type_prefix = return_type_symbol; |
11706 break; |
13686 break; |
11707 |
13687 |
11723 |
13703 |
11724 { |
13704 { |
11725 identifier_c param_name("IN"); |
13705 identifier_c param_name("IN"); |
11726 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13706 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11727 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13707 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11728 |
13708 symbol_c *IN_type_symbol = NULL; |
11729 /* Get the value from a foo(<param_value>) style call */ |
13709 |
11730 if (IN_param_value == NULL) |
13710 /* Get the value from a foo(<param_value>) style call */ |
11731 IN_param_value = function_call_param_iterator.next(); |
13711 if (IN_param_value == NULL) |
11732 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13712 IN_param_value = function_call_param_iterator.next(); |
11733 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13713 if (IN_param_value != NULL) { |
11734 |
13714 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11735 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13715 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13716 } |
|
13717 |
|
13718 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
11736 { |
13719 { |
11737 |
13720 |
11738 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
13721 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
13722 |
|
13723 if (IN_type_symbol == NULL) |
|
13724 IN_type_symbol = last_type_symbol; |
11739 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13725 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11740 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
13726 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
11741 function_type_prefix = return_type_symbol; |
13727 function_type_prefix = return_type_symbol; |
11742 break; |
13728 break; |
11743 |
13729 |
11759 |
13745 |
11760 { |
13746 { |
11761 identifier_c param_name("IN"); |
13747 identifier_c param_name("IN"); |
11762 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13748 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11763 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13749 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11764 |
13750 symbol_c *IN_type_symbol = NULL; |
11765 /* Get the value from a foo(<param_value>) style call */ |
13751 |
11766 if (IN_param_value == NULL) |
13752 /* Get the value from a foo(<param_value>) style call */ |
11767 IN_param_value = function_call_param_iterator.next(); |
13753 if (IN_param_value == NULL) |
11768 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13754 IN_param_value = function_call_param_iterator.next(); |
11769 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13755 if (IN_param_value != NULL) { |
11770 |
13756 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11771 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13757 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13758 } |
|
13759 |
|
13760 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
11772 { |
13761 { |
11773 |
13762 |
11774 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
13763 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
13764 |
|
13765 if (IN_type_symbol == NULL) |
|
13766 IN_type_symbol = last_type_symbol; |
11775 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13767 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11776 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
13768 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
11777 function_type_prefix = return_type_symbol; |
13769 function_type_prefix = return_type_symbol; |
11778 break; |
13770 break; |
11779 |
13771 |
11795 |
13787 |
11796 { |
13788 { |
11797 identifier_c param_name("IN"); |
13789 identifier_c param_name("IN"); |
11798 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13790 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11799 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13791 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11800 |
13792 symbol_c *IN_type_symbol = NULL; |
11801 /* Get the value from a foo(<param_value>) style call */ |
13793 |
11802 if (IN_param_value == NULL) |
13794 /* Get the value from a foo(<param_value>) style call */ |
11803 IN_param_value = function_call_param_iterator.next(); |
13795 if (IN_param_value == NULL) |
11804 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13796 IN_param_value = function_call_param_iterator.next(); |
11805 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13797 if (IN_param_value != NULL) { |
11806 |
13798 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11807 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13799 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13800 } |
|
13801 |
|
13802 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
11808 { |
13803 { |
11809 |
13804 |
11810 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
13805 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
13806 |
|
13807 if (IN_type_symbol == NULL) |
|
13808 IN_type_symbol = last_type_symbol; |
11811 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13809 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11812 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
13810 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
11813 function_type_prefix = return_type_symbol; |
13811 function_type_prefix = return_type_symbol; |
11814 break; |
13812 break; |
11815 |
13813 |
11831 |
13829 |
11832 { |
13830 { |
11833 identifier_c param_name("IN"); |
13831 identifier_c param_name("IN"); |
11834 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13832 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11835 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13833 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11836 |
13834 symbol_c *IN_type_symbol = NULL; |
11837 /* Get the value from a foo(<param_value>) style call */ |
13835 |
11838 if (IN_param_value == NULL) |
13836 /* Get the value from a foo(<param_value>) style call */ |
11839 IN_param_value = function_call_param_iterator.next(); |
13837 if (IN_param_value == NULL) |
11840 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13838 IN_param_value = function_call_param_iterator.next(); |
11841 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13839 if (IN_param_value != NULL) { |
11842 |
13840 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11843 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13841 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13842 } |
|
13843 |
|
13844 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
11844 { |
13845 { |
11845 |
13846 |
11846 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
13847 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
13848 |
|
13849 if (IN_type_symbol == NULL) |
|
13850 IN_type_symbol = last_type_symbol; |
11847 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13851 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11848 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
13852 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
11849 function_type_prefix = return_type_symbol; |
13853 function_type_prefix = return_type_symbol; |
11850 break; |
13854 break; |
11851 |
13855 |
11867 |
13871 |
11868 { |
13872 { |
11869 identifier_c param_name("IN"); |
13873 identifier_c param_name("IN"); |
11870 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13874 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11871 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13875 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11872 |
13876 symbol_c *IN_type_symbol = NULL; |
11873 /* Get the value from a foo(<param_value>) style call */ |
13877 |
11874 if (IN_param_value == NULL) |
13878 /* Get the value from a foo(<param_value>) style call */ |
11875 IN_param_value = function_call_param_iterator.next(); |
13879 if (IN_param_value == NULL) |
11876 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13880 IN_param_value = function_call_param_iterator.next(); |
11877 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13881 if (IN_param_value != NULL) { |
11878 |
13882 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11879 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13883 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13884 } |
|
13885 |
|
13886 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
11880 { |
13887 { |
11881 |
13888 |
11882 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
13889 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
13890 |
|
13891 if (IN_type_symbol == NULL) |
|
13892 IN_type_symbol = last_type_symbol; |
11883 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13893 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11884 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
13894 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
11885 function_type_prefix = return_type_symbol; |
13895 function_type_prefix = return_type_symbol; |
11886 break; |
13896 break; |
11887 |
13897 |
11903 |
13913 |
11904 { |
13914 { |
11905 identifier_c param_name("IN"); |
13915 identifier_c param_name("IN"); |
11906 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13916 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11907 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13917 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11908 |
13918 symbol_c *IN_type_symbol = NULL; |
11909 /* Get the value from a foo(<param_value>) style call */ |
13919 |
11910 if (IN_param_value == NULL) |
13920 /* Get the value from a foo(<param_value>) style call */ |
11911 IN_param_value = function_call_param_iterator.next(); |
13921 if (IN_param_value == NULL) |
11912 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13922 IN_param_value = function_call_param_iterator.next(); |
11913 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13923 if (IN_param_value != NULL) { |
11914 |
13924 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11915 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13925 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13926 } |
|
13927 |
|
13928 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
11916 { |
13929 { |
11917 |
13930 |
11918 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
13931 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
13932 |
|
13933 if (IN_type_symbol == NULL) |
|
13934 IN_type_symbol = last_type_symbol; |
11919 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13935 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11920 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
13936 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
11921 function_type_prefix = return_type_symbol; |
13937 function_type_prefix = return_type_symbol; |
11922 break; |
13938 break; |
11923 |
13939 |
11939 |
13955 |
11940 { |
13956 { |
11941 identifier_c param_name("IN"); |
13957 identifier_c param_name("IN"); |
11942 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13958 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11943 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13959 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11944 |
13960 symbol_c *IN_type_symbol = NULL; |
11945 /* Get the value from a foo(<param_value>) style call */ |
13961 |
11946 if (IN_param_value == NULL) |
13962 /* Get the value from a foo(<param_value>) style call */ |
11947 IN_param_value = function_call_param_iterator.next(); |
13963 if (IN_param_value == NULL) |
11948 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13964 IN_param_value = function_call_param_iterator.next(); |
11949 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
13965 if (IN_param_value != NULL) { |
11950 |
13966 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11951 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13967 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
13968 } |
|
13969 |
|
13970 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
11952 { |
13971 { |
11953 |
13972 |
11954 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
13973 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
13974 |
|
13975 if (IN_type_symbol == NULL) |
|
13976 IN_type_symbol = last_type_symbol; |
11955 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13977 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11956 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
13978 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
11957 function_type_prefix = return_type_symbol; |
13979 function_type_prefix = return_type_symbol; |
11958 break; |
13980 break; |
11959 |
13981 |
11975 |
13997 |
11976 { |
13998 { |
11977 identifier_c param_name("IN"); |
13999 identifier_c param_name("IN"); |
11978 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14000 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
11979 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14001 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
11980 |
14002 symbol_c *IN_type_symbol = NULL; |
11981 /* Get the value from a foo(<param_value>) style call */ |
14003 |
11982 if (IN_param_value == NULL) |
14004 /* Get the value from a foo(<param_value>) style call */ |
11983 IN_param_value = function_call_param_iterator.next(); |
14005 if (IN_param_value == NULL) |
11984 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14006 IN_param_value = function_call_param_iterator.next(); |
11985 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14007 if (IN_param_value != NULL) { |
11986 |
14008 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
11987 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14009 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14010 } |
|
14011 |
|
14012 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
11988 { |
14013 { |
11989 |
14014 |
11990 function_name = (symbol_c*)(new pragma_c("__time_to_string")); |
14015 function_name = (symbol_c*)(new pragma_c("__time_to_string")); |
|
14016 |
|
14017 if (IN_type_symbol == NULL) |
|
14018 IN_type_symbol = last_type_symbol; |
11991 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14019 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
11992 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
14020 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
11993 function_type_prefix = return_type_symbol; |
14021 function_type_prefix = return_type_symbol; |
11994 break; |
14022 break; |
11995 |
14023 |
12011 |
14039 |
12012 { |
14040 { |
12013 identifier_c param_name("IN"); |
14041 identifier_c param_name("IN"); |
12014 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14042 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12015 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14043 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12016 |
14044 symbol_c *IN_type_symbol = NULL; |
12017 /* Get the value from a foo(<param_value>) style call */ |
14045 |
12018 if (IN_param_value == NULL) |
14046 /* Get the value from a foo(<param_value>) style call */ |
12019 IN_param_value = function_call_param_iterator.next(); |
14047 if (IN_param_value == NULL) |
12020 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14048 IN_param_value = function_call_param_iterator.next(); |
12021 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14049 if (IN_param_value != NULL) { |
12022 |
14050 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12023 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14051 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14052 } |
|
14053 |
|
14054 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
12024 { |
14055 { |
12025 |
14056 |
12026 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
14057 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
14058 |
|
14059 if (IN_type_symbol == NULL) |
|
14060 IN_type_symbol = last_type_symbol; |
12027 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14061 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12028 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
14062 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
12029 function_type_prefix = return_type_symbol; |
14063 function_type_prefix = return_type_symbol; |
12030 break; |
14064 break; |
12031 |
14065 |
12047 |
14081 |
12048 { |
14082 { |
12049 identifier_c param_name("IN"); |
14083 identifier_c param_name("IN"); |
12050 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14084 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12051 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14085 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12052 |
14086 symbol_c *IN_type_symbol = NULL; |
12053 /* Get the value from a foo(<param_value>) style call */ |
14087 |
12054 if (IN_param_value == NULL) |
14088 /* Get the value from a foo(<param_value>) style call */ |
12055 IN_param_value = function_call_param_iterator.next(); |
14089 if (IN_param_value == NULL) |
12056 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14090 IN_param_value = function_call_param_iterator.next(); |
12057 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14091 if (IN_param_value != NULL) { |
12058 |
14092 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12059 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14093 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14094 } |
|
14095 |
|
14096 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
12060 { |
14097 { |
12061 |
14098 |
12062 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
14099 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
14100 |
|
14101 if (IN_type_symbol == NULL) |
|
14102 IN_type_symbol = last_type_symbol; |
12063 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14103 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12064 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
14104 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
12065 function_type_prefix = return_type_symbol; |
14105 function_type_prefix = return_type_symbol; |
12066 break; |
14106 break; |
12067 |
14107 |
12083 |
14123 |
12084 { |
14124 { |
12085 identifier_c param_name("IN"); |
14125 identifier_c param_name("IN"); |
12086 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14126 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12087 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14127 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12088 |
14128 symbol_c *IN_type_symbol = NULL; |
12089 /* Get the value from a foo(<param_value>) style call */ |
14129 |
12090 if (IN_param_value == NULL) |
14130 /* Get the value from a foo(<param_value>) style call */ |
12091 IN_param_value = function_call_param_iterator.next(); |
14131 if (IN_param_value == NULL) |
12092 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14132 IN_param_value = function_call_param_iterator.next(); |
12093 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14133 if (IN_param_value != NULL) { |
12094 |
14134 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12095 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14135 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14136 } |
|
14137 |
|
14138 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
12096 { |
14139 { |
12097 |
14140 |
12098 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
14141 function_name = (symbol_c*)(new pragma_c("__time_to_real")); |
|
14142 |
|
14143 if (IN_type_symbol == NULL) |
|
14144 IN_type_symbol = last_type_symbol; |
12099 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14145 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12100 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
14146 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
12101 function_type_prefix = return_type_symbol; |
14147 function_type_prefix = return_type_symbol; |
12102 break; |
14148 break; |
12103 |
14149 |
12119 |
14165 |
12120 { |
14166 { |
12121 identifier_c param_name("IN"); |
14167 identifier_c param_name("IN"); |
12122 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14168 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12123 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14169 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12124 |
14170 symbol_c *IN_type_symbol = NULL; |
12125 /* Get the value from a foo(<param_value>) style call */ |
14171 |
12126 if (IN_param_value == NULL) |
14172 /* Get the value from a foo(<param_value>) style call */ |
12127 IN_param_value = function_call_param_iterator.next(); |
14173 if (IN_param_value == NULL) |
12128 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14174 IN_param_value = function_call_param_iterator.next(); |
12129 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14175 if (IN_param_value != NULL) { |
12130 |
14176 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12131 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14177 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14178 } |
|
14179 |
|
14180 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
12132 { |
14181 { |
12133 |
14182 |
12134 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
14183 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
14184 |
|
14185 if (IN_type_symbol == NULL) |
|
14186 IN_type_symbol = last_type_symbol; |
12135 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14187 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12136 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
14188 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
12137 function_type_prefix = return_type_symbol; |
14189 function_type_prefix = return_type_symbol; |
12138 break; |
14190 break; |
12139 |
14191 |
12155 |
14207 |
12156 { |
14208 { |
12157 identifier_c param_name("IN"); |
14209 identifier_c param_name("IN"); |
12158 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14210 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12159 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14211 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12160 |
14212 symbol_c *IN_type_symbol = NULL; |
12161 /* Get the value from a foo(<param_value>) style call */ |
14213 |
12162 if (IN_param_value == NULL) |
14214 /* Get the value from a foo(<param_value>) style call */ |
12163 IN_param_value = function_call_param_iterator.next(); |
14215 if (IN_param_value == NULL) |
12164 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14216 IN_param_value = function_call_param_iterator.next(); |
12165 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14217 if (IN_param_value != NULL) { |
12166 |
14218 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12167 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14219 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14220 } |
|
14221 |
|
14222 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
12168 { |
14223 { |
12169 |
14224 |
12170 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
14225 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
14226 |
|
14227 if (IN_type_symbol == NULL) |
|
14228 IN_type_symbol = last_type_symbol; |
12171 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14229 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12172 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
14230 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
12173 function_type_prefix = return_type_symbol; |
14231 function_type_prefix = return_type_symbol; |
12174 break; |
14232 break; |
12175 |
14233 |
12191 |
14249 |
12192 { |
14250 { |
12193 identifier_c param_name("IN"); |
14251 identifier_c param_name("IN"); |
12194 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14252 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12195 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14253 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12196 |
14254 symbol_c *IN_type_symbol = NULL; |
12197 /* Get the value from a foo(<param_value>) style call */ |
14255 |
12198 if (IN_param_value == NULL) |
14256 /* Get the value from a foo(<param_value>) style call */ |
12199 IN_param_value = function_call_param_iterator.next(); |
14257 if (IN_param_value == NULL) |
12200 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14258 IN_param_value = function_call_param_iterator.next(); |
12201 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14259 if (IN_param_value != NULL) { |
12202 |
14260 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12203 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14261 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14262 } |
|
14263 |
|
14264 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
12204 { |
14265 { |
12205 |
14266 |
12206 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
14267 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
14268 |
|
14269 if (IN_type_symbol == NULL) |
|
14270 IN_type_symbol = last_type_symbol; |
12207 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14271 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12208 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
14272 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
12209 function_type_prefix = return_type_symbol; |
14273 function_type_prefix = return_type_symbol; |
12210 break; |
14274 break; |
12211 |
14275 |
12227 |
14291 |
12228 { |
14292 { |
12229 identifier_c param_name("IN"); |
14293 identifier_c param_name("IN"); |
12230 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14294 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12231 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14295 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12232 |
14296 symbol_c *IN_type_symbol = NULL; |
12233 /* Get the value from a foo(<param_value>) style call */ |
14297 |
12234 if (IN_param_value == NULL) |
14298 /* Get the value from a foo(<param_value>) style call */ |
12235 IN_param_value = function_call_param_iterator.next(); |
14299 if (IN_param_value == NULL) |
12236 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14300 IN_param_value = function_call_param_iterator.next(); |
12237 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14301 if (IN_param_value != NULL) { |
12238 |
14302 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12239 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14303 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14304 } |
|
14305 |
|
14306 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
12240 { |
14307 { |
12241 |
14308 |
12242 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
14309 function_name = (symbol_c*)(new pragma_c("__time_to_int")); |
|
14310 |
|
14311 if (IN_type_symbol == NULL) |
|
14312 IN_type_symbol = last_type_symbol; |
12243 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14313 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12244 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
14314 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
12245 function_type_prefix = return_type_symbol; |
14315 function_type_prefix = return_type_symbol; |
12246 break; |
14316 break; |
12247 |
14317 |
12263 |
14333 |
12264 { |
14334 { |
12265 identifier_c param_name("IN"); |
14335 identifier_c param_name("IN"); |
12266 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14336 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12267 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14337 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12268 |
14338 symbol_c *IN_type_symbol = NULL; |
12269 /* Get the value from a foo(<param_value>) style call */ |
14339 |
12270 if (IN_param_value == NULL) |
14340 /* Get the value from a foo(<param_value>) style call */ |
12271 IN_param_value = function_call_param_iterator.next(); |
14341 if (IN_param_value == NULL) |
12272 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14342 IN_param_value = function_call_param_iterator.next(); |
12273 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14343 if (IN_param_value != NULL) { |
12274 |
14344 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12275 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14345 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12276 { |
14346 } |
12277 |
14347 |
|
14348 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14349 { |
|
14350 |
|
14351 |
|
14352 if (IN_type_symbol == NULL) |
|
14353 IN_type_symbol = last_type_symbol; |
12278 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14354 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12279 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
14355 symbol_c * return_type_symbol = &search_constant_type_c::real_type_name; |
12280 function_type_prefix = return_type_symbol; |
14356 function_type_prefix = return_type_symbol; |
12281 break; |
14357 break; |
12282 |
14358 |
12298 |
14374 |
12299 { |
14375 { |
12300 identifier_c param_name("IN"); |
14376 identifier_c param_name("IN"); |
12301 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14377 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12302 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14378 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12303 |
14379 symbol_c *IN_type_symbol = NULL; |
12304 /* Get the value from a foo(<param_value>) style call */ |
14380 |
12305 if (IN_param_value == NULL) |
14381 /* Get the value from a foo(<param_value>) style call */ |
12306 IN_param_value = function_call_param_iterator.next(); |
14382 if (IN_param_value == NULL) |
12307 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14383 IN_param_value = function_call_param_iterator.next(); |
12308 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14384 if (IN_param_value != NULL) { |
12309 |
14385 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12310 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14386 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12311 { |
14387 } |
12312 |
14388 |
|
14389 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14390 { |
|
14391 |
|
14392 |
|
14393 if (IN_type_symbol == NULL) |
|
14394 IN_type_symbol = last_type_symbol; |
12313 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14395 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12314 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
14396 symbol_c * return_type_symbol = &search_constant_type_c::sint_type_name; |
12315 function_type_prefix = return_type_symbol; |
14397 function_type_prefix = return_type_symbol; |
12316 break; |
14398 break; |
12317 |
14399 |
12333 |
14415 |
12334 { |
14416 { |
12335 identifier_c param_name("IN"); |
14417 identifier_c param_name("IN"); |
12336 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14418 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12337 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14419 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12338 |
14420 symbol_c *IN_type_symbol = NULL; |
12339 /* Get the value from a foo(<param_value>) style call */ |
14421 |
12340 if (IN_param_value == NULL) |
14422 /* Get the value from a foo(<param_value>) style call */ |
12341 IN_param_value = function_call_param_iterator.next(); |
14423 if (IN_param_value == NULL) |
12342 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14424 IN_param_value = function_call_param_iterator.next(); |
12343 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14425 if (IN_param_value != NULL) { |
12344 |
14426 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12345 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14427 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12346 { |
14428 } |
12347 |
14429 |
|
14430 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14431 { |
|
14432 |
|
14433 |
|
14434 if (IN_type_symbol == NULL) |
|
14435 IN_type_symbol = last_type_symbol; |
12348 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14436 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12349 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
14437 symbol_c * return_type_symbol = &search_constant_type_c::lint_type_name; |
12350 function_type_prefix = return_type_symbol; |
14438 function_type_prefix = return_type_symbol; |
12351 break; |
14439 break; |
12352 |
14440 |
12368 |
14456 |
12369 { |
14457 { |
12370 identifier_c param_name("IN"); |
14458 identifier_c param_name("IN"); |
12371 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14459 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12372 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14460 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12373 |
14461 symbol_c *IN_type_symbol = NULL; |
12374 /* Get the value from a foo(<param_value>) style call */ |
14462 |
12375 if (IN_param_value == NULL) |
14463 /* Get the value from a foo(<param_value>) style call */ |
12376 IN_param_value = function_call_param_iterator.next(); |
14464 if (IN_param_value == NULL) |
12377 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14465 IN_param_value = function_call_param_iterator.next(); |
12378 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14466 if (IN_param_value != NULL) { |
12379 |
14467 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12380 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14468 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12381 { |
14469 } |
12382 |
14470 |
|
14471 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14472 { |
|
14473 |
|
14474 |
|
14475 if (IN_type_symbol == NULL) |
|
14476 IN_type_symbol = last_type_symbol; |
12383 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14477 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12384 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
14478 symbol_c * return_type_symbol = &search_constant_type_c::dint_type_name; |
12385 function_type_prefix = return_type_symbol; |
14479 function_type_prefix = return_type_symbol; |
12386 break; |
14480 break; |
12387 |
14481 |
12403 |
14497 |
12404 { |
14498 { |
12405 identifier_c param_name("IN"); |
14499 identifier_c param_name("IN"); |
12406 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14500 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12407 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14501 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12408 |
14502 symbol_c *IN_type_symbol = NULL; |
12409 /* Get the value from a foo(<param_value>) style call */ |
14503 |
12410 if (IN_param_value == NULL) |
14504 /* Get the value from a foo(<param_value>) style call */ |
12411 IN_param_value = function_call_param_iterator.next(); |
14505 if (IN_param_value == NULL) |
12412 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14506 IN_param_value = function_call_param_iterator.next(); |
12413 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14507 if (IN_param_value != NULL) { |
12414 |
14508 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12415 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14509 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14510 } |
|
14511 |
|
14512 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
12416 { |
14513 { |
12417 |
14514 |
12418 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
14515 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
14516 |
|
14517 if (IN_type_symbol == NULL) |
|
14518 IN_type_symbol = last_type_symbol; |
12419 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14519 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12420 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
14520 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
12421 function_type_prefix = return_type_symbol; |
14521 function_type_prefix = return_type_symbol; |
12422 break; |
14522 break; |
12423 |
14523 |
12439 |
14539 |
12440 { |
14540 { |
12441 identifier_c param_name("IN"); |
14541 identifier_c param_name("IN"); |
12442 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14542 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12443 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14543 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12444 |
14544 symbol_c *IN_type_symbol = NULL; |
12445 /* Get the value from a foo(<param_value>) style call */ |
14545 |
12446 if (IN_param_value == NULL) |
14546 /* Get the value from a foo(<param_value>) style call */ |
12447 IN_param_value = function_call_param_iterator.next(); |
14547 if (IN_param_value == NULL) |
12448 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14548 IN_param_value = function_call_param_iterator.next(); |
12449 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14549 if (IN_param_value != NULL) { |
12450 |
14550 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12451 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14551 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12452 { |
14552 } |
12453 |
14553 |
|
14554 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14555 { |
|
14556 |
|
14557 |
|
14558 if (IN_type_symbol == NULL) |
|
14559 IN_type_symbol = last_type_symbol; |
12454 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14560 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12455 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
14561 symbol_c * return_type_symbol = &search_constant_type_c::dword_type_name; |
12456 function_type_prefix = return_type_symbol; |
14562 function_type_prefix = return_type_symbol; |
12457 break; |
14563 break; |
12458 |
14564 |
12474 |
14580 |
12475 { |
14581 { |
12476 identifier_c param_name("IN"); |
14582 identifier_c param_name("IN"); |
12477 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14583 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12478 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14584 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12479 |
14585 symbol_c *IN_type_symbol = NULL; |
12480 /* Get the value from a foo(<param_value>) style call */ |
14586 |
12481 if (IN_param_value == NULL) |
14587 /* Get the value from a foo(<param_value>) style call */ |
12482 IN_param_value = function_call_param_iterator.next(); |
14588 if (IN_param_value == NULL) |
12483 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14589 IN_param_value = function_call_param_iterator.next(); |
12484 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14590 if (IN_param_value != NULL) { |
12485 |
14591 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12486 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14592 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14593 } |
|
14594 |
|
14595 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
12487 { |
14596 { |
12488 |
14597 |
12489 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
14598 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
14599 |
|
14600 if (IN_type_symbol == NULL) |
|
14601 IN_type_symbol = last_type_symbol; |
12490 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14602 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12491 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
14603 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
12492 function_type_prefix = return_type_symbol; |
14604 function_type_prefix = return_type_symbol; |
12493 break; |
14605 break; |
12494 |
14606 |
12510 |
14622 |
12511 { |
14623 { |
12512 identifier_c param_name("IN"); |
14624 identifier_c param_name("IN"); |
12513 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14625 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12514 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14626 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12515 |
14627 symbol_c *IN_type_symbol = NULL; |
12516 /* Get the value from a foo(<param_value>) style call */ |
14628 |
12517 if (IN_param_value == NULL) |
14629 /* Get the value from a foo(<param_value>) style call */ |
12518 IN_param_value = function_call_param_iterator.next(); |
14630 if (IN_param_value == NULL) |
12519 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14631 IN_param_value = function_call_param_iterator.next(); |
12520 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14632 if (IN_param_value != NULL) { |
12521 |
14633 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12522 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14634 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14635 } |
|
14636 |
|
14637 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
12523 { |
14638 { |
12524 |
14639 |
12525 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
14640 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
14641 |
|
14642 if (IN_type_symbol == NULL) |
|
14643 IN_type_symbol = last_type_symbol; |
12526 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14644 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12527 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
14645 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
12528 function_type_prefix = return_type_symbol; |
14646 function_type_prefix = return_type_symbol; |
12529 break; |
14647 break; |
12530 |
14648 |
12546 |
14664 |
12547 { |
14665 { |
12548 identifier_c param_name("IN"); |
14666 identifier_c param_name("IN"); |
12549 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14667 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12550 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14668 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12551 |
14669 symbol_c *IN_type_symbol = NULL; |
12552 /* Get the value from a foo(<param_value>) style call */ |
14670 |
12553 if (IN_param_value == NULL) |
14671 /* Get the value from a foo(<param_value>) style call */ |
12554 IN_param_value = function_call_param_iterator.next(); |
14672 if (IN_param_value == NULL) |
12555 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14673 IN_param_value = function_call_param_iterator.next(); |
12556 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14674 if (IN_param_value != NULL) { |
12557 |
14675 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12558 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14676 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12559 { |
14677 } |
12560 |
14678 |
|
14679 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14680 { |
|
14681 |
|
14682 |
|
14683 if (IN_type_symbol == NULL) |
|
14684 IN_type_symbol = last_type_symbol; |
12561 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14685 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12562 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
14686 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
12563 function_type_prefix = return_type_symbol; |
14687 function_type_prefix = return_type_symbol; |
12564 break; |
14688 break; |
12565 |
14689 |
12581 |
14705 |
12582 { |
14706 { |
12583 identifier_c param_name("IN"); |
14707 identifier_c param_name("IN"); |
12584 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14708 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12585 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14709 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12586 |
14710 symbol_c *IN_type_symbol = NULL; |
12587 /* Get the value from a foo(<param_value>) style call */ |
14711 |
12588 if (IN_param_value == NULL) |
14712 /* Get the value from a foo(<param_value>) style call */ |
12589 IN_param_value = function_call_param_iterator.next(); |
14713 if (IN_param_value == NULL) |
12590 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14714 IN_param_value = function_call_param_iterator.next(); |
12591 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14715 if (IN_param_value != NULL) { |
12592 |
14716 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12593 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14717 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12594 { |
14718 } |
12595 |
14719 |
|
14720 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14721 { |
|
14722 |
|
14723 |
|
14724 if (IN_type_symbol == NULL) |
|
14725 IN_type_symbol = last_type_symbol; |
12596 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14726 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12597 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
14727 symbol_c * return_type_symbol = &search_constant_type_c::word_type_name; |
12598 function_type_prefix = return_type_symbol; |
14728 function_type_prefix = return_type_symbol; |
12599 break; |
14729 break; |
12600 |
14730 |
12616 |
14746 |
12617 { |
14747 { |
12618 identifier_c param_name("IN"); |
14748 identifier_c param_name("IN"); |
12619 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14749 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12620 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14750 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12621 |
14751 symbol_c *IN_type_symbol = NULL; |
12622 /* Get the value from a foo(<param_value>) style call */ |
14752 |
12623 if (IN_param_value == NULL) |
14753 /* Get the value from a foo(<param_value>) style call */ |
12624 IN_param_value = function_call_param_iterator.next(); |
14754 if (IN_param_value == NULL) |
12625 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14755 IN_param_value = function_call_param_iterator.next(); |
12626 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14756 if (IN_param_value != NULL) { |
12627 |
14757 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12628 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14758 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
14759 } |
|
14760 |
|
14761 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
12629 { |
14762 { |
12630 |
14763 |
12631 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
14764 function_name = (symbol_c*)(new pragma_c("__sint_to_string")); |
|
14765 |
|
14766 if (IN_type_symbol == NULL) |
|
14767 IN_type_symbol = last_type_symbol; |
12632 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14768 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12633 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
14769 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
12634 function_type_prefix = return_type_symbol; |
14770 function_type_prefix = return_type_symbol; |
12635 break; |
14771 break; |
12636 |
14772 |
12652 |
14788 |
12653 { |
14789 { |
12654 identifier_c param_name("IN"); |
14790 identifier_c param_name("IN"); |
12655 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14791 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12656 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14792 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12657 |
14793 symbol_c *IN_type_symbol = NULL; |
12658 /* Get the value from a foo(<param_value>) style call */ |
14794 |
12659 if (IN_param_value == NULL) |
14795 /* Get the value from a foo(<param_value>) style call */ |
12660 IN_param_value = function_call_param_iterator.next(); |
14796 if (IN_param_value == NULL) |
12661 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14797 IN_param_value = function_call_param_iterator.next(); |
12662 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14798 if (IN_param_value != NULL) { |
12663 |
14799 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12664 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14800 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12665 { |
14801 } |
12666 |
14802 |
|
14803 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14804 { |
|
14805 |
|
14806 |
|
14807 if (IN_type_symbol == NULL) |
|
14808 IN_type_symbol = last_type_symbol; |
12667 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14809 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12668 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
14810 symbol_c * return_type_symbol = &search_constant_type_c::lword_type_name; |
12669 function_type_prefix = return_type_symbol; |
14811 function_type_prefix = return_type_symbol; |
12670 break; |
14812 break; |
12671 |
14813 |
12687 |
14829 |
12688 { |
14830 { |
12689 identifier_c param_name("IN"); |
14831 identifier_c param_name("IN"); |
12690 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14832 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12691 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14833 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12692 |
14834 symbol_c *IN_type_symbol = NULL; |
12693 /* Get the value from a foo(<param_value>) style call */ |
14835 |
12694 if (IN_param_value == NULL) |
14836 /* Get the value from a foo(<param_value>) style call */ |
12695 IN_param_value = function_call_param_iterator.next(); |
14837 if (IN_param_value == NULL) |
12696 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14838 IN_param_value = function_call_param_iterator.next(); |
12697 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14839 if (IN_param_value != NULL) { |
12698 |
14840 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12699 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14841 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12700 { |
14842 } |
12701 |
14843 |
|
14844 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14845 { |
|
14846 |
|
14847 |
|
14848 if (IN_type_symbol == NULL) |
|
14849 IN_type_symbol = last_type_symbol; |
12702 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14850 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12703 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
14851 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
12704 function_type_prefix = return_type_symbol; |
14852 function_type_prefix = return_type_symbol; |
12705 break; |
14853 break; |
12706 |
14854 |
12722 |
14870 |
12723 { |
14871 { |
12724 identifier_c param_name("IN"); |
14872 identifier_c param_name("IN"); |
12725 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14873 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12726 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14874 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12727 |
14875 symbol_c *IN_type_symbol = NULL; |
12728 /* Get the value from a foo(<param_value>) style call */ |
14876 |
12729 if (IN_param_value == NULL) |
14877 /* Get the value from a foo(<param_value>) style call */ |
12730 IN_param_value = function_call_param_iterator.next(); |
14878 if (IN_param_value == NULL) |
12731 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14879 IN_param_value = function_call_param_iterator.next(); |
12732 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14880 if (IN_param_value != NULL) { |
12733 |
14881 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12734 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14882 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12735 { |
14883 } |
12736 |
14884 |
|
14885 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14886 { |
|
14887 |
|
14888 |
|
14889 if (IN_type_symbol == NULL) |
|
14890 IN_type_symbol = last_type_symbol; |
12737 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14891 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12738 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
14892 symbol_c * return_type_symbol = &search_constant_type_c::lreal_type_name; |
12739 function_type_prefix = return_type_symbol; |
14893 function_type_prefix = return_type_symbol; |
12740 break; |
14894 break; |
12741 |
14895 |
12757 |
14911 |
12758 { |
14912 { |
12759 identifier_c param_name("IN"); |
14913 identifier_c param_name("IN"); |
12760 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14914 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12761 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14915 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12762 |
14916 symbol_c *IN_type_symbol = NULL; |
12763 /* Get the value from a foo(<param_value>) style call */ |
14917 |
12764 if (IN_param_value == NULL) |
14918 /* Get the value from a foo(<param_value>) style call */ |
12765 IN_param_value = function_call_param_iterator.next(); |
14919 if (IN_param_value == NULL) |
12766 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14920 IN_param_value = function_call_param_iterator.next(); |
12767 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14921 if (IN_param_value != NULL) { |
12768 |
14922 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12769 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14923 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12770 { |
14924 } |
12771 |
14925 |
|
14926 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14927 { |
|
14928 |
|
14929 |
|
14930 if (IN_type_symbol == NULL) |
|
14931 IN_type_symbol = last_type_symbol; |
12772 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14932 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12773 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
14933 symbol_c * return_type_symbol = &search_constant_type_c::byte_type_name; |
12774 function_type_prefix = return_type_symbol; |
14934 function_type_prefix = return_type_symbol; |
12775 break; |
14935 break; |
12776 |
14936 |
12792 |
14952 |
12793 { |
14953 { |
12794 identifier_c param_name("IN"); |
14954 identifier_c param_name("IN"); |
12795 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14955 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12796 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14956 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12797 |
14957 symbol_c *IN_type_symbol = NULL; |
12798 /* Get the value from a foo(<param_value>) style call */ |
14958 |
12799 if (IN_param_value == NULL) |
14959 /* Get the value from a foo(<param_value>) style call */ |
12800 IN_param_value = function_call_param_iterator.next(); |
14960 if (IN_param_value == NULL) |
12801 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14961 IN_param_value = function_call_param_iterator.next(); |
12802 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
14962 if (IN_param_value != NULL) { |
12803 |
14963 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12804 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
14964 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12805 { |
14965 } |
12806 |
14966 |
|
14967 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
14968 { |
|
14969 |
|
14970 |
|
14971 if (IN_type_symbol == NULL) |
|
14972 IN_type_symbol = last_type_symbol; |
12807 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14973 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12808 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
14974 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
12809 function_type_prefix = return_type_symbol; |
14975 function_type_prefix = return_type_symbol; |
12810 break; |
14976 break; |
12811 |
14977 |
12827 |
14993 |
12828 { |
14994 { |
12829 identifier_c param_name("IN"); |
14995 identifier_c param_name("IN"); |
12830 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14996 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12831 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14997 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12832 |
14998 symbol_c *IN_type_symbol = NULL; |
12833 /* Get the value from a foo(<param_value>) style call */ |
14999 |
12834 if (IN_param_value == NULL) |
15000 /* Get the value from a foo(<param_value>) style call */ |
12835 IN_param_value = function_call_param_iterator.next(); |
15001 if (IN_param_value == NULL) |
12836 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15002 IN_param_value = function_call_param_iterator.next(); |
12837 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15003 if (IN_param_value != NULL) { |
12838 |
15004 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12839 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
15005 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12840 { |
15006 } |
12841 |
15007 |
|
15008 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
15009 { |
|
15010 |
|
15011 |
|
15012 if (IN_type_symbol == NULL) |
|
15013 IN_type_symbol = last_type_symbol; |
12842 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15014 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12843 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
15015 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
12844 function_type_prefix = return_type_symbol; |
15016 function_type_prefix = return_type_symbol; |
12845 break; |
15017 break; |
12846 |
15018 |
12862 |
15034 |
12863 { |
15035 { |
12864 identifier_c param_name("IN"); |
15036 identifier_c param_name("IN"); |
12865 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15037 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12866 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15038 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12867 |
15039 symbol_c *IN_type_symbol = NULL; |
12868 /* Get the value from a foo(<param_value>) style call */ |
15040 |
12869 if (IN_param_value == NULL) |
15041 /* Get the value from a foo(<param_value>) style call */ |
12870 IN_param_value = function_call_param_iterator.next(); |
15042 if (IN_param_value == NULL) |
12871 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15043 IN_param_value = function_call_param_iterator.next(); |
12872 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15044 if (IN_param_value != NULL) { |
12873 |
15045 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12874 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
15046 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12875 { |
15047 } |
12876 |
15048 |
|
15049 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
|
15050 { |
|
15051 |
|
15052 |
|
15053 if (IN_type_symbol == NULL) |
|
15054 IN_type_symbol = last_type_symbol; |
12877 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15055 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12878 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
15056 symbol_c * return_type_symbol = &search_constant_type_c::bool_type_name; |
12879 function_type_prefix = return_type_symbol; |
15057 function_type_prefix = return_type_symbol; |
12880 break; |
15058 break; |
12881 |
15059 |
12897 |
15075 |
12898 { |
15076 { |
12899 identifier_c param_name("IN"); |
15077 identifier_c param_name("IN"); |
12900 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15078 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12901 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15079 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12902 |
15080 symbol_c *IN_type_symbol = NULL; |
12903 /* Get the value from a foo(<param_value>) style call */ |
15081 |
12904 if (IN_param_value == NULL) |
15082 /* Get the value from a foo(<param_value>) style call */ |
12905 IN_param_value = function_call_param_iterator.next(); |
15083 if (IN_param_value == NULL) |
12906 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15084 IN_param_value = function_call_param_iterator.next(); |
12907 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15085 if (IN_param_value != NULL) { |
12908 |
15086 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12909 if(search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
15087 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15088 } |
|
15089 |
|
15090 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::int_type_name, last_type_symbol)) |
12910 { |
15091 { |
12911 |
15092 |
12912 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
15093 function_name = (symbol_c*)(new pragma_c("__int_to_time")); |
|
15094 |
|
15095 if (IN_type_symbol == NULL) |
|
15096 IN_type_symbol = last_type_symbol; |
12913 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15097 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12914 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
15098 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
12915 function_type_prefix = return_type_symbol; |
15099 function_type_prefix = return_type_symbol; |
12916 break; |
15100 break; |
12917 |
15101 |
12933 |
15117 |
12934 { |
15118 { |
12935 identifier_c param_name("IN"); |
15119 identifier_c param_name("IN"); |
12936 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15120 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12937 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15121 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12938 |
15122 symbol_c *IN_type_symbol = NULL; |
12939 /* Get the value from a foo(<param_value>) style call */ |
15123 |
12940 if (IN_param_value == NULL) |
15124 /* Get the value from a foo(<param_value>) style call */ |
12941 IN_param_value = function_call_param_iterator.next(); |
15125 if (IN_param_value == NULL) |
12942 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15126 IN_param_value = function_call_param_iterator.next(); |
12943 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15127 if (IN_param_value != NULL) { |
12944 |
15128 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12945 if(search_expression_type->is_real_type(IN_type_symbol)) |
15129 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
12946 { |
15130 } |
12947 |
15131 |
|
15132 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
|
15133 { |
|
15134 |
|
15135 |
|
15136 if (IN_type_symbol == NULL) |
|
15137 IN_type_symbol = last_type_symbol; |
12948 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15138 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12949 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
15139 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
12950 function_type_prefix = (symbol_c*)(new pragma_c("int")); |
15140 function_type_prefix = (symbol_c*)(new pragma_c("int")); |
12951 break; |
15141 break; |
12952 |
15142 |
12968 |
15158 |
12969 { |
15159 { |
12970 identifier_c param_name("IN"); |
15160 identifier_c param_name("IN"); |
12971 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15161 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
12972 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15162 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
12973 |
15163 symbol_c *IN_type_symbol = NULL; |
12974 /* Get the value from a foo(<param_value>) style call */ |
15164 |
12975 if (IN_param_value == NULL) |
15165 /* Get the value from a foo(<param_value>) style call */ |
12976 IN_param_value = function_call_param_iterator.next(); |
15166 if (IN_param_value == NULL) |
12977 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15167 IN_param_value = function_call_param_iterator.next(); |
12978 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15168 if (IN_param_value != NULL) { |
12979 |
15169 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
12980 if(search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
15170 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15171 } |
|
15172 |
|
15173 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dword_type_name, last_type_symbol)) |
12981 { |
15174 { |
12982 |
15175 |
12983 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
15176 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
|
15177 |
|
15178 if (IN_type_symbol == NULL) |
|
15179 IN_type_symbol = last_type_symbol; |
12984 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15180 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
12985 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
15181 symbol_c * return_type_symbol = &search_constant_type_c::udint_type_name; |
12986 function_type_prefix = return_type_symbol; |
15182 function_type_prefix = return_type_symbol; |
12987 break; |
15183 break; |
12988 |
15184 |
13004 |
15200 |
13005 { |
15201 { |
13006 identifier_c param_name("IN"); |
15202 identifier_c param_name("IN"); |
13007 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15203 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13008 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15204 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13009 |
15205 symbol_c *IN_type_symbol = NULL; |
13010 /* Get the value from a foo(<param_value>) style call */ |
15206 |
13011 if (IN_param_value == NULL) |
15207 /* Get the value from a foo(<param_value>) style call */ |
13012 IN_param_value = function_call_param_iterator.next(); |
15208 if (IN_param_value == NULL) |
13013 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15209 IN_param_value = function_call_param_iterator.next(); |
13014 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15210 if (IN_param_value != NULL) { |
13015 |
15211 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13016 if(search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
15212 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15213 } |
|
15214 |
|
15215 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::word_type_name, last_type_symbol)) |
13017 { |
15216 { |
13018 |
15217 |
13019 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
15218 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
|
15219 |
|
15220 if (IN_type_symbol == NULL) |
|
15221 IN_type_symbol = last_type_symbol; |
13020 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15222 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13021 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
15223 symbol_c * return_type_symbol = &search_constant_type_c::uint_type_name; |
13022 function_type_prefix = return_type_symbol; |
15224 function_type_prefix = return_type_symbol; |
13023 break; |
15225 break; |
13024 |
15226 |
13040 |
15242 |
13041 { |
15243 { |
13042 identifier_c param_name("IN"); |
15244 identifier_c param_name("IN"); |
13043 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15245 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13044 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15246 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13045 |
15247 symbol_c *IN_type_symbol = NULL; |
13046 /* Get the value from a foo(<param_value>) style call */ |
15248 |
13047 if (IN_param_value == NULL) |
15249 /* Get the value from a foo(<param_value>) style call */ |
13048 IN_param_value = function_call_param_iterator.next(); |
15250 if (IN_param_value == NULL) |
13049 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15251 IN_param_value = function_call_param_iterator.next(); |
13050 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15252 if (IN_param_value != NULL) { |
13051 |
15253 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13052 if(search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
15254 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15255 } |
|
15256 |
|
15257 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::lword_type_name, last_type_symbol)) |
13053 { |
15258 { |
13054 |
15259 |
13055 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
15260 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
|
15261 |
|
15262 if (IN_type_symbol == NULL) |
|
15263 IN_type_symbol = last_type_symbol; |
13056 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15264 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13057 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
15265 symbol_c * return_type_symbol = &search_constant_type_c::ulint_type_name; |
13058 function_type_prefix = return_type_symbol; |
15266 function_type_prefix = return_type_symbol; |
13059 break; |
15267 break; |
13060 |
15268 |
13076 |
15284 |
13077 { |
15285 { |
13078 identifier_c param_name("IN"); |
15286 identifier_c param_name("IN"); |
13079 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15287 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13080 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15288 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13081 |
15289 symbol_c *IN_type_symbol = NULL; |
13082 /* Get the value from a foo(<param_value>) style call */ |
15290 |
13083 if (IN_param_value == NULL) |
15291 /* Get the value from a foo(<param_value>) style call */ |
13084 IN_param_value = function_call_param_iterator.next(); |
15292 if (IN_param_value == NULL) |
13085 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15293 IN_param_value = function_call_param_iterator.next(); |
13086 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15294 if (IN_param_value != NULL) { |
13087 |
15295 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13088 if(search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
15296 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15297 } |
|
15298 |
|
15299 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::byte_type_name, last_type_symbol)) |
13089 { |
15300 { |
13090 |
15301 |
13091 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
15302 function_name = (symbol_c*)(new pragma_c("__bcd_to_uint")); |
|
15303 |
|
15304 if (IN_type_symbol == NULL) |
|
15305 IN_type_symbol = last_type_symbol; |
13092 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15306 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13093 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
15307 symbol_c * return_type_symbol = &search_constant_type_c::usint_type_name; |
13094 function_type_prefix = return_type_symbol; |
15308 function_type_prefix = return_type_symbol; |
13095 break; |
15309 break; |
13096 |
15310 |
13112 |
15326 |
13113 { |
15327 { |
13114 identifier_c param_name("IN"); |
15328 identifier_c param_name("IN"); |
13115 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15329 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13116 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15330 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13117 |
15331 symbol_c *IN_type_symbol = NULL; |
13118 /* Get the value from a foo(<param_value>) style call */ |
15332 |
13119 if (IN_param_value == NULL) |
15333 /* Get the value from a foo(<param_value>) style call */ |
13120 IN_param_value = function_call_param_iterator.next(); |
15334 if (IN_param_value == NULL) |
13121 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15335 IN_param_value = function_call_param_iterator.next(); |
13122 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15336 if (IN_param_value != NULL) { |
13123 |
15337 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13124 if(search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
15338 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15339 } |
|
15340 |
|
15341 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::udint_type_name, last_type_symbol)) |
13125 { |
15342 { |
13126 |
15343 |
13127 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
15344 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
|
15345 |
|
15346 if (IN_type_symbol == NULL) |
|
15347 IN_type_symbol = last_type_symbol; |
13128 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15348 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13129 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
15349 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
13130 function_type_prefix = return_type_symbol; |
15350 function_type_prefix = return_type_symbol; |
13131 break; |
15351 break; |
13132 |
15352 |
13148 |
15368 |
13149 { |
15369 { |
13150 identifier_c param_name("IN"); |
15370 identifier_c param_name("IN"); |
13151 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15371 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13152 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15372 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13153 |
15373 symbol_c *IN_type_symbol = NULL; |
13154 /* Get the value from a foo(<param_value>) style call */ |
15374 |
13155 if (IN_param_value == NULL) |
15375 /* Get the value from a foo(<param_value>) style call */ |
13156 IN_param_value = function_call_param_iterator.next(); |
15376 if (IN_param_value == NULL) |
13157 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15377 IN_param_value = function_call_param_iterator.next(); |
13158 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15378 if (IN_param_value != NULL) { |
13159 |
15379 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13160 if(search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
15380 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15381 } |
|
15382 |
|
15383 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::uint_type_name, last_type_symbol)) |
13161 { |
15384 { |
13162 |
15385 |
13163 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
15386 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
|
15387 |
|
15388 if (IN_type_symbol == NULL) |
|
15389 IN_type_symbol = last_type_symbol; |
13164 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15390 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13165 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
15391 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
13166 function_type_prefix = return_type_symbol; |
15392 function_type_prefix = return_type_symbol; |
13167 break; |
15393 break; |
13168 |
15394 |
13184 |
15410 |
13185 { |
15411 { |
13186 identifier_c param_name("IN"); |
15412 identifier_c param_name("IN"); |
13187 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15413 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13188 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15414 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13189 |
15415 symbol_c *IN_type_symbol = NULL; |
13190 /* Get the value from a foo(<param_value>) style call */ |
15416 |
13191 if (IN_param_value == NULL) |
15417 /* Get the value from a foo(<param_value>) style call */ |
13192 IN_param_value = function_call_param_iterator.next(); |
15418 if (IN_param_value == NULL) |
13193 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15419 IN_param_value = function_call_param_iterator.next(); |
13194 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15420 if (IN_param_value != NULL) { |
13195 |
15421 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13196 if(search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
15422 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15423 } |
|
15424 |
|
15425 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::usint_type_name, last_type_symbol)) |
13197 { |
15426 { |
13198 |
15427 |
13199 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
15428 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
|
15429 |
|
15430 if (IN_type_symbol == NULL) |
|
15431 IN_type_symbol = last_type_symbol; |
13200 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15432 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13201 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
15433 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
13202 function_type_prefix = return_type_symbol; |
15434 function_type_prefix = return_type_symbol; |
13203 break; |
15435 break; |
13204 |
15436 |
13220 |
15452 |
13221 { |
15453 { |
13222 identifier_c param_name("IN"); |
15454 identifier_c param_name("IN"); |
13223 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15455 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13224 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15456 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13225 |
15457 symbol_c *IN_type_symbol = NULL; |
13226 /* Get the value from a foo(<param_value>) style call */ |
15458 |
13227 if (IN_param_value == NULL) |
15459 /* Get the value from a foo(<param_value>) style call */ |
13228 IN_param_value = function_call_param_iterator.next(); |
15460 if (IN_param_value == NULL) |
13229 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15461 IN_param_value = function_call_param_iterator.next(); |
13230 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15462 if (IN_param_value != NULL) { |
13231 |
15463 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13232 if(search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
15464 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15465 } |
|
15466 |
|
15467 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::ulint_type_name, last_type_symbol)) |
13233 { |
15468 { |
13234 |
15469 |
13235 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
15470 function_name = (symbol_c*)(new pragma_c("__uint_to_bcd")); |
|
15471 |
|
15472 if (IN_type_symbol == NULL) |
|
15473 IN_type_symbol = last_type_symbol; |
13236 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15474 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13237 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
15475 symbol_c * return_type_symbol = &search_constant_type_c::constant_int_type_name; |
13238 function_type_prefix = return_type_symbol; |
15476 function_type_prefix = return_type_symbol; |
13239 break; |
15477 break; |
13240 |
15478 |
13256 |
15494 |
13257 { |
15495 { |
13258 identifier_c param_name("IN"); |
15496 identifier_c param_name("IN"); |
13259 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15497 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13260 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15498 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13261 |
15499 symbol_c *IN_type_symbol = NULL; |
13262 /* Get the value from a foo(<param_value>) style call */ |
15500 |
13263 if (IN_param_value == NULL) |
15501 /* Get the value from a foo(<param_value>) style call */ |
13264 IN_param_value = function_call_param_iterator.next(); |
15502 if (IN_param_value == NULL) |
13265 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15503 IN_param_value = function_call_param_iterator.next(); |
13266 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15504 if (IN_param_value != NULL) { |
13267 |
15505 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13268 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
15506 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15507 } |
|
15508 |
|
15509 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
13269 { |
15510 { |
13270 |
15511 |
13271 function_name = (symbol_c*)(new pragma_c("__date_and_time_to_time_of_day")); |
15512 function_name = (symbol_c*)(new pragma_c("__date_and_time_to_time_of_day")); |
|
15513 |
|
15514 if (IN_type_symbol == NULL) |
|
15515 IN_type_symbol = last_type_symbol; |
13272 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15516 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13273 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
15517 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
13274 break; |
15518 break; |
13275 |
15519 |
13276 } |
15520 } |
13291 |
15535 |
13292 { |
15536 { |
13293 identifier_c param_name("IN"); |
15537 identifier_c param_name("IN"); |
13294 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15538 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13295 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15539 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13296 |
15540 symbol_c *IN_type_symbol = NULL; |
13297 /* Get the value from a foo(<param_value>) style call */ |
15541 |
13298 if (IN_param_value == NULL) |
15542 /* Get the value from a foo(<param_value>) style call */ |
13299 IN_param_value = function_call_param_iterator.next(); |
15543 if (IN_param_value == NULL) |
13300 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15544 IN_param_value = function_call_param_iterator.next(); |
13301 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15545 if (IN_param_value != NULL) { |
13302 |
15546 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13303 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
15547 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15548 } |
|
15549 |
|
15550 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
13304 { |
15551 { |
13305 |
15552 |
13306 function_name = (symbol_c*)(new pragma_c("__date_and_time_to_date")); |
15553 function_name = (symbol_c*)(new pragma_c("__date_and_time_to_date")); |
|
15554 |
|
15555 if (IN_type_symbol == NULL) |
|
15556 IN_type_symbol = last_type_symbol; |
13307 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15557 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13308 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
15558 symbol_c * return_type_symbol = &search_constant_type_c::date_type_name; |
13309 break; |
15559 break; |
13310 |
15560 |
13311 } |
15561 } |
13326 |
15576 |
13327 { |
15577 { |
13328 identifier_c param_name("IN"); |
15578 identifier_c param_name("IN"); |
13329 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15579 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13330 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15580 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13331 |
15581 symbol_c *IN_type_symbol = NULL; |
13332 /* Get the value from a foo(<param_value>) style call */ |
15582 |
13333 if (IN_param_value == NULL) |
15583 /* Get the value from a foo(<param_value>) style call */ |
13334 IN_param_value = function_call_param_iterator.next(); |
15584 if (IN_param_value == NULL) |
13335 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15585 IN_param_value = function_call_param_iterator.next(); |
13336 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15586 if (IN_param_value != NULL) { |
13337 |
15587 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13338 if(search_expression_type->is_num_type(IN_type_symbol)) |
15588 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15589 } |
|
15590 |
|
15591 if(IN_type_symbol == NULL || search_expression_type->is_num_type(IN_type_symbol)) |
13339 { |
15592 { |
13340 |
15593 |
13341 function_name = (symbol_c*)(new pragma_c("__abs_")); |
15594 function_name = (symbol_c*)(new pragma_c("__abs_")); |
|
15595 |
|
15596 if (IN_type_symbol == NULL) |
|
15597 IN_type_symbol = last_type_symbol; |
13342 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15598 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13343 symbol_c * return_type_symbol = IN_type_symbol; |
15599 symbol_c * return_type_symbol = IN_type_symbol; |
13344 function_type_suffix = IN_type_symbol; |
15600 function_type_suffix = IN_type_symbol; |
13345 break; |
15601 break; |
13346 |
15602 |
13362 |
15618 |
13363 { |
15619 { |
13364 identifier_c param_name("IN"); |
15620 identifier_c param_name("IN"); |
13365 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15621 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13366 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15622 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13367 |
15623 symbol_c *IN_type_symbol = NULL; |
13368 /* Get the value from a foo(<param_value>) style call */ |
15624 |
13369 if (IN_param_value == NULL) |
15625 /* Get the value from a foo(<param_value>) style call */ |
13370 IN_param_value = function_call_param_iterator.next(); |
15626 if (IN_param_value == NULL) |
13371 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15627 IN_param_value = function_call_param_iterator.next(); |
13372 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15628 if (IN_param_value != NULL) { |
13373 |
15629 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13374 if(search_expression_type->is_real_type(IN_type_symbol)) |
15630 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15631 } |
|
15632 |
|
15633 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13375 { |
15634 { |
13376 |
15635 |
13377 function_name = (symbol_c*)(new pragma_c("__sqrt_")); |
15636 function_name = (symbol_c*)(new pragma_c("__sqrt_")); |
|
15637 |
|
15638 if (IN_type_symbol == NULL) |
|
15639 IN_type_symbol = last_type_symbol; |
13378 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15640 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13379 symbol_c * return_type_symbol = IN_type_symbol; |
15641 symbol_c * return_type_symbol = IN_type_symbol; |
13380 function_type_suffix = IN_type_symbol; |
15642 function_type_suffix = IN_type_symbol; |
13381 break; |
15643 break; |
13382 |
15644 |
13398 |
15660 |
13399 { |
15661 { |
13400 identifier_c param_name("IN"); |
15662 identifier_c param_name("IN"); |
13401 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15663 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13402 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15664 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13403 |
15665 symbol_c *IN_type_symbol = NULL; |
13404 /* Get the value from a foo(<param_value>) style call */ |
15666 |
13405 if (IN_param_value == NULL) |
15667 /* Get the value from a foo(<param_value>) style call */ |
13406 IN_param_value = function_call_param_iterator.next(); |
15668 if (IN_param_value == NULL) |
13407 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15669 IN_param_value = function_call_param_iterator.next(); |
13408 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15670 if (IN_param_value != NULL) { |
13409 |
15671 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13410 if(search_expression_type->is_real_type(IN_type_symbol)) |
15672 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15673 } |
|
15674 |
|
15675 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13411 { |
15676 { |
13412 |
15677 |
13413 function_name = (symbol_c*)(new pragma_c("__ln_")); |
15678 function_name = (symbol_c*)(new pragma_c("__ln_")); |
|
15679 |
|
15680 if (IN_type_symbol == NULL) |
|
15681 IN_type_symbol = last_type_symbol; |
13414 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15682 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13415 symbol_c * return_type_symbol = IN_type_symbol; |
15683 symbol_c * return_type_symbol = IN_type_symbol; |
13416 function_type_suffix = IN_type_symbol; |
15684 function_type_suffix = IN_type_symbol; |
13417 break; |
15685 break; |
13418 |
15686 |
13434 |
15702 |
13435 { |
15703 { |
13436 identifier_c param_name("IN"); |
15704 identifier_c param_name("IN"); |
13437 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15705 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13438 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15706 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13439 |
15707 symbol_c *IN_type_symbol = NULL; |
13440 /* Get the value from a foo(<param_value>) style call */ |
15708 |
13441 if (IN_param_value == NULL) |
15709 /* Get the value from a foo(<param_value>) style call */ |
13442 IN_param_value = function_call_param_iterator.next(); |
15710 if (IN_param_value == NULL) |
13443 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15711 IN_param_value = function_call_param_iterator.next(); |
13444 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15712 if (IN_param_value != NULL) { |
13445 |
15713 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13446 if(search_expression_type->is_real_type(IN_type_symbol)) |
15714 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15715 } |
|
15716 |
|
15717 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13447 { |
15718 { |
13448 |
15719 |
13449 function_name = (symbol_c*)(new pragma_c("__log_")); |
15720 function_name = (symbol_c*)(new pragma_c("__log_")); |
|
15721 |
|
15722 if (IN_type_symbol == NULL) |
|
15723 IN_type_symbol = last_type_symbol; |
13450 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15724 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13451 symbol_c * return_type_symbol = IN_type_symbol; |
15725 symbol_c * return_type_symbol = IN_type_symbol; |
13452 function_type_suffix = IN_type_symbol; |
15726 function_type_suffix = IN_type_symbol; |
13453 break; |
15727 break; |
13454 |
15728 |
13470 |
15744 |
13471 { |
15745 { |
13472 identifier_c param_name("IN"); |
15746 identifier_c param_name("IN"); |
13473 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15747 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13474 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15748 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13475 |
15749 symbol_c *IN_type_symbol = NULL; |
13476 /* Get the value from a foo(<param_value>) style call */ |
15750 |
13477 if (IN_param_value == NULL) |
15751 /* Get the value from a foo(<param_value>) style call */ |
13478 IN_param_value = function_call_param_iterator.next(); |
15752 if (IN_param_value == NULL) |
13479 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15753 IN_param_value = function_call_param_iterator.next(); |
13480 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15754 if (IN_param_value != NULL) { |
13481 |
15755 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13482 if(search_expression_type->is_real_type(IN_type_symbol)) |
15756 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15757 } |
|
15758 |
|
15759 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13483 { |
15760 { |
13484 |
15761 |
13485 function_name = (symbol_c*)(new pragma_c("__exp_")); |
15762 function_name = (symbol_c*)(new pragma_c("__exp_")); |
|
15763 |
|
15764 if (IN_type_symbol == NULL) |
|
15765 IN_type_symbol = last_type_symbol; |
13486 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15766 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13487 symbol_c * return_type_symbol = IN_type_symbol; |
15767 symbol_c * return_type_symbol = IN_type_symbol; |
13488 function_type_suffix = IN_type_symbol; |
15768 function_type_suffix = IN_type_symbol; |
13489 break; |
15769 break; |
13490 |
15770 |
13506 |
15786 |
13507 { |
15787 { |
13508 identifier_c param_name("IN"); |
15788 identifier_c param_name("IN"); |
13509 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15789 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13510 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15790 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13511 |
15791 symbol_c *IN_type_symbol = NULL; |
13512 /* Get the value from a foo(<param_value>) style call */ |
15792 |
13513 if (IN_param_value == NULL) |
15793 /* Get the value from a foo(<param_value>) style call */ |
13514 IN_param_value = function_call_param_iterator.next(); |
15794 if (IN_param_value == NULL) |
13515 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15795 IN_param_value = function_call_param_iterator.next(); |
13516 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15796 if (IN_param_value != NULL) { |
13517 |
15797 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13518 if(search_expression_type->is_real_type(IN_type_symbol)) |
15798 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15799 } |
|
15800 |
|
15801 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13519 { |
15802 { |
13520 |
15803 |
13521 function_name = (symbol_c*)(new pragma_c("__sin_")); |
15804 function_name = (symbol_c*)(new pragma_c("__sin_")); |
|
15805 |
|
15806 if (IN_type_symbol == NULL) |
|
15807 IN_type_symbol = last_type_symbol; |
13522 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15808 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13523 symbol_c * return_type_symbol = IN_type_symbol; |
15809 symbol_c * return_type_symbol = IN_type_symbol; |
13524 function_type_suffix = IN_type_symbol; |
15810 function_type_suffix = IN_type_symbol; |
13525 break; |
15811 break; |
13526 |
15812 |
13542 |
15828 |
13543 { |
15829 { |
13544 identifier_c param_name("IN"); |
15830 identifier_c param_name("IN"); |
13545 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15831 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13546 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15832 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13547 |
15833 symbol_c *IN_type_symbol = NULL; |
13548 /* Get the value from a foo(<param_value>) style call */ |
15834 |
13549 if (IN_param_value == NULL) |
15835 /* Get the value from a foo(<param_value>) style call */ |
13550 IN_param_value = function_call_param_iterator.next(); |
15836 if (IN_param_value == NULL) |
13551 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15837 IN_param_value = function_call_param_iterator.next(); |
13552 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15838 if (IN_param_value != NULL) { |
13553 |
15839 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13554 if(search_expression_type->is_real_type(IN_type_symbol)) |
15840 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15841 } |
|
15842 |
|
15843 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13555 { |
15844 { |
13556 |
15845 |
13557 function_name = (symbol_c*)(new pragma_c("__cos_")); |
15846 function_name = (symbol_c*)(new pragma_c("__cos_")); |
|
15847 |
|
15848 if (IN_type_symbol == NULL) |
|
15849 IN_type_symbol = last_type_symbol; |
13558 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15850 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13559 symbol_c * return_type_symbol = IN_type_symbol; |
15851 symbol_c * return_type_symbol = IN_type_symbol; |
13560 function_type_suffix = IN_type_symbol; |
15852 function_type_suffix = IN_type_symbol; |
13561 break; |
15853 break; |
13562 |
15854 |
13578 |
15870 |
13579 { |
15871 { |
13580 identifier_c param_name("IN"); |
15872 identifier_c param_name("IN"); |
13581 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15873 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13582 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15874 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13583 |
15875 symbol_c *IN_type_symbol = NULL; |
13584 /* Get the value from a foo(<param_value>) style call */ |
15876 |
13585 if (IN_param_value == NULL) |
15877 /* Get the value from a foo(<param_value>) style call */ |
13586 IN_param_value = function_call_param_iterator.next(); |
15878 if (IN_param_value == NULL) |
13587 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15879 IN_param_value = function_call_param_iterator.next(); |
13588 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15880 if (IN_param_value != NULL) { |
13589 |
15881 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13590 if(search_expression_type->is_real_type(IN_type_symbol)) |
15882 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15883 } |
|
15884 |
|
15885 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13591 { |
15886 { |
13592 |
15887 |
13593 function_name = (symbol_c*)(new pragma_c("__tan_")); |
15888 function_name = (symbol_c*)(new pragma_c("__tan_")); |
|
15889 |
|
15890 if (IN_type_symbol == NULL) |
|
15891 IN_type_symbol = last_type_symbol; |
13594 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15892 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13595 symbol_c * return_type_symbol = IN_type_symbol; |
15893 symbol_c * return_type_symbol = IN_type_symbol; |
13596 function_type_suffix = IN_type_symbol; |
15894 function_type_suffix = IN_type_symbol; |
13597 break; |
15895 break; |
13598 |
15896 |
13614 |
15912 |
13615 { |
15913 { |
13616 identifier_c param_name("IN"); |
15914 identifier_c param_name("IN"); |
13617 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15915 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13618 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15916 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13619 |
15917 symbol_c *IN_type_symbol = NULL; |
13620 /* Get the value from a foo(<param_value>) style call */ |
15918 |
13621 if (IN_param_value == NULL) |
15919 /* Get the value from a foo(<param_value>) style call */ |
13622 IN_param_value = function_call_param_iterator.next(); |
15920 if (IN_param_value == NULL) |
13623 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15921 IN_param_value = function_call_param_iterator.next(); |
13624 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15922 if (IN_param_value != NULL) { |
13625 |
15923 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13626 if(search_expression_type->is_real_type(IN_type_symbol)) |
15924 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15925 } |
|
15926 |
|
15927 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13627 { |
15928 { |
13628 |
15929 |
13629 function_name = (symbol_c*)(new pragma_c("__asin_")); |
15930 function_name = (symbol_c*)(new pragma_c("__asin_")); |
|
15931 |
|
15932 if (IN_type_symbol == NULL) |
|
15933 IN_type_symbol = last_type_symbol; |
13630 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15934 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13631 symbol_c * return_type_symbol = IN_type_symbol; |
15935 symbol_c * return_type_symbol = IN_type_symbol; |
13632 function_type_suffix = IN_type_symbol; |
15936 function_type_suffix = IN_type_symbol; |
13633 break; |
15937 break; |
13634 |
15938 |
13650 |
15954 |
13651 { |
15955 { |
13652 identifier_c param_name("IN"); |
15956 identifier_c param_name("IN"); |
13653 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15957 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13654 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15958 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13655 |
15959 symbol_c *IN_type_symbol = NULL; |
13656 /* Get the value from a foo(<param_value>) style call */ |
15960 |
13657 if (IN_param_value == NULL) |
15961 /* Get the value from a foo(<param_value>) style call */ |
13658 IN_param_value = function_call_param_iterator.next(); |
15962 if (IN_param_value == NULL) |
13659 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15963 IN_param_value = function_call_param_iterator.next(); |
13660 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
15964 if (IN_param_value != NULL) { |
13661 |
15965 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13662 if(search_expression_type->is_real_type(IN_type_symbol)) |
15966 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
15967 } |
|
15968 |
|
15969 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13663 { |
15970 { |
13664 |
15971 |
13665 function_name = (symbol_c*)(new pragma_c("__acos_")); |
15972 function_name = (symbol_c*)(new pragma_c("__acos_")); |
|
15973 |
|
15974 if (IN_type_symbol == NULL) |
|
15975 IN_type_symbol = last_type_symbol; |
13666 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15976 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13667 symbol_c * return_type_symbol = IN_type_symbol; |
15977 symbol_c * return_type_symbol = IN_type_symbol; |
13668 function_type_suffix = IN_type_symbol; |
15978 function_type_suffix = IN_type_symbol; |
13669 break; |
15979 break; |
13670 |
15980 |
13686 |
15996 |
13687 { |
15997 { |
13688 identifier_c param_name("IN"); |
15998 identifier_c param_name("IN"); |
13689 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15999 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13690 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
16000 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
13691 |
16001 symbol_c *IN_type_symbol = NULL; |
13692 /* Get the value from a foo(<param_value>) style call */ |
16002 |
13693 if (IN_param_value == NULL) |
16003 /* Get the value from a foo(<param_value>) style call */ |
13694 IN_param_value = function_call_param_iterator.next(); |
16004 if (IN_param_value == NULL) |
13695 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
16005 IN_param_value = function_call_param_iterator.next(); |
13696 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
16006 if (IN_param_value != NULL) { |
13697 |
16007 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
13698 if(search_expression_type->is_real_type(IN_type_symbol)) |
16008 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
16009 } |
|
16010 |
|
16011 if(IN_type_symbol == NULL || search_expression_type->is_real_type(IN_type_symbol)) |
13699 { |
16012 { |
13700 |
16013 |
13701 function_name = (symbol_c*)(new pragma_c("__atan_")); |
16014 function_name = (symbol_c*)(new pragma_c("__atan_")); |
|
16015 |
|
16016 if (IN_type_symbol == NULL) |
|
16017 IN_type_symbol = last_type_symbol; |
13702 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
16018 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
13703 symbol_c * return_type_symbol = IN_type_symbol; |
16019 symbol_c * return_type_symbol = IN_type_symbol; |
13704 function_type_suffix = IN_type_symbol; |
16020 function_type_suffix = IN_type_symbol; |
13705 break; |
16021 break; |
13706 |
16022 |
13722 |
16038 |
13723 { |
16039 { |
13724 identifier_c param_name("IN1"); |
16040 identifier_c param_name("IN1"); |
13725 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16041 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13726 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
16042 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
16043 symbol_c *IN1_type_symbol = NULL; |
13727 |
16044 |
13728 /* Get the value from a foo(<param_value>) style call */ |
16045 /* Get the value from a foo(<param_value>) style call */ |
13729 if (IN1_param_value == NULL) |
16046 if (IN1_param_value == NULL) |
13730 IN1_param_value = function_call_param_iterator.next(); |
16047 IN1_param_value = function_call_param_iterator.next(); |
13731 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
16048 if (IN1_param_value != NULL) { |
13732 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
16049 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
13733 |
16050 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
13734 if(search_expression_type->is_num_type(IN1_type_symbol)) |
16051 } |
|
16052 |
|
16053 if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) |
13735 { |
16054 { |
13736 |
16055 |
13737 { |
16056 { |
13738 identifier_c param_name("IN2"); |
16057 identifier_c param_name("IN2"); |
13739 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16058 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13740 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16059 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16060 symbol_c *IN2_type_symbol = NULL; |
13741 |
16061 |
13742 /* Get the value from a foo(<param_value>) style call */ |
16062 /* Get the value from a foo(<param_value>) style call */ |
13743 if (IN2_param_value == NULL) |
16063 if (IN2_param_value == NULL) |
13744 IN2_param_value = function_call_param_iterator.next(); |
16064 IN2_param_value = function_call_param_iterator.next(); |
13745 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16065 if (IN2_param_value != NULL) { |
13746 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16066 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16067 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16068 } |
13747 |
16069 |
13748 if(search_expression_type->is_num_type(IN2_type_symbol)) |
16070 if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) |
13749 { |
16071 { |
13750 |
16072 |
13751 function_name = (symbol_c*)(new pragma_c("__add_")); |
16073 function_name = (symbol_c*)(new pragma_c("__add_")); |
13752 |
16074 |
|
16075 if (nb_param < 2) |
|
16076 nb_param = 2; |
13753 char* nb_param_str = new char[10]; |
16077 char* nb_param_str = new char[10]; |
13754 sprintf(nb_param_str, "%d", nb_param); |
16078 sprintf(nb_param_str, "%d", nb_param); |
13755 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
16079 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
16080 |
|
16081 if (IN1_type_symbol == NULL) |
|
16082 IN1_type_symbol = last_type_symbol; |
13756 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16083 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16084 |
|
16085 if (IN2_type_symbol == NULL) |
|
16086 IN2_type_symbol = last_type_symbol; |
13757 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16087 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
13758 |
16088 |
13759 int base_num = 3; |
16089 int base_num = 3; |
13760 symbol_c *param_value = NULL; |
16090 symbol_c *param_value = NULL; |
13761 do{ |
16091 do{ |
13788 ERROR; |
16118 ERROR; |
13789 } |
16119 } |
13790 |
16120 |
13791 } |
16121 } |
13792 |
16122 |
13793 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
16123 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
13794 { |
16124 { |
13795 |
16125 |
13796 { |
16126 { |
13797 identifier_c param_name("IN2"); |
16127 identifier_c param_name("IN2"); |
13798 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16128 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13799 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16129 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16130 symbol_c *IN2_type_symbol = NULL; |
13800 |
16131 |
13801 /* Get the value from a foo(<param_value>) style call */ |
16132 /* Get the value from a foo(<param_value>) style call */ |
13802 if (IN2_param_value == NULL) |
16133 if (IN2_param_value == NULL) |
13803 IN2_param_value = function_call_param_iterator.next(); |
16134 IN2_param_value = function_call_param_iterator.next(); |
13804 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16135 if (IN2_param_value != NULL) { |
13805 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16136 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16137 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16138 } |
13806 |
16139 |
13807 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
16140 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13808 { |
16141 { |
13809 |
16142 |
13810 function_name = (symbol_c*)(new pragma_c("__time_add")); |
16143 function_name = (symbol_c*)(new pragma_c("__time_add")); |
|
16144 |
|
16145 if (IN1_type_symbol == NULL) |
|
16146 IN1_type_symbol = last_type_symbol; |
13811 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16147 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16148 |
|
16149 if (IN2_type_symbol == NULL) |
|
16150 IN2_type_symbol = last_type_symbol; |
13812 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16151 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
13813 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
16152 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
13814 break; |
16153 break; |
13815 |
16154 |
13816 } |
16155 } |
13819 ERROR; |
16158 ERROR; |
13820 } |
16159 } |
13821 |
16160 |
13822 } |
16161 } |
13823 |
16162 |
13824 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
16163 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
13825 { |
16164 { |
13826 |
16165 |
13827 { |
16166 { |
13828 identifier_c param_name("IN2"); |
16167 identifier_c param_name("IN2"); |
13829 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16168 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13830 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16169 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16170 symbol_c *IN2_type_symbol = NULL; |
13831 |
16171 |
13832 /* Get the value from a foo(<param_value>) style call */ |
16172 /* Get the value from a foo(<param_value>) style call */ |
13833 if (IN2_param_value == NULL) |
16173 if (IN2_param_value == NULL) |
13834 IN2_param_value = function_call_param_iterator.next(); |
16174 IN2_param_value = function_call_param_iterator.next(); |
13835 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16175 if (IN2_param_value != NULL) { |
13836 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16176 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16177 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16178 } |
13837 |
16179 |
13838 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
16180 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13839 { |
16181 { |
13840 |
16182 |
13841 function_name = (symbol_c*)(new pragma_c("__time_add")); |
16183 function_name = (symbol_c*)(new pragma_c("__time_add")); |
|
16184 |
|
16185 if (IN1_type_symbol == NULL) |
|
16186 IN1_type_symbol = last_type_symbol; |
13842 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16187 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16188 |
|
16189 if (IN2_type_symbol == NULL) |
|
16190 IN2_type_symbol = last_type_symbol; |
13843 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16191 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
13844 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
16192 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
13845 break; |
16193 break; |
13846 |
16194 |
13847 } |
16195 } |
13850 ERROR; |
16198 ERROR; |
13851 } |
16199 } |
13852 |
16200 |
13853 } |
16201 } |
13854 |
16202 |
13855 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
16203 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13856 { |
16204 { |
13857 |
16205 |
13858 { |
16206 { |
13859 identifier_c param_name("IN2"); |
16207 identifier_c param_name("IN2"); |
13860 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16208 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13861 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16209 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16210 symbol_c *IN2_type_symbol = NULL; |
13862 |
16211 |
13863 /* Get the value from a foo(<param_value>) style call */ |
16212 /* Get the value from a foo(<param_value>) style call */ |
13864 if (IN2_param_value == NULL) |
16213 if (IN2_param_value == NULL) |
13865 IN2_param_value = function_call_param_iterator.next(); |
16214 IN2_param_value = function_call_param_iterator.next(); |
13866 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16215 if (IN2_param_value != NULL) { |
13867 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16216 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16217 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16218 } |
13868 |
16219 |
13869 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
16220 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13870 { |
16221 { |
13871 |
16222 |
13872 function_name = (symbol_c*)(new pragma_c("__time_add")); |
16223 function_name = (symbol_c*)(new pragma_c("__time_add")); |
|
16224 |
|
16225 if (IN1_type_symbol == NULL) |
|
16226 IN1_type_symbol = last_type_symbol; |
13873 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16227 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16228 |
|
16229 if (IN2_type_symbol == NULL) |
|
16230 IN2_type_symbol = last_type_symbol; |
13874 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16231 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
13875 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
16232 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
13876 break; |
16233 break; |
13877 |
16234 |
13878 } |
16235 } |
13899 |
16256 |
13900 { |
16257 { |
13901 identifier_c param_name("IN1"); |
16258 identifier_c param_name("IN1"); |
13902 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16259 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13903 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
16260 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
16261 symbol_c *IN1_type_symbol = NULL; |
13904 |
16262 |
13905 /* Get the value from a foo(<param_value>) style call */ |
16263 /* Get the value from a foo(<param_value>) style call */ |
13906 if (IN1_param_value == NULL) |
16264 if (IN1_param_value == NULL) |
13907 IN1_param_value = function_call_param_iterator.next(); |
16265 IN1_param_value = function_call_param_iterator.next(); |
13908 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
16266 if (IN1_param_value != NULL) { |
13909 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
16267 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
13910 |
16268 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
13911 if(search_expression_type->is_num_type(IN1_type_symbol)) |
16269 } |
|
16270 |
|
16271 if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) |
13912 { |
16272 { |
13913 |
16273 |
13914 { |
16274 { |
13915 identifier_c param_name("IN2"); |
16275 identifier_c param_name("IN2"); |
13916 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16276 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13917 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16277 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16278 symbol_c *IN2_type_symbol = NULL; |
13918 |
16279 |
13919 /* Get the value from a foo(<param_value>) style call */ |
16280 /* Get the value from a foo(<param_value>) style call */ |
13920 if (IN2_param_value == NULL) |
16281 if (IN2_param_value == NULL) |
13921 IN2_param_value = function_call_param_iterator.next(); |
16282 IN2_param_value = function_call_param_iterator.next(); |
13922 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16283 if (IN2_param_value != NULL) { |
13923 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16284 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16285 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16286 } |
13924 |
16287 |
13925 if(search_expression_type->is_num_type(IN2_type_symbol)) |
16288 if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) |
13926 { |
16289 { |
13927 |
16290 |
13928 function_name = (symbol_c*)(new pragma_c("__mul_")); |
16291 function_name = (symbol_c*)(new pragma_c("__mul_")); |
13929 |
16292 |
|
16293 if (nb_param < 2) |
|
16294 nb_param = 2; |
13930 char* nb_param_str = new char[10]; |
16295 char* nb_param_str = new char[10]; |
13931 sprintf(nb_param_str, "%d", nb_param); |
16296 sprintf(nb_param_str, "%d", nb_param); |
13932 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
16297 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
16298 |
|
16299 if (IN1_type_symbol == NULL) |
|
16300 IN1_type_symbol = last_type_symbol; |
13933 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16301 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16302 |
|
16303 if (IN2_type_symbol == NULL) |
|
16304 IN2_type_symbol = last_type_symbol; |
13934 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16305 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
13935 |
16306 |
13936 int base_num = 3; |
16307 int base_num = 3; |
13937 symbol_c *param_value = NULL; |
16308 symbol_c *param_value = NULL; |
13938 do{ |
16309 do{ |
13965 ERROR; |
16336 ERROR; |
13966 } |
16337 } |
13967 |
16338 |
13968 } |
16339 } |
13969 |
16340 |
13970 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
16341 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
13971 { |
16342 { |
13972 |
16343 |
13973 { |
16344 { |
13974 identifier_c param_name("IN2"); |
16345 identifier_c param_name("IN2"); |
13975 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16346 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
13976 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16347 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16348 symbol_c *IN2_type_symbol = NULL; |
13977 |
16349 |
13978 /* Get the value from a foo(<param_value>) style call */ |
16350 /* Get the value from a foo(<param_value>) style call */ |
13979 if (IN2_param_value == NULL) |
16351 if (IN2_param_value == NULL) |
13980 IN2_param_value = function_call_param_iterator.next(); |
16352 IN2_param_value = function_call_param_iterator.next(); |
13981 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16353 if (IN2_param_value != NULL) { |
13982 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16354 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16355 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16356 } |
13983 |
16357 |
13984 if(search_expression_type->is_num_type(IN2_type_symbol)) |
16358 if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) |
13985 { |
16359 { |
13986 |
16360 |
13987 function_name = (symbol_c*)(new pragma_c("__time_mul")); |
16361 function_name = (symbol_c*)(new pragma_c("__time_mul")); |
|
16362 |
|
16363 if (IN1_type_symbol == NULL) |
|
16364 IN1_type_symbol = last_type_symbol; |
13988 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16365 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16366 |
|
16367 if (IN2_type_symbol == NULL) |
|
16368 IN2_type_symbol = last_type_symbol; |
13989 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16369 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
13990 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
16370 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
13991 break; |
16371 break; |
13992 |
16372 |
13993 } |
16373 } |
14014 |
16394 |
14015 { |
16395 { |
14016 identifier_c param_name("IN1"); |
16396 identifier_c param_name("IN1"); |
14017 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16397 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14018 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
16398 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
16399 symbol_c *IN1_type_symbol = NULL; |
14019 |
16400 |
14020 /* Get the value from a foo(<param_value>) style call */ |
16401 /* Get the value from a foo(<param_value>) style call */ |
14021 if (IN1_param_value == NULL) |
16402 if (IN1_param_value == NULL) |
14022 IN1_param_value = function_call_param_iterator.next(); |
16403 IN1_param_value = function_call_param_iterator.next(); |
14023 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
16404 if (IN1_param_value != NULL) { |
14024 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
16405 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
14025 |
16406 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
14026 if(search_expression_type->is_num_type(IN1_type_symbol)) |
16407 } |
|
16408 |
|
16409 if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) |
14027 { |
16410 { |
14028 |
16411 |
14029 { |
16412 { |
14030 identifier_c param_name("IN2"); |
16413 identifier_c param_name("IN2"); |
14031 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16414 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14032 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16415 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16416 symbol_c *IN2_type_symbol = NULL; |
14033 |
16417 |
14034 /* Get the value from a foo(<param_value>) style call */ |
16418 /* Get the value from a foo(<param_value>) style call */ |
14035 if (IN2_param_value == NULL) |
16419 if (IN2_param_value == NULL) |
14036 IN2_param_value = function_call_param_iterator.next(); |
16420 IN2_param_value = function_call_param_iterator.next(); |
14037 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16421 if (IN2_param_value != NULL) { |
14038 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16422 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16423 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16424 } |
14039 |
16425 |
14040 if(search_expression_type->is_num_type(IN2_type_symbol)) |
16426 if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) |
14041 { |
16427 { |
14042 |
16428 |
14043 function_name = (symbol_c*)(new pragma_c("__sub_")); |
16429 function_name = (symbol_c*)(new pragma_c("__sub_")); |
|
16430 |
|
16431 if (IN1_type_symbol == NULL) |
|
16432 IN1_type_symbol = last_type_symbol; |
14044 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16433 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16434 |
|
16435 if (IN2_type_symbol == NULL) |
|
16436 IN2_type_symbol = last_type_symbol; |
14045 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16437 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14046 symbol_c * return_type_symbol = last_type_symbol; |
16438 symbol_c * return_type_symbol = last_type_symbol; |
14047 function_type_suffix = return_type_symbol; |
16439 function_type_suffix = return_type_symbol; |
14048 break; |
16440 break; |
14049 |
16441 |
14053 ERROR; |
16445 ERROR; |
14054 } |
16446 } |
14055 |
16447 |
14056 } |
16448 } |
14057 |
16449 |
14058 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
16450 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
14059 { |
16451 { |
14060 |
16452 |
14061 { |
16453 { |
14062 identifier_c param_name("IN2"); |
16454 identifier_c param_name("IN2"); |
14063 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16455 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14064 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16456 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16457 symbol_c *IN2_type_symbol = NULL; |
14065 |
16458 |
14066 /* Get the value from a foo(<param_value>) style call */ |
16459 /* Get the value from a foo(<param_value>) style call */ |
14067 if (IN2_param_value == NULL) |
16460 if (IN2_param_value == NULL) |
14068 IN2_param_value = function_call_param_iterator.next(); |
16461 IN2_param_value = function_call_param_iterator.next(); |
14069 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16462 if (IN2_param_value != NULL) { |
14070 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16463 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16464 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16465 } |
14071 |
16466 |
14072 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
16467 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
14073 { |
16468 { |
14074 |
16469 |
14075 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
16470 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
|
16471 |
|
16472 if (IN1_type_symbol == NULL) |
|
16473 IN1_type_symbol = last_type_symbol; |
14076 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16474 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16475 |
|
16476 if (IN2_type_symbol == NULL) |
|
16477 IN2_type_symbol = last_type_symbol; |
14077 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16478 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14078 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
16479 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
14079 break; |
16480 break; |
14080 |
16481 |
14081 } |
16482 } |
14084 ERROR; |
16485 ERROR; |
14085 } |
16486 } |
14086 |
16487 |
14087 } |
16488 } |
14088 |
16489 |
14089 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
16490 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
14090 { |
16491 { |
14091 |
16492 |
14092 { |
16493 { |
14093 identifier_c param_name("IN2"); |
16494 identifier_c param_name("IN2"); |
14094 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16495 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14095 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16496 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16497 symbol_c *IN2_type_symbol = NULL; |
14096 |
16498 |
14097 /* Get the value from a foo(<param_value>) style call */ |
16499 /* Get the value from a foo(<param_value>) style call */ |
14098 if (IN2_param_value == NULL) |
16500 if (IN2_param_value == NULL) |
14099 IN2_param_value = function_call_param_iterator.next(); |
16501 IN2_param_value = function_call_param_iterator.next(); |
14100 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16502 if (IN2_param_value != NULL) { |
14101 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16503 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16504 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16505 } |
14102 |
16506 |
14103 if(search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
16507 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::dt_type_name, last_type_symbol)) |
14104 { |
16508 { |
14105 |
16509 |
14106 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
16510 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
|
16511 |
|
16512 if (IN1_type_symbol == NULL) |
|
16513 IN1_type_symbol = last_type_symbol; |
14107 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16514 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16515 |
|
16516 if (IN2_type_symbol == NULL) |
|
16517 IN2_type_symbol = last_type_symbol; |
14108 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16518 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14109 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
16519 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
14110 break; |
16520 break; |
14111 |
16521 |
14112 } |
16522 } |
14113 |
16523 |
14114 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
16524 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14115 { |
16525 { |
14116 |
16526 |
14117 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
16527 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
|
16528 |
|
16529 if (IN1_type_symbol == NULL) |
|
16530 IN1_type_symbol = last_type_symbol; |
14118 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16531 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16532 |
|
16533 if (IN2_type_symbol == NULL) |
|
16534 IN2_type_symbol = last_type_symbol; |
14119 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16535 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14120 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
16536 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
14121 break; |
16537 break; |
14122 |
16538 |
14123 } |
16539 } |
14126 ERROR; |
16542 ERROR; |
14127 } |
16543 } |
14128 |
16544 |
14129 } |
16545 } |
14130 |
16546 |
14131 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
16547 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
14132 { |
16548 { |
14133 |
16549 |
14134 { |
16550 { |
14135 identifier_c param_name("IN2"); |
16551 identifier_c param_name("IN2"); |
14136 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16552 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14137 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16553 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16554 symbol_c *IN2_type_symbol = NULL; |
14138 |
16555 |
14139 /* Get the value from a foo(<param_value>) style call */ |
16556 /* Get the value from a foo(<param_value>) style call */ |
14140 if (IN2_param_value == NULL) |
16557 if (IN2_param_value == NULL) |
14141 IN2_param_value = function_call_param_iterator.next(); |
16558 IN2_param_value = function_call_param_iterator.next(); |
14142 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16559 if (IN2_param_value != NULL) { |
14143 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16560 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16561 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16562 } |
14144 |
16563 |
14145 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
16564 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
14146 { |
16565 { |
14147 |
16566 |
14148 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
16567 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
|
16568 |
|
16569 if (IN1_type_symbol == NULL) |
|
16570 IN1_type_symbol = last_type_symbol; |
14149 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16571 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16572 |
|
16573 if (IN2_type_symbol == NULL) |
|
16574 IN2_type_symbol = last_type_symbol; |
14150 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16575 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14151 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
16576 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
14152 break; |
16577 break; |
14153 |
16578 |
14154 } |
16579 } |
14155 |
16580 |
14156 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
16581 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14157 { |
16582 { |
14158 |
16583 |
14159 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
16584 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
|
16585 |
|
16586 if (IN1_type_symbol == NULL) |
|
16587 IN1_type_symbol = last_type_symbol; |
14160 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16588 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16589 |
|
16590 if (IN2_type_symbol == NULL) |
|
16591 IN2_type_symbol = last_type_symbol; |
14161 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16592 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14162 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
16593 symbol_c * return_type_symbol = &search_constant_type_c::tod_type_name; |
14163 break; |
16594 break; |
14164 |
16595 |
14165 } |
16596 } |
14168 ERROR; |
16599 ERROR; |
14169 } |
16600 } |
14170 |
16601 |
14171 } |
16602 } |
14172 |
16603 |
14173 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
16604 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14174 { |
16605 { |
14175 |
16606 |
14176 { |
16607 { |
14177 identifier_c param_name("IN2"); |
16608 identifier_c param_name("IN2"); |
14178 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16609 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14179 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16610 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16611 symbol_c *IN2_type_symbol = NULL; |
14180 |
16612 |
14181 /* Get the value from a foo(<param_value>) style call */ |
16613 /* Get the value from a foo(<param_value>) style call */ |
14182 if (IN2_param_value == NULL) |
16614 if (IN2_param_value == NULL) |
14183 IN2_param_value = function_call_param_iterator.next(); |
16615 IN2_param_value = function_call_param_iterator.next(); |
14184 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16616 if (IN2_param_value != NULL) { |
14185 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16617 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16618 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16619 } |
14186 |
16620 |
14187 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
16621 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14188 { |
16622 { |
14189 |
16623 |
14190 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
16624 function_name = (symbol_c*)(new pragma_c("__time_sub")); |
|
16625 |
|
16626 if (IN1_type_symbol == NULL) |
|
16627 IN1_type_symbol = last_type_symbol; |
14191 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16628 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16629 |
|
16630 if (IN2_type_symbol == NULL) |
|
16631 IN2_type_symbol = last_type_symbol; |
14192 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16632 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14193 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
16633 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
14194 break; |
16634 break; |
14195 |
16635 |
14196 } |
16636 } |
14217 |
16657 |
14218 { |
16658 { |
14219 identifier_c param_name("IN1"); |
16659 identifier_c param_name("IN1"); |
14220 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16660 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14221 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
16661 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
16662 symbol_c *IN1_type_symbol = NULL; |
14222 |
16663 |
14223 /* Get the value from a foo(<param_value>) style call */ |
16664 /* Get the value from a foo(<param_value>) style call */ |
14224 if (IN1_param_value == NULL) |
16665 if (IN1_param_value == NULL) |
14225 IN1_param_value = function_call_param_iterator.next(); |
16666 IN1_param_value = function_call_param_iterator.next(); |
14226 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
16667 if (IN1_param_value != NULL) { |
14227 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
16668 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
14228 |
16669 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
14229 if(search_expression_type->is_num_type(IN1_type_symbol)) |
16670 } |
|
16671 |
|
16672 if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) |
14230 { |
16673 { |
14231 |
16674 |
14232 { |
16675 { |
14233 identifier_c param_name("IN2"); |
16676 identifier_c param_name("IN2"); |
14234 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16677 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14235 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16678 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16679 symbol_c *IN2_type_symbol = NULL; |
14236 |
16680 |
14237 /* Get the value from a foo(<param_value>) style call */ |
16681 /* Get the value from a foo(<param_value>) style call */ |
14238 if (IN2_param_value == NULL) |
16682 if (IN2_param_value == NULL) |
14239 IN2_param_value = function_call_param_iterator.next(); |
16683 IN2_param_value = function_call_param_iterator.next(); |
14240 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16684 if (IN2_param_value != NULL) { |
14241 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16685 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16686 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16687 } |
14242 |
16688 |
14243 if(search_expression_type->is_num_type(IN2_type_symbol)) |
16689 if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) |
14244 { |
16690 { |
14245 |
16691 |
14246 function_name = (symbol_c*)(new pragma_c("__div_")); |
16692 function_name = (symbol_c*)(new pragma_c("__div_")); |
|
16693 |
|
16694 if (IN1_type_symbol == NULL) |
|
16695 IN1_type_symbol = last_type_symbol; |
14247 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16696 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16697 |
|
16698 if (IN2_type_symbol == NULL) |
|
16699 IN2_type_symbol = last_type_symbol; |
14248 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16700 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14249 symbol_c * return_type_symbol = last_type_symbol; |
16701 symbol_c * return_type_symbol = last_type_symbol; |
14250 function_type_suffix = return_type_symbol; |
16702 function_type_suffix = return_type_symbol; |
14251 break; |
16703 break; |
14252 |
16704 |
14256 ERROR; |
16708 ERROR; |
14257 } |
16709 } |
14258 |
16710 |
14259 } |
16711 } |
14260 |
16712 |
14261 if(search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
16713 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::time_type_name, last_type_symbol)) |
14262 { |
16714 { |
14263 |
16715 |
14264 { |
16716 { |
14265 identifier_c param_name("IN2"); |
16717 identifier_c param_name("IN2"); |
14266 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16718 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14267 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16719 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16720 symbol_c *IN2_type_symbol = NULL; |
14268 |
16721 |
14269 /* Get the value from a foo(<param_value>) style call */ |
16722 /* Get the value from a foo(<param_value>) style call */ |
14270 if (IN2_param_value == NULL) |
16723 if (IN2_param_value == NULL) |
14271 IN2_param_value = function_call_param_iterator.next(); |
16724 IN2_param_value = function_call_param_iterator.next(); |
14272 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16725 if (IN2_param_value != NULL) { |
14273 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16726 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16727 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16728 } |
14274 |
16729 |
14275 if(search_expression_type->is_num_type(IN2_type_symbol)) |
16730 if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) |
14276 { |
16731 { |
14277 |
16732 |
14278 function_name = (symbol_c*)(new pragma_c("__time_div")); |
16733 function_name = (symbol_c*)(new pragma_c("__time_div")); |
|
16734 |
|
16735 if (IN1_type_symbol == NULL) |
|
16736 IN1_type_symbol = last_type_symbol; |
14279 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16737 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16738 |
|
16739 if (IN2_type_symbol == NULL) |
|
16740 IN2_type_symbol = last_type_symbol; |
14280 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16741 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14281 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
16742 symbol_c * return_type_symbol = &search_constant_type_c::time_type_name; |
14282 break; |
16743 break; |
14283 |
16744 |
14284 } |
16745 } |
14305 |
16766 |
14306 { |
16767 { |
14307 identifier_c param_name("IN1"); |
16768 identifier_c param_name("IN1"); |
14308 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16769 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14309 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
16770 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
16771 symbol_c *IN1_type_symbol = NULL; |
14310 |
16772 |
14311 /* Get the value from a foo(<param_value>) style call */ |
16773 /* Get the value from a foo(<param_value>) style call */ |
14312 if (IN1_param_value == NULL) |
16774 if (IN1_param_value == NULL) |
14313 IN1_param_value = function_call_param_iterator.next(); |
16775 IN1_param_value = function_call_param_iterator.next(); |
14314 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
16776 if (IN1_param_value != NULL) { |
14315 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
16777 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
14316 |
16778 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
14317 if(search_expression_type->is_num_type(IN1_type_symbol)) |
16779 } |
|
16780 |
|
16781 if(IN1_type_symbol == NULL || search_expression_type->is_num_type(IN1_type_symbol)) |
14318 { |
16782 { |
14319 |
16783 |
14320 { |
16784 { |
14321 identifier_c param_name("IN2"); |
16785 identifier_c param_name("IN2"); |
14322 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16786 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14323 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16787 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16788 symbol_c *IN2_type_symbol = NULL; |
14324 |
16789 |
14325 /* Get the value from a foo(<param_value>) style call */ |
16790 /* Get the value from a foo(<param_value>) style call */ |
14326 if (IN2_param_value == NULL) |
16791 if (IN2_param_value == NULL) |
14327 IN2_param_value = function_call_param_iterator.next(); |
16792 IN2_param_value = function_call_param_iterator.next(); |
14328 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16793 if (IN2_param_value != NULL) { |
14329 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16794 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16795 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16796 } |
14330 |
16797 |
14331 if(search_expression_type->is_num_type(IN2_type_symbol)) |
16798 if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) |
14332 { |
16799 { |
14333 |
16800 |
14334 function_name = (symbol_c*)(new pragma_c("__mod_")); |
16801 function_name = (symbol_c*)(new pragma_c("__mod_")); |
|
16802 |
|
16803 if (IN1_type_symbol == NULL) |
|
16804 IN1_type_symbol = last_type_symbol; |
14335 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16805 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16806 |
|
16807 if (IN2_type_symbol == NULL) |
|
16808 IN2_type_symbol = last_type_symbol; |
14336 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16809 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14337 symbol_c * return_type_symbol = last_type_symbol; |
16810 symbol_c * return_type_symbol = last_type_symbol; |
14338 function_type_suffix = return_type_symbol; |
16811 function_type_suffix = return_type_symbol; |
14339 break; |
16812 break; |
14340 |
16813 |
14362 |
16835 |
14363 { |
16836 { |
14364 identifier_c param_name("IN1"); |
16837 identifier_c param_name("IN1"); |
14365 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16838 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14366 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
16839 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
16840 symbol_c *IN1_type_symbol = NULL; |
14367 |
16841 |
14368 /* Get the value from a foo(<param_value>) style call */ |
16842 /* Get the value from a foo(<param_value>) style call */ |
14369 if (IN1_param_value == NULL) |
16843 if (IN1_param_value == NULL) |
14370 IN1_param_value = function_call_param_iterator.next(); |
16844 IN1_param_value = function_call_param_iterator.next(); |
14371 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
16845 if (IN1_param_value != NULL) { |
14372 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
16846 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
14373 |
16847 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
14374 if(search_expression_type->is_real_type(IN1_type_symbol)) |
16848 } |
|
16849 |
|
16850 if(IN1_type_symbol == NULL || search_expression_type->is_real_type(IN1_type_symbol)) |
14375 { |
16851 { |
14376 |
16852 |
14377 { |
16853 { |
14378 identifier_c param_name("IN2"); |
16854 identifier_c param_name("IN2"); |
14379 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16855 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14380 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
16856 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
16857 symbol_c *IN2_type_symbol = NULL; |
14381 |
16858 |
14382 /* Get the value from a foo(<param_value>) style call */ |
16859 /* Get the value from a foo(<param_value>) style call */ |
14383 if (IN2_param_value == NULL) |
16860 if (IN2_param_value == NULL) |
14384 IN2_param_value = function_call_param_iterator.next(); |
16861 IN2_param_value = function_call_param_iterator.next(); |
14385 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
16862 if (IN2_param_value != NULL) { |
14386 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
16863 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
16864 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
16865 } |
14387 |
16866 |
14388 if(search_expression_type->is_num_type(IN2_type_symbol)) |
16867 if(IN2_type_symbol == NULL || search_expression_type->is_num_type(IN2_type_symbol)) |
14389 { |
16868 { |
14390 |
16869 |
14391 function_name = (symbol_c*)(new pragma_c("__expt_")); |
16870 function_name = (symbol_c*)(new pragma_c("__expt_")); |
|
16871 |
|
16872 if (IN1_type_symbol == NULL) |
|
16873 IN1_type_symbol = last_type_symbol; |
14392 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
16874 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
16875 |
|
16876 if (IN2_type_symbol == NULL) |
|
16877 IN2_type_symbol = last_type_symbol; |
14393 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16878 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14394 symbol_c * return_type_symbol = last_type_symbol; |
16879 symbol_c * return_type_symbol = last_type_symbol; |
14395 function_type_suffix = IN1_type_symbol; |
16880 function_type_suffix = IN1_type_symbol; |
14396 break; |
16881 break; |
14397 |
16882 |
14419 |
16904 |
14420 { |
16905 { |
14421 identifier_c param_name("IN"); |
16906 identifier_c param_name("IN"); |
14422 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16907 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14423 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
16908 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14424 |
16909 symbol_c *IN_type_symbol = NULL; |
14425 /* Get the value from a foo(<param_value>) style call */ |
16910 |
14426 if (IN_param_value == NULL) |
16911 /* Get the value from a foo(<param_value>) style call */ |
14427 IN_param_value = function_call_param_iterator.next(); |
16912 if (IN_param_value == NULL) |
14428 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
16913 IN_param_value = function_call_param_iterator.next(); |
14429 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
16914 if (IN_param_value != NULL) { |
|
16915 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
|
16916 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
16917 } |
14430 |
16918 |
14431 |
16919 |
14432 { |
16920 { |
14433 |
16921 |
14434 function_name = (symbol_c*)(new pragma_c("__move_")); |
16922 function_name = (symbol_c*)(new pragma_c("__move_")); |
|
16923 |
|
16924 if (IN_type_symbol == NULL) |
|
16925 IN_type_symbol = last_type_symbol; |
14435 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
16926 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14436 symbol_c * return_type_symbol = last_type_symbol; |
16927 symbol_c * return_type_symbol = last_type_symbol; |
14437 function_type_suffix = return_type_symbol; |
16928 function_type_suffix = return_type_symbol; |
14438 break; |
16929 break; |
14439 |
16930 |
14455 |
16946 |
14456 { |
16947 { |
14457 identifier_c param_name("IN"); |
16948 identifier_c param_name("IN"); |
14458 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16949 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14459 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
16950 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14460 |
16951 symbol_c *IN_type_symbol = NULL; |
14461 /* Get the value from a foo(<param_value>) style call */ |
16952 |
14462 if (IN_param_value == NULL) |
16953 /* Get the value from a foo(<param_value>) style call */ |
14463 IN_param_value = function_call_param_iterator.next(); |
16954 if (IN_param_value == NULL) |
14464 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
16955 IN_param_value = function_call_param_iterator.next(); |
14465 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
16956 if (IN_param_value != NULL) { |
14466 |
16957 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14467 if(search_expression_type->is_binary_type(IN_type_symbol)) |
16958 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
16959 } |
|
16960 |
|
16961 if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol)) |
14468 { |
16962 { |
14469 |
16963 |
14470 { |
16964 { |
14471 identifier_c param_name("N"); |
16965 identifier_c param_name("N"); |
14472 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16966 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14473 symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); |
16967 symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); |
|
16968 symbol_c *N_type_symbol = NULL; |
14474 |
16969 |
14475 /* Get the value from a foo(<param_value>) style call */ |
16970 /* Get the value from a foo(<param_value>) style call */ |
14476 if (N_param_value == NULL) |
16971 if (N_param_value == NULL) |
14477 N_param_value = function_call_param_iterator.next(); |
16972 N_param_value = function_call_param_iterator.next(); |
14478 symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); |
16973 if (N_param_value != NULL) { |
14479 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; |
16974 N_type_symbol = search_expression_type->get_type(N_param_value); |
|
16975 last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; |
|
16976 } |
14480 |
16977 |
14481 if(search_expression_type->is_integer_type(N_type_symbol)) |
16978 if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) |
14482 { |
16979 { |
14483 |
16980 |
14484 function_name = (symbol_c*)(new pragma_c("__shl_")); |
16981 function_name = (symbol_c*)(new pragma_c("__shl_")); |
|
16982 |
|
16983 if (IN_type_symbol == NULL) |
|
16984 IN_type_symbol = last_type_symbol; |
14485 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
16985 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
16986 |
|
16987 if (N_type_symbol == NULL) |
|
16988 N_type_symbol = last_type_symbol; |
14486 ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in) |
16989 ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in) |
14487 symbol_c * return_type_symbol = IN_type_symbol; |
16990 symbol_c * return_type_symbol = IN_type_symbol; |
14488 function_type_suffix = IN_type_symbol; |
16991 function_type_suffix = IN_type_symbol; |
14489 break; |
16992 break; |
14490 |
16993 |
14512 |
17015 |
14513 { |
17016 { |
14514 identifier_c param_name("IN"); |
17017 identifier_c param_name("IN"); |
14515 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17018 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14516 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
17019 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14517 |
17020 symbol_c *IN_type_symbol = NULL; |
14518 /* Get the value from a foo(<param_value>) style call */ |
17021 |
14519 if (IN_param_value == NULL) |
17022 /* Get the value from a foo(<param_value>) style call */ |
14520 IN_param_value = function_call_param_iterator.next(); |
17023 if (IN_param_value == NULL) |
14521 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
17024 IN_param_value = function_call_param_iterator.next(); |
14522 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
17025 if (IN_param_value != NULL) { |
14523 |
17026 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14524 if(search_expression_type->is_binary_type(IN_type_symbol)) |
17027 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
17028 } |
|
17029 |
|
17030 if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol)) |
14525 { |
17031 { |
14526 |
17032 |
14527 { |
17033 { |
14528 identifier_c param_name("N"); |
17034 identifier_c param_name("N"); |
14529 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17035 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14530 symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); |
17036 symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); |
|
17037 symbol_c *N_type_symbol = NULL; |
14531 |
17038 |
14532 /* Get the value from a foo(<param_value>) style call */ |
17039 /* Get the value from a foo(<param_value>) style call */ |
14533 if (N_param_value == NULL) |
17040 if (N_param_value == NULL) |
14534 N_param_value = function_call_param_iterator.next(); |
17041 N_param_value = function_call_param_iterator.next(); |
14535 symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); |
17042 if (N_param_value != NULL) { |
14536 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; |
17043 N_type_symbol = search_expression_type->get_type(N_param_value); |
|
17044 last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; |
|
17045 } |
14537 |
17046 |
14538 if(search_expression_type->is_integer_type(N_type_symbol)) |
17047 if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) |
14539 { |
17048 { |
14540 |
17049 |
14541 function_name = (symbol_c*)(new pragma_c("__shr_")); |
17050 function_name = (symbol_c*)(new pragma_c("__shr_")); |
|
17051 |
|
17052 if (IN_type_symbol == NULL) |
|
17053 IN_type_symbol = last_type_symbol; |
14542 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
17054 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
17055 |
|
17056 if (N_type_symbol == NULL) |
|
17057 N_type_symbol = last_type_symbol; |
14543 ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in) |
17058 ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in) |
14544 symbol_c * return_type_symbol = IN_type_symbol; |
17059 symbol_c * return_type_symbol = IN_type_symbol; |
14545 function_type_suffix = IN_type_symbol; |
17060 function_type_suffix = IN_type_symbol; |
14546 break; |
17061 break; |
14547 |
17062 |
14569 |
17084 |
14570 { |
17085 { |
14571 identifier_c param_name("IN"); |
17086 identifier_c param_name("IN"); |
14572 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17087 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14573 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
17088 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14574 |
17089 symbol_c *IN_type_symbol = NULL; |
14575 /* Get the value from a foo(<param_value>) style call */ |
17090 |
14576 if (IN_param_value == NULL) |
17091 /* Get the value from a foo(<param_value>) style call */ |
14577 IN_param_value = function_call_param_iterator.next(); |
17092 if (IN_param_value == NULL) |
14578 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
17093 IN_param_value = function_call_param_iterator.next(); |
14579 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
17094 if (IN_param_value != NULL) { |
14580 |
17095 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14581 if(search_expression_type->is_nbinary_type(IN_type_symbol)) |
17096 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
17097 } |
|
17098 |
|
17099 if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol)) |
14582 { |
17100 { |
14583 |
17101 |
14584 { |
17102 { |
14585 identifier_c param_name("N"); |
17103 identifier_c param_name("N"); |
14586 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17104 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14587 symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); |
17105 symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); |
|
17106 symbol_c *N_type_symbol = NULL; |
14588 |
17107 |
14589 /* Get the value from a foo(<param_value>) style call */ |
17108 /* Get the value from a foo(<param_value>) style call */ |
14590 if (N_param_value == NULL) |
17109 if (N_param_value == NULL) |
14591 N_param_value = function_call_param_iterator.next(); |
17110 N_param_value = function_call_param_iterator.next(); |
14592 symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); |
17111 if (N_param_value != NULL) { |
14593 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; |
17112 N_type_symbol = search_expression_type->get_type(N_param_value); |
|
17113 last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; |
|
17114 } |
14594 |
17115 |
14595 if(search_expression_type->is_integer_type(N_type_symbol)) |
17116 if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) |
14596 { |
17117 { |
14597 |
17118 |
14598 function_name = (symbol_c*)(new pragma_c("__ror_")); |
17119 function_name = (symbol_c*)(new pragma_c("__ror_")); |
|
17120 |
|
17121 if (IN_type_symbol == NULL) |
|
17122 IN_type_symbol = last_type_symbol; |
14599 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
17123 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
17124 |
|
17125 if (N_type_symbol == NULL) |
|
17126 N_type_symbol = last_type_symbol; |
14600 ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in) |
17127 ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in) |
14601 symbol_c * return_type_symbol = IN_type_symbol; |
17128 symbol_c * return_type_symbol = IN_type_symbol; |
14602 function_type_suffix = IN_type_symbol; |
17129 function_type_suffix = IN_type_symbol; |
14603 break; |
17130 break; |
14604 |
17131 |
14626 |
17153 |
14627 { |
17154 { |
14628 identifier_c param_name("IN"); |
17155 identifier_c param_name("IN"); |
14629 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17156 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14630 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
17157 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14631 |
17158 symbol_c *IN_type_symbol = NULL; |
14632 /* Get the value from a foo(<param_value>) style call */ |
17159 |
14633 if (IN_param_value == NULL) |
17160 /* Get the value from a foo(<param_value>) style call */ |
14634 IN_param_value = function_call_param_iterator.next(); |
17161 if (IN_param_value == NULL) |
14635 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
17162 IN_param_value = function_call_param_iterator.next(); |
14636 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
17163 if (IN_param_value != NULL) { |
14637 |
17164 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14638 if(search_expression_type->is_nbinary_type(IN_type_symbol)) |
17165 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
17166 } |
|
17167 |
|
17168 if(IN_type_symbol == NULL || search_expression_type->is_nbinary_type(IN_type_symbol)) |
14639 { |
17169 { |
14640 |
17170 |
14641 { |
17171 { |
14642 identifier_c param_name("N"); |
17172 identifier_c param_name("N"); |
14643 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17173 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14644 symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); |
17174 symbol_c *N_param_value = function_call_param_iterator.search(¶m_name); |
|
17175 symbol_c *N_type_symbol = NULL; |
14645 |
17176 |
14646 /* Get the value from a foo(<param_value>) style call */ |
17177 /* Get the value from a foo(<param_value>) style call */ |
14647 if (N_param_value == NULL) |
17178 if (N_param_value == NULL) |
14648 N_param_value = function_call_param_iterator.next(); |
17179 N_param_value = function_call_param_iterator.next(); |
14649 symbol_c *N_type_symbol = search_expression_type->get_type(N_param_value); |
17180 if (N_param_value != NULL) { |
14650 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; |
17181 N_type_symbol = search_expression_type->get_type(N_param_value); |
|
17182 last_type_symbol = last_type_symbol && N_type_symbol && search_expression_type->is_same_type(N_type_symbol, last_type_symbol) ? search_expression_type->common_type(N_type_symbol, last_type_symbol) : N_type_symbol ; |
|
17183 } |
14651 |
17184 |
14652 if(search_expression_type->is_integer_type(N_type_symbol)) |
17185 if(N_type_symbol == NULL || search_expression_type->is_integer_type(N_type_symbol)) |
14653 { |
17186 { |
14654 |
17187 |
14655 function_name = (symbol_c*)(new pragma_c("__rol_")); |
17188 function_name = (symbol_c*)(new pragma_c("__rol_")); |
|
17189 |
|
17190 if (IN_type_symbol == NULL) |
|
17191 IN_type_symbol = last_type_symbol; |
14656 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
17192 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
17193 |
|
17194 if (N_type_symbol == NULL) |
|
17195 N_type_symbol = last_type_symbol; |
14657 ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in) |
17196 ADD_PARAM_LIST(N_param_value, N_type_symbol, function_param_iterator_c::direction_in) |
14658 symbol_c * return_type_symbol = IN_type_symbol; |
17197 symbol_c * return_type_symbol = IN_type_symbol; |
14659 function_type_suffix = IN_type_symbol; |
17198 function_type_suffix = IN_type_symbol; |
14660 break; |
17199 break; |
14661 |
17200 |
14683 |
17222 |
14684 { |
17223 { |
14685 identifier_c param_name("IN1"); |
17224 identifier_c param_name("IN1"); |
14686 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17225 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14687 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
17226 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
17227 symbol_c *IN1_type_symbol = NULL; |
14688 |
17228 |
14689 /* Get the value from a foo(<param_value>) style call */ |
17229 /* Get the value from a foo(<param_value>) style call */ |
14690 if (IN1_param_value == NULL) |
17230 if (IN1_param_value == NULL) |
14691 IN1_param_value = function_call_param_iterator.next(); |
17231 IN1_param_value = function_call_param_iterator.next(); |
14692 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
17232 if (IN1_param_value != NULL) { |
14693 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
17233 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
14694 |
17234 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
14695 if(search_expression_type->is_binary_type(IN1_type_symbol)) |
17235 } |
|
17236 |
|
17237 if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol)) |
14696 { |
17238 { |
14697 |
17239 |
14698 { |
17240 { |
14699 identifier_c param_name("IN2"); |
17241 identifier_c param_name("IN2"); |
14700 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17242 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14701 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
17243 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
17244 symbol_c *IN2_type_symbol = NULL; |
14702 |
17245 |
14703 /* Get the value from a foo(<param_value>) style call */ |
17246 /* Get the value from a foo(<param_value>) style call */ |
14704 if (IN2_param_value == NULL) |
17247 if (IN2_param_value == NULL) |
14705 IN2_param_value = function_call_param_iterator.next(); |
17248 IN2_param_value = function_call_param_iterator.next(); |
14706 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
17249 if (IN2_param_value != NULL) { |
14707 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
17250 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
17251 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
17252 } |
14708 |
17253 |
14709 if(search_expression_type->is_binary_type(IN2_type_symbol)) |
17254 if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol)) |
14710 { |
17255 { |
14711 |
17256 |
14712 function_name = (symbol_c*)(new pragma_c("__and_")); |
17257 function_name = (symbol_c*)(new pragma_c("__and_")); |
14713 |
17258 |
|
17259 if (nb_param < 2) |
|
17260 nb_param = 2; |
14714 char* nb_param_str = new char[10]; |
17261 char* nb_param_str = new char[10]; |
14715 sprintf(nb_param_str, "%d", nb_param); |
17262 sprintf(nb_param_str, "%d", nb_param); |
14716 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
17263 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
17264 |
|
17265 if (IN1_type_symbol == NULL) |
|
17266 IN1_type_symbol = last_type_symbol; |
14717 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
17267 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
17268 |
|
17269 if (IN2_type_symbol == NULL) |
|
17270 IN2_type_symbol = last_type_symbol; |
14718 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
17271 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14719 |
17272 |
14720 int base_num = 3; |
17273 int base_num = 3; |
14721 symbol_c *param_value = NULL; |
17274 symbol_c *param_value = NULL; |
14722 do{ |
17275 do{ |
14767 |
17320 |
14768 { |
17321 { |
14769 identifier_c param_name("IN1"); |
17322 identifier_c param_name("IN1"); |
14770 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17323 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14771 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
17324 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
17325 symbol_c *IN1_type_symbol = NULL; |
14772 |
17326 |
14773 /* Get the value from a foo(<param_value>) style call */ |
17327 /* Get the value from a foo(<param_value>) style call */ |
14774 if (IN1_param_value == NULL) |
17328 if (IN1_param_value == NULL) |
14775 IN1_param_value = function_call_param_iterator.next(); |
17329 IN1_param_value = function_call_param_iterator.next(); |
14776 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
17330 if (IN1_param_value != NULL) { |
14777 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
17331 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
14778 |
17332 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
14779 if(search_expression_type->is_binary_type(IN1_type_symbol)) |
17333 } |
|
17334 |
|
17335 if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol)) |
14780 { |
17336 { |
14781 |
17337 |
14782 { |
17338 { |
14783 identifier_c param_name("IN2"); |
17339 identifier_c param_name("IN2"); |
14784 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17340 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14785 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
17341 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
17342 symbol_c *IN2_type_symbol = NULL; |
14786 |
17343 |
14787 /* Get the value from a foo(<param_value>) style call */ |
17344 /* Get the value from a foo(<param_value>) style call */ |
14788 if (IN2_param_value == NULL) |
17345 if (IN2_param_value == NULL) |
14789 IN2_param_value = function_call_param_iterator.next(); |
17346 IN2_param_value = function_call_param_iterator.next(); |
14790 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
17347 if (IN2_param_value != NULL) { |
14791 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
17348 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
17349 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
17350 } |
14792 |
17351 |
14793 if(search_expression_type->is_binary_type(IN2_type_symbol)) |
17352 if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol)) |
14794 { |
17353 { |
14795 |
17354 |
14796 function_name = (symbol_c*)(new pragma_c("__or_")); |
17355 function_name = (symbol_c*)(new pragma_c("__or_")); |
14797 |
17356 |
|
17357 if (nb_param < 2) |
|
17358 nb_param = 2; |
14798 char* nb_param_str = new char[10]; |
17359 char* nb_param_str = new char[10]; |
14799 sprintf(nb_param_str, "%d", nb_param); |
17360 sprintf(nb_param_str, "%d", nb_param); |
14800 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
17361 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
17362 |
|
17363 if (IN1_type_symbol == NULL) |
|
17364 IN1_type_symbol = last_type_symbol; |
14801 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
17365 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
17366 |
|
17367 if (IN2_type_symbol == NULL) |
|
17368 IN2_type_symbol = last_type_symbol; |
14802 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
17369 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14803 |
17370 |
14804 int base_num = 3; |
17371 int base_num = 3; |
14805 symbol_c *param_value = NULL; |
17372 symbol_c *param_value = NULL; |
14806 do{ |
17373 do{ |
14851 |
17418 |
14852 { |
17419 { |
14853 identifier_c param_name("IN1"); |
17420 identifier_c param_name("IN1"); |
14854 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17421 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14855 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
17422 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
17423 symbol_c *IN1_type_symbol = NULL; |
14856 |
17424 |
14857 /* Get the value from a foo(<param_value>) style call */ |
17425 /* Get the value from a foo(<param_value>) style call */ |
14858 if (IN1_param_value == NULL) |
17426 if (IN1_param_value == NULL) |
14859 IN1_param_value = function_call_param_iterator.next(); |
17427 IN1_param_value = function_call_param_iterator.next(); |
14860 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
17428 if (IN1_param_value != NULL) { |
14861 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
17429 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
14862 |
17430 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
14863 if(search_expression_type->is_binary_type(IN1_type_symbol)) |
17431 } |
|
17432 |
|
17433 if(IN1_type_symbol == NULL || search_expression_type->is_binary_type(IN1_type_symbol)) |
14864 { |
17434 { |
14865 |
17435 |
14866 { |
17436 { |
14867 identifier_c param_name("IN2"); |
17437 identifier_c param_name("IN2"); |
14868 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17438 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14869 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
17439 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
17440 symbol_c *IN2_type_symbol = NULL; |
14870 |
17441 |
14871 /* Get the value from a foo(<param_value>) style call */ |
17442 /* Get the value from a foo(<param_value>) style call */ |
14872 if (IN2_param_value == NULL) |
17443 if (IN2_param_value == NULL) |
14873 IN2_param_value = function_call_param_iterator.next(); |
17444 IN2_param_value = function_call_param_iterator.next(); |
14874 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
17445 if (IN2_param_value != NULL) { |
14875 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
17446 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
17447 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
17448 } |
14876 |
17449 |
14877 if(search_expression_type->is_binary_type(IN2_type_symbol)) |
17450 if(IN2_type_symbol == NULL || search_expression_type->is_binary_type(IN2_type_symbol)) |
14878 { |
17451 { |
14879 |
17452 |
14880 function_name = (symbol_c*)(new pragma_c("__xor_")); |
17453 function_name = (symbol_c*)(new pragma_c("__xor_")); |
14881 |
17454 |
|
17455 if (nb_param < 2) |
|
17456 nb_param = 2; |
14882 char* nb_param_str = new char[10]; |
17457 char* nb_param_str = new char[10]; |
14883 sprintf(nb_param_str, "%d", nb_param); |
17458 sprintf(nb_param_str, "%d", nb_param); |
14884 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
17459 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
17460 |
|
17461 if (IN1_type_symbol == NULL) |
|
17462 IN1_type_symbol = last_type_symbol; |
14885 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
17463 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
17464 |
|
17465 if (IN2_type_symbol == NULL) |
|
17466 IN2_type_symbol = last_type_symbol; |
14886 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
17467 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
14887 |
17468 |
14888 int base_num = 3; |
17469 int base_num = 3; |
14889 symbol_c *param_value = NULL; |
17470 symbol_c *param_value = NULL; |
14890 do{ |
17471 do{ |
14935 |
17516 |
14936 { |
17517 { |
14937 identifier_c param_name("IN"); |
17518 identifier_c param_name("IN"); |
14938 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17519 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14939 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
17520 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
14940 |
17521 symbol_c *IN_type_symbol = NULL; |
14941 /* Get the value from a foo(<param_value>) style call */ |
17522 |
14942 if (IN_param_value == NULL) |
17523 /* Get the value from a foo(<param_value>) style call */ |
14943 IN_param_value = function_call_param_iterator.next(); |
17524 if (IN_param_value == NULL) |
14944 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
17525 IN_param_value = function_call_param_iterator.next(); |
14945 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
17526 if (IN_param_value != NULL) { |
14946 |
17527 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
14947 if(search_expression_type->is_binary_type(IN_type_symbol)) |
17528 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
17529 } |
|
17530 |
|
17531 if(IN_type_symbol == NULL || search_expression_type->is_binary_type(IN_type_symbol)) |
14948 { |
17532 { |
14949 |
17533 |
14950 function_name = (symbol_c*)(new pragma_c("__not_")); |
17534 function_name = (symbol_c*)(new pragma_c("__not_")); |
|
17535 |
|
17536 if (IN_type_symbol == NULL) |
|
17537 IN_type_symbol = last_type_symbol; |
14951 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
17538 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
14952 symbol_c * return_type_symbol = IN_type_symbol; |
17539 symbol_c * return_type_symbol = IN_type_symbol; |
14953 function_type_suffix = return_type_symbol; |
17540 function_type_suffix = return_type_symbol; |
14954 break; |
17541 break; |
14955 |
17542 |
14971 |
17558 |
14972 { |
17559 { |
14973 identifier_c param_name("G"); |
17560 identifier_c param_name("G"); |
14974 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17561 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14975 symbol_c *G_param_value = function_call_param_iterator.search(¶m_name); |
17562 symbol_c *G_param_value = function_call_param_iterator.search(¶m_name); |
|
17563 symbol_c *G_type_symbol = NULL; |
14976 |
17564 |
14977 /* Get the value from a foo(<param_value>) style call */ |
17565 /* Get the value from a foo(<param_value>) style call */ |
14978 if (G_param_value == NULL) |
17566 if (G_param_value == NULL) |
14979 G_param_value = function_call_param_iterator.next(); |
17567 G_param_value = function_call_param_iterator.next(); |
14980 symbol_c *G_type_symbol = search_expression_type->get_type(G_param_value); |
17568 if (G_param_value != NULL) { |
14981 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ; |
17569 G_type_symbol = search_expression_type->get_type(G_param_value); |
14982 |
17570 last_type_symbol = last_type_symbol && G_type_symbol && search_expression_type->is_same_type(G_type_symbol, last_type_symbol) ? search_expression_type->common_type(G_type_symbol, last_type_symbol) : G_type_symbol ; |
14983 if(search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
17571 } |
|
17572 |
|
17573 if(G_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::bool_type_name, last_type_symbol)) |
14984 { |
17574 { |
14985 |
17575 |
14986 { |
17576 { |
14987 identifier_c param_name("IN0"); |
17577 identifier_c param_name("IN0"); |
14988 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17578 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
14989 symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); |
17579 symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); |
|
17580 symbol_c *IN0_type_symbol = NULL; |
14990 |
17581 |
14991 /* Get the value from a foo(<param_value>) style call */ |
17582 /* Get the value from a foo(<param_value>) style call */ |
14992 if (IN0_param_value == NULL) |
17583 if (IN0_param_value == NULL) |
14993 IN0_param_value = function_call_param_iterator.next(); |
17584 IN0_param_value = function_call_param_iterator.next(); |
14994 symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value); |
17585 if (IN0_param_value != NULL) { |
14995 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ; |
17586 IN0_type_symbol = search_expression_type->get_type(IN0_param_value); |
|
17587 last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ; |
|
17588 } |
14996 |
17589 |
14997 |
17590 |
14998 { |
17591 { |
14999 |
17592 |
15000 { |
17593 { |
15001 identifier_c param_name("IN1"); |
17594 identifier_c param_name("IN1"); |
15002 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17595 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15003 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
17596 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
17597 symbol_c *IN1_type_symbol = NULL; |
15004 |
17598 |
15005 /* Get the value from a foo(<param_value>) style call */ |
17599 /* Get the value from a foo(<param_value>) style call */ |
15006 if (IN1_param_value == NULL) |
17600 if (IN1_param_value == NULL) |
15007 IN1_param_value = function_call_param_iterator.next(); |
17601 IN1_param_value = function_call_param_iterator.next(); |
15008 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
17602 if (IN1_param_value != NULL) { |
15009 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
17603 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
|
17604 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
|
17605 } |
15010 |
17606 |
15011 |
17607 |
15012 { |
17608 { |
15013 |
17609 |
15014 function_name = (symbol_c*)(new pragma_c("__sel_")); |
17610 function_name = (symbol_c*)(new pragma_c("__sel_")); |
|
17611 |
|
17612 if (G_type_symbol == NULL) |
|
17613 G_type_symbol = last_type_symbol; |
15015 ADD_PARAM_LIST(G_param_value, G_type_symbol, function_param_iterator_c::direction_in) |
17614 ADD_PARAM_LIST(G_param_value, G_type_symbol, function_param_iterator_c::direction_in) |
|
17615 |
|
17616 if (IN0_type_symbol == NULL) |
|
17617 IN0_type_symbol = last_type_symbol; |
15016 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in) |
17618 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in) |
|
17619 |
|
17620 if (IN1_type_symbol == NULL) |
|
17621 IN1_type_symbol = last_type_symbol; |
15017 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
17622 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
15018 symbol_c * return_type_symbol = last_type_symbol; |
17623 symbol_c * return_type_symbol = last_type_symbol; |
15019 function_type_suffix = IN0_type_symbol; |
17624 function_type_suffix = IN0_type_symbol; |
15020 break; |
17625 break; |
15021 |
17626 |
15049 |
17654 |
15050 { |
17655 { |
15051 identifier_c param_name("IN1"); |
17656 identifier_c param_name("IN1"); |
15052 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17657 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15053 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
17658 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
17659 symbol_c *IN1_type_symbol = NULL; |
15054 |
17660 |
15055 /* Get the value from a foo(<param_value>) style call */ |
17661 /* Get the value from a foo(<param_value>) style call */ |
15056 if (IN1_param_value == NULL) |
17662 if (IN1_param_value == NULL) |
15057 IN1_param_value = function_call_param_iterator.next(); |
17663 IN1_param_value = function_call_param_iterator.next(); |
15058 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
17664 if (IN1_param_value != NULL) { |
15059 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
17665 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
|
17666 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
|
17667 } |
15060 |
17668 |
15061 |
17669 |
15062 { |
17670 { |
15063 |
17671 |
15064 { |
17672 { |
15065 identifier_c param_name("IN2"); |
17673 identifier_c param_name("IN2"); |
15066 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17674 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15067 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
17675 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
17676 symbol_c *IN2_type_symbol = NULL; |
15068 |
17677 |
15069 /* Get the value from a foo(<param_value>) style call */ |
17678 /* Get the value from a foo(<param_value>) style call */ |
15070 if (IN2_param_value == NULL) |
17679 if (IN2_param_value == NULL) |
15071 IN2_param_value = function_call_param_iterator.next(); |
17680 IN2_param_value = function_call_param_iterator.next(); |
15072 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
17681 if (IN2_param_value != NULL) { |
15073 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
17682 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
17683 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
17684 } |
15074 |
17685 |
15075 |
17686 |
15076 { |
17687 { |
15077 |
17688 |
15078 function_name = (symbol_c*)(new pragma_c("__max_")); |
17689 function_name = (symbol_c*)(new pragma_c("__max_")); |
15079 |
17690 |
|
17691 if (nb_param < 2) |
|
17692 nb_param = 2; |
15080 char* nb_param_str = new char[10]; |
17693 char* nb_param_str = new char[10]; |
15081 sprintf(nb_param_str, "%d", nb_param); |
17694 sprintf(nb_param_str, "%d", nb_param); |
15082 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
17695 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
17696 |
|
17697 if (IN1_type_symbol == NULL) |
|
17698 IN1_type_symbol = last_type_symbol; |
15083 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
17699 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
17700 |
|
17701 if (IN2_type_symbol == NULL) |
|
17702 IN2_type_symbol = last_type_symbol; |
15084 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
17703 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
15085 |
17704 |
15086 int base_num = 3; |
17705 int base_num = 3; |
15087 symbol_c *param_value = NULL; |
17706 symbol_c *param_value = NULL; |
15088 do{ |
17707 do{ |
15133 |
17752 |
15134 { |
17753 { |
15135 identifier_c param_name("IN1"); |
17754 identifier_c param_name("IN1"); |
15136 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17755 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15137 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
17756 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
17757 symbol_c *IN1_type_symbol = NULL; |
15138 |
17758 |
15139 /* Get the value from a foo(<param_value>) style call */ |
17759 /* Get the value from a foo(<param_value>) style call */ |
15140 if (IN1_param_value == NULL) |
17760 if (IN1_param_value == NULL) |
15141 IN1_param_value = function_call_param_iterator.next(); |
17761 IN1_param_value = function_call_param_iterator.next(); |
15142 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
17762 if (IN1_param_value != NULL) { |
15143 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
17763 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
|
17764 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
|
17765 } |
15144 |
17766 |
15145 |
17767 |
15146 { |
17768 { |
15147 |
17769 |
15148 { |
17770 { |
15149 identifier_c param_name("IN2"); |
17771 identifier_c param_name("IN2"); |
15150 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17772 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15151 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
17773 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
17774 symbol_c *IN2_type_symbol = NULL; |
15152 |
17775 |
15153 /* Get the value from a foo(<param_value>) style call */ |
17776 /* Get the value from a foo(<param_value>) style call */ |
15154 if (IN2_param_value == NULL) |
17777 if (IN2_param_value == NULL) |
15155 IN2_param_value = function_call_param_iterator.next(); |
17778 IN2_param_value = function_call_param_iterator.next(); |
15156 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
17779 if (IN2_param_value != NULL) { |
15157 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
17780 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
17781 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
17782 } |
15158 |
17783 |
15159 |
17784 |
15160 { |
17785 { |
15161 |
17786 |
15162 function_name = (symbol_c*)(new pragma_c("__min_")); |
17787 function_name = (symbol_c*)(new pragma_c("__min_")); |
15163 |
17788 |
|
17789 if (nb_param < 2) |
|
17790 nb_param = 2; |
15164 char* nb_param_str = new char[10]; |
17791 char* nb_param_str = new char[10]; |
15165 sprintf(nb_param_str, "%d", nb_param); |
17792 sprintf(nb_param_str, "%d", nb_param); |
15166 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
17793 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
17794 |
|
17795 if (IN1_type_symbol == NULL) |
|
17796 IN1_type_symbol = last_type_symbol; |
15167 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
17797 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
17798 |
|
17799 if (IN2_type_symbol == NULL) |
|
17800 IN2_type_symbol = last_type_symbol; |
15168 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
17801 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
15169 |
17802 |
15170 int base_num = 3; |
17803 int base_num = 3; |
15171 symbol_c *param_value = NULL; |
17804 symbol_c *param_value = NULL; |
15172 do{ |
17805 do{ |
15217 |
17850 |
15218 { |
17851 { |
15219 identifier_c param_name("MN"); |
17852 identifier_c param_name("MN"); |
15220 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17853 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15221 symbol_c *MN_param_value = function_call_param_iterator.search(¶m_name); |
17854 symbol_c *MN_param_value = function_call_param_iterator.search(¶m_name); |
|
17855 symbol_c *MN_type_symbol = NULL; |
15222 |
17856 |
15223 /* Get the value from a foo(<param_value>) style call */ |
17857 /* Get the value from a foo(<param_value>) style call */ |
15224 if (MN_param_value == NULL) |
17858 if (MN_param_value == NULL) |
15225 MN_param_value = function_call_param_iterator.next(); |
17859 MN_param_value = function_call_param_iterator.next(); |
15226 symbol_c *MN_type_symbol = search_expression_type->get_type(MN_param_value); |
17860 if (MN_param_value != NULL) { |
15227 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ; |
17861 MN_type_symbol = search_expression_type->get_type(MN_param_value); |
|
17862 last_type_symbol = last_type_symbol && MN_type_symbol && search_expression_type->is_same_type(MN_type_symbol, last_type_symbol) ? search_expression_type->common_type(MN_type_symbol, last_type_symbol) : MN_type_symbol ; |
|
17863 } |
15228 |
17864 |
15229 |
17865 |
15230 { |
17866 { |
15231 |
17867 |
15232 { |
17868 { |
15233 identifier_c param_name("IN"); |
17869 identifier_c param_name("IN"); |
15234 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17870 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15235 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
17871 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
|
17872 symbol_c *IN_type_symbol = NULL; |
15236 |
17873 |
15237 /* Get the value from a foo(<param_value>) style call */ |
17874 /* Get the value from a foo(<param_value>) style call */ |
15238 if (IN_param_value == NULL) |
17875 if (IN_param_value == NULL) |
15239 IN_param_value = function_call_param_iterator.next(); |
17876 IN_param_value = function_call_param_iterator.next(); |
15240 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
17877 if (IN_param_value != NULL) { |
15241 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
17878 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
|
17879 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
17880 } |
15242 |
17881 |
15243 |
17882 |
15244 { |
17883 { |
15245 |
17884 |
15246 { |
17885 { |
15247 identifier_c param_name("MX"); |
17886 identifier_c param_name("MX"); |
15248 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17887 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15249 symbol_c *MX_param_value = function_call_param_iterator.search(¶m_name); |
17888 symbol_c *MX_param_value = function_call_param_iterator.search(¶m_name); |
|
17889 symbol_c *MX_type_symbol = NULL; |
15250 |
17890 |
15251 /* Get the value from a foo(<param_value>) style call */ |
17891 /* Get the value from a foo(<param_value>) style call */ |
15252 if (MX_param_value == NULL) |
17892 if (MX_param_value == NULL) |
15253 MX_param_value = function_call_param_iterator.next(); |
17893 MX_param_value = function_call_param_iterator.next(); |
15254 symbol_c *MX_type_symbol = search_expression_type->get_type(MX_param_value); |
17894 if (MX_param_value != NULL) { |
15255 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ; |
17895 MX_type_symbol = search_expression_type->get_type(MX_param_value); |
|
17896 last_type_symbol = last_type_symbol && MX_type_symbol && search_expression_type->is_same_type(MX_type_symbol, last_type_symbol) ? search_expression_type->common_type(MX_type_symbol, last_type_symbol) : MX_type_symbol ; |
|
17897 } |
15256 |
17898 |
15257 |
17899 |
15258 { |
17900 { |
15259 |
17901 |
15260 function_name = (symbol_c*)(new pragma_c("__limit_")); |
17902 function_name = (symbol_c*)(new pragma_c("__limit_")); |
|
17903 |
|
17904 if (MN_type_symbol == NULL) |
|
17905 MN_type_symbol = last_type_symbol; |
15261 ADD_PARAM_LIST(MN_param_value, MN_type_symbol, function_param_iterator_c::direction_in) |
17906 ADD_PARAM_LIST(MN_param_value, MN_type_symbol, function_param_iterator_c::direction_in) |
|
17907 |
|
17908 if (IN_type_symbol == NULL) |
|
17909 IN_type_symbol = last_type_symbol; |
15262 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
17910 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
17911 |
|
17912 if (MX_type_symbol == NULL) |
|
17913 MX_type_symbol = last_type_symbol; |
15263 ADD_PARAM_LIST(MX_param_value, MX_type_symbol, function_param_iterator_c::direction_in) |
17914 ADD_PARAM_LIST(MX_param_value, MX_type_symbol, function_param_iterator_c::direction_in) |
15264 symbol_c * return_type_symbol = IN_type_symbol; |
17915 symbol_c * return_type_symbol = IN_type_symbol; |
15265 function_type_suffix = IN_type_symbol; |
17916 function_type_suffix = IN_type_symbol; |
15266 break; |
17917 break; |
15267 |
17918 |
15295 |
17946 |
15296 { |
17947 { |
15297 identifier_c param_name("K"); |
17948 identifier_c param_name("K"); |
15298 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17949 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15299 symbol_c *K_param_value = function_call_param_iterator.search(¶m_name); |
17950 symbol_c *K_param_value = function_call_param_iterator.search(¶m_name); |
|
17951 symbol_c *K_type_symbol = NULL; |
15300 |
17952 |
15301 /* Get the value from a foo(<param_value>) style call */ |
17953 /* Get the value from a foo(<param_value>) style call */ |
15302 if (K_param_value == NULL) |
17954 if (K_param_value == NULL) |
15303 K_param_value = function_call_param_iterator.next(); |
17955 K_param_value = function_call_param_iterator.next(); |
15304 symbol_c *K_type_symbol = search_expression_type->get_type(K_param_value); |
17956 if (K_param_value != NULL) { |
15305 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ; |
17957 K_type_symbol = search_expression_type->get_type(K_param_value); |
15306 |
17958 last_type_symbol = last_type_symbol && K_type_symbol && search_expression_type->is_same_type(K_type_symbol, last_type_symbol) ? search_expression_type->common_type(K_type_symbol, last_type_symbol) : K_type_symbol ; |
15307 if(search_expression_type->is_integer_type(K_type_symbol)) |
17959 } |
|
17960 |
|
17961 if(K_type_symbol == NULL || search_expression_type->is_integer_type(K_type_symbol)) |
15308 { |
17962 { |
15309 |
17963 |
15310 { |
17964 { |
15311 identifier_c param_name("IN0"); |
17965 identifier_c param_name("IN0"); |
15312 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17966 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15313 symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); |
17967 symbol_c *IN0_param_value = function_call_param_iterator.search(¶m_name); |
|
17968 symbol_c *IN0_type_symbol = NULL; |
15314 |
17969 |
15315 /* Get the value from a foo(<param_value>) style call */ |
17970 /* Get the value from a foo(<param_value>) style call */ |
15316 if (IN0_param_value == NULL) |
17971 if (IN0_param_value == NULL) |
15317 IN0_param_value = function_call_param_iterator.next(); |
17972 IN0_param_value = function_call_param_iterator.next(); |
15318 symbol_c *IN0_type_symbol = search_expression_type->get_type(IN0_param_value); |
17973 if (IN0_param_value != NULL) { |
15319 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ; |
17974 IN0_type_symbol = search_expression_type->get_type(IN0_param_value); |
|
17975 last_type_symbol = last_type_symbol && IN0_type_symbol && search_expression_type->is_same_type(IN0_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN0_type_symbol, last_type_symbol) : IN0_type_symbol ; |
|
17976 } |
15320 |
17977 |
15321 |
17978 |
15322 { |
17979 { |
15323 |
17980 |
15324 { |
17981 { |
15325 identifier_c param_name("IN1"); |
17982 identifier_c param_name("IN1"); |
15326 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
17983 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15327 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
17984 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
17985 symbol_c *IN1_type_symbol = NULL; |
15328 |
17986 |
15329 /* Get the value from a foo(<param_value>) style call */ |
17987 /* Get the value from a foo(<param_value>) style call */ |
15330 if (IN1_param_value == NULL) |
17988 if (IN1_param_value == NULL) |
15331 IN1_param_value = function_call_param_iterator.next(); |
17989 IN1_param_value = function_call_param_iterator.next(); |
15332 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
17990 if (IN1_param_value != NULL) { |
15333 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
17991 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
|
17992 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
|
17993 } |
15334 |
17994 |
15335 |
17995 |
15336 { |
17996 { |
15337 |
17997 |
15338 function_name = (symbol_c*)(new pragma_c("__mux_")); |
17998 function_name = (symbol_c*)(new pragma_c("__mux_")); |
15339 |
17999 |
|
18000 if (nb_param < 3) |
|
18001 nb_param = 3; |
15340 char* nb_param_str = new char[10]; |
18002 char* nb_param_str = new char[10]; |
15341 sprintf(nb_param_str, "%d", nb_param); |
18003 sprintf(nb_param_str, "%d", nb_param); |
15342 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
18004 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
18005 |
|
18006 if (K_type_symbol == NULL) |
|
18007 K_type_symbol = last_type_symbol; |
15343 ADD_PARAM_LIST(K_param_value, K_type_symbol, function_param_iterator_c::direction_in) |
18008 ADD_PARAM_LIST(K_param_value, K_type_symbol, function_param_iterator_c::direction_in) |
|
18009 |
|
18010 if (IN0_type_symbol == NULL) |
|
18011 IN0_type_symbol = last_type_symbol; |
15344 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in) |
18012 ADD_PARAM_LIST(IN0_param_value, IN0_type_symbol, function_param_iterator_c::direction_in) |
|
18013 |
|
18014 if (IN1_type_symbol == NULL) |
|
18015 IN1_type_symbol = last_type_symbol; |
15345 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
18016 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
15346 |
18017 |
15347 int base_num = 2; |
18018 int base_num = 2; |
15348 symbol_c *param_value = NULL; |
18019 symbol_c *param_value = NULL; |
15349 do{ |
18020 do{ |
15400 |
18071 |
15401 { |
18072 { |
15402 identifier_c param_name("IN1"); |
18073 identifier_c param_name("IN1"); |
15403 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18074 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15404 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
18075 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
18076 symbol_c *IN1_type_symbol = NULL; |
15405 |
18077 |
15406 /* Get the value from a foo(<param_value>) style call */ |
18078 /* Get the value from a foo(<param_value>) style call */ |
15407 if (IN1_param_value == NULL) |
18079 if (IN1_param_value == NULL) |
15408 IN1_param_value = function_call_param_iterator.next(); |
18080 IN1_param_value = function_call_param_iterator.next(); |
15409 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
18081 if (IN1_param_value != NULL) { |
15410 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
18082 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
|
18083 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
|
18084 } |
15411 |
18085 |
15412 |
18086 |
15413 { |
18087 { |
15414 |
18088 |
15415 { |
18089 { |
15416 identifier_c param_name("IN2"); |
18090 identifier_c param_name("IN2"); |
15417 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18091 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15418 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
18092 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
18093 symbol_c *IN2_type_symbol = NULL; |
15419 |
18094 |
15420 /* Get the value from a foo(<param_value>) style call */ |
18095 /* Get the value from a foo(<param_value>) style call */ |
15421 if (IN2_param_value == NULL) |
18096 if (IN2_param_value == NULL) |
15422 IN2_param_value = function_call_param_iterator.next(); |
18097 IN2_param_value = function_call_param_iterator.next(); |
15423 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
18098 if (IN2_param_value != NULL) { |
15424 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
18099 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
18100 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
18101 } |
15425 |
18102 |
15426 |
18103 |
15427 { |
18104 { |
15428 |
18105 |
15429 function_name = (symbol_c*)(new pragma_c("__gt_")); |
18106 function_name = (symbol_c*)(new pragma_c("__gt_")); |
15430 |
18107 |
|
18108 if (nb_param < 2) |
|
18109 nb_param = 2; |
15431 char* nb_param_str = new char[10]; |
18110 char* nb_param_str = new char[10]; |
15432 sprintf(nb_param_str, "%d", nb_param); |
18111 sprintf(nb_param_str, "%d", nb_param); |
15433 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
18112 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
18113 |
|
18114 if (IN1_type_symbol == NULL) |
|
18115 IN1_type_symbol = last_type_symbol; |
15434 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
18116 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
18117 |
|
18118 if (IN2_type_symbol == NULL) |
|
18119 IN2_type_symbol = last_type_symbol; |
15435 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
18120 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
15436 |
18121 |
15437 int base_num = 3; |
18122 int base_num = 3; |
15438 symbol_c *param_value = NULL; |
18123 symbol_c *param_value = NULL; |
15439 do{ |
18124 do{ |
15484 |
18169 |
15485 { |
18170 { |
15486 identifier_c param_name("IN1"); |
18171 identifier_c param_name("IN1"); |
15487 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18172 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15488 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
18173 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
18174 symbol_c *IN1_type_symbol = NULL; |
15489 |
18175 |
15490 /* Get the value from a foo(<param_value>) style call */ |
18176 /* Get the value from a foo(<param_value>) style call */ |
15491 if (IN1_param_value == NULL) |
18177 if (IN1_param_value == NULL) |
15492 IN1_param_value = function_call_param_iterator.next(); |
18178 IN1_param_value = function_call_param_iterator.next(); |
15493 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
18179 if (IN1_param_value != NULL) { |
15494 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
18180 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
|
18181 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
|
18182 } |
15495 |
18183 |
15496 |
18184 |
15497 { |
18185 { |
15498 |
18186 |
15499 { |
18187 { |
15500 identifier_c param_name("IN2"); |
18188 identifier_c param_name("IN2"); |
15501 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18189 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15502 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
18190 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
18191 symbol_c *IN2_type_symbol = NULL; |
15503 |
18192 |
15504 /* Get the value from a foo(<param_value>) style call */ |
18193 /* Get the value from a foo(<param_value>) style call */ |
15505 if (IN2_param_value == NULL) |
18194 if (IN2_param_value == NULL) |
15506 IN2_param_value = function_call_param_iterator.next(); |
18195 IN2_param_value = function_call_param_iterator.next(); |
15507 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
18196 if (IN2_param_value != NULL) { |
15508 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
18197 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
18198 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
18199 } |
15509 |
18200 |
15510 |
18201 |
15511 { |
18202 { |
15512 |
18203 |
15513 function_name = (symbol_c*)(new pragma_c("__ge_")); |
18204 function_name = (symbol_c*)(new pragma_c("__ge_")); |
15514 |
18205 |
|
18206 if (nb_param < 2) |
|
18207 nb_param = 2; |
15515 char* nb_param_str = new char[10]; |
18208 char* nb_param_str = new char[10]; |
15516 sprintf(nb_param_str, "%d", nb_param); |
18209 sprintf(nb_param_str, "%d", nb_param); |
15517 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
18210 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
18211 |
|
18212 if (IN1_type_symbol == NULL) |
|
18213 IN1_type_symbol = last_type_symbol; |
15518 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
18214 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
18215 |
|
18216 if (IN2_type_symbol == NULL) |
|
18217 IN2_type_symbol = last_type_symbol; |
15519 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
18218 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
15520 |
18219 |
15521 int base_num = 3; |
18220 int base_num = 3; |
15522 symbol_c *param_value = NULL; |
18221 symbol_c *param_value = NULL; |
15523 do{ |
18222 do{ |
15568 |
18267 |
15569 { |
18268 { |
15570 identifier_c param_name("IN1"); |
18269 identifier_c param_name("IN1"); |
15571 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18270 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15572 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
18271 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
18272 symbol_c *IN1_type_symbol = NULL; |
15573 |
18273 |
15574 /* Get the value from a foo(<param_value>) style call */ |
18274 /* Get the value from a foo(<param_value>) style call */ |
15575 if (IN1_param_value == NULL) |
18275 if (IN1_param_value == NULL) |
15576 IN1_param_value = function_call_param_iterator.next(); |
18276 IN1_param_value = function_call_param_iterator.next(); |
15577 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
18277 if (IN1_param_value != NULL) { |
15578 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
18278 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
|
18279 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
|
18280 } |
15579 |
18281 |
15580 |
18282 |
15581 { |
18283 { |
15582 |
18284 |
15583 { |
18285 { |
15584 identifier_c param_name("IN2"); |
18286 identifier_c param_name("IN2"); |
15585 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18287 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15586 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
18288 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
18289 symbol_c *IN2_type_symbol = NULL; |
15587 |
18290 |
15588 /* Get the value from a foo(<param_value>) style call */ |
18291 /* Get the value from a foo(<param_value>) style call */ |
15589 if (IN2_param_value == NULL) |
18292 if (IN2_param_value == NULL) |
15590 IN2_param_value = function_call_param_iterator.next(); |
18293 IN2_param_value = function_call_param_iterator.next(); |
15591 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
18294 if (IN2_param_value != NULL) { |
15592 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
18295 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
18296 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
18297 } |
15593 |
18298 |
15594 |
18299 |
15595 { |
18300 { |
15596 |
18301 |
15597 function_name = (symbol_c*)(new pragma_c("__eq_")); |
18302 function_name = (symbol_c*)(new pragma_c("__eq_")); |
15598 |
18303 |
|
18304 if (nb_param < 2) |
|
18305 nb_param = 2; |
15599 char* nb_param_str = new char[10]; |
18306 char* nb_param_str = new char[10]; |
15600 sprintf(nb_param_str, "%d", nb_param); |
18307 sprintf(nb_param_str, "%d", nb_param); |
15601 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
18308 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
18309 |
|
18310 if (IN1_type_symbol == NULL) |
|
18311 IN1_type_symbol = last_type_symbol; |
15602 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
18312 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
18313 |
|
18314 if (IN2_type_symbol == NULL) |
|
18315 IN2_type_symbol = last_type_symbol; |
15603 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
18316 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
15604 |
18317 |
15605 int base_num = 3; |
18318 int base_num = 3; |
15606 symbol_c *param_value = NULL; |
18319 symbol_c *param_value = NULL; |
15607 do{ |
18320 do{ |
15652 |
18365 |
15653 { |
18366 { |
15654 identifier_c param_name("IN1"); |
18367 identifier_c param_name("IN1"); |
15655 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18368 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15656 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
18369 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
18370 symbol_c *IN1_type_symbol = NULL; |
15657 |
18371 |
15658 /* Get the value from a foo(<param_value>) style call */ |
18372 /* Get the value from a foo(<param_value>) style call */ |
15659 if (IN1_param_value == NULL) |
18373 if (IN1_param_value == NULL) |
15660 IN1_param_value = function_call_param_iterator.next(); |
18374 IN1_param_value = function_call_param_iterator.next(); |
15661 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
18375 if (IN1_param_value != NULL) { |
15662 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
18376 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
|
18377 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
|
18378 } |
15663 |
18379 |
15664 |
18380 |
15665 { |
18381 { |
15666 |
18382 |
15667 { |
18383 { |
15668 identifier_c param_name("IN2"); |
18384 identifier_c param_name("IN2"); |
15669 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18385 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15670 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
18386 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
18387 symbol_c *IN2_type_symbol = NULL; |
15671 |
18388 |
15672 /* Get the value from a foo(<param_value>) style call */ |
18389 /* Get the value from a foo(<param_value>) style call */ |
15673 if (IN2_param_value == NULL) |
18390 if (IN2_param_value == NULL) |
15674 IN2_param_value = function_call_param_iterator.next(); |
18391 IN2_param_value = function_call_param_iterator.next(); |
15675 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
18392 if (IN2_param_value != NULL) { |
15676 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
18393 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
18394 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
18395 } |
15677 |
18396 |
15678 |
18397 |
15679 { |
18398 { |
15680 |
18399 |
15681 function_name = (symbol_c*)(new pragma_c("__lt_")); |
18400 function_name = (symbol_c*)(new pragma_c("__lt_")); |
15682 |
18401 |
|
18402 if (nb_param < 2) |
|
18403 nb_param = 2; |
15683 char* nb_param_str = new char[10]; |
18404 char* nb_param_str = new char[10]; |
15684 sprintf(nb_param_str, "%d", nb_param); |
18405 sprintf(nb_param_str, "%d", nb_param); |
15685 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
18406 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
18407 |
|
18408 if (IN1_type_symbol == NULL) |
|
18409 IN1_type_symbol = last_type_symbol; |
15686 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
18410 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
18411 |
|
18412 if (IN2_type_symbol == NULL) |
|
18413 IN2_type_symbol = last_type_symbol; |
15687 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
18414 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
15688 |
18415 |
15689 int base_num = 3; |
18416 int base_num = 3; |
15690 symbol_c *param_value = NULL; |
18417 symbol_c *param_value = NULL; |
15691 do{ |
18418 do{ |
15736 |
18463 |
15737 { |
18464 { |
15738 identifier_c param_name("IN1"); |
18465 identifier_c param_name("IN1"); |
15739 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18466 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15740 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
18467 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
18468 symbol_c *IN1_type_symbol = NULL; |
15741 |
18469 |
15742 /* Get the value from a foo(<param_value>) style call */ |
18470 /* Get the value from a foo(<param_value>) style call */ |
15743 if (IN1_param_value == NULL) |
18471 if (IN1_param_value == NULL) |
15744 IN1_param_value = function_call_param_iterator.next(); |
18472 IN1_param_value = function_call_param_iterator.next(); |
15745 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
18473 if (IN1_param_value != NULL) { |
15746 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
18474 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
|
18475 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
|
18476 } |
15747 |
18477 |
15748 |
18478 |
15749 { |
18479 { |
15750 |
18480 |
15751 { |
18481 { |
15752 identifier_c param_name("IN2"); |
18482 identifier_c param_name("IN2"); |
15753 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18483 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15754 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
18484 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
18485 symbol_c *IN2_type_symbol = NULL; |
15755 |
18486 |
15756 /* Get the value from a foo(<param_value>) style call */ |
18487 /* Get the value from a foo(<param_value>) style call */ |
15757 if (IN2_param_value == NULL) |
18488 if (IN2_param_value == NULL) |
15758 IN2_param_value = function_call_param_iterator.next(); |
18489 IN2_param_value = function_call_param_iterator.next(); |
15759 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
18490 if (IN2_param_value != NULL) { |
15760 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
18491 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
18492 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
18493 } |
15761 |
18494 |
15762 |
18495 |
15763 { |
18496 { |
15764 |
18497 |
15765 function_name = (symbol_c*)(new pragma_c("__le_")); |
18498 function_name = (symbol_c*)(new pragma_c("__le_")); |
15766 |
18499 |
|
18500 if (nb_param < 2) |
|
18501 nb_param = 2; |
15767 char* nb_param_str = new char[10]; |
18502 char* nb_param_str = new char[10]; |
15768 sprintf(nb_param_str, "%d", nb_param); |
18503 sprintf(nb_param_str, "%d", nb_param); |
15769 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
18504 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
18505 |
|
18506 if (IN1_type_symbol == NULL) |
|
18507 IN1_type_symbol = last_type_symbol; |
15770 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
18508 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
18509 |
|
18510 if (IN2_type_symbol == NULL) |
|
18511 IN2_type_symbol = last_type_symbol; |
15771 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
18512 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
15772 |
18513 |
15773 int base_num = 3; |
18514 int base_num = 3; |
15774 symbol_c *param_value = NULL; |
18515 symbol_c *param_value = NULL; |
15775 do{ |
18516 do{ |
15820 |
18561 |
15821 { |
18562 { |
15822 identifier_c param_name("IN1"); |
18563 identifier_c param_name("IN1"); |
15823 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18564 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15824 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
18565 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
18566 symbol_c *IN1_type_symbol = NULL; |
15825 |
18567 |
15826 /* Get the value from a foo(<param_value>) style call */ |
18568 /* Get the value from a foo(<param_value>) style call */ |
15827 if (IN1_param_value == NULL) |
18569 if (IN1_param_value == NULL) |
15828 IN1_param_value = function_call_param_iterator.next(); |
18570 IN1_param_value = function_call_param_iterator.next(); |
15829 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
18571 if (IN1_param_value != NULL) { |
15830 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
18572 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
|
18573 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
|
18574 } |
15831 |
18575 |
15832 |
18576 |
15833 { |
18577 { |
15834 |
18578 |
15835 { |
18579 { |
15836 identifier_c param_name("IN2"); |
18580 identifier_c param_name("IN2"); |
15837 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18581 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15838 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
18582 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
18583 symbol_c *IN2_type_symbol = NULL; |
15839 |
18584 |
15840 /* Get the value from a foo(<param_value>) style call */ |
18585 /* Get the value from a foo(<param_value>) style call */ |
15841 if (IN2_param_value == NULL) |
18586 if (IN2_param_value == NULL) |
15842 IN2_param_value = function_call_param_iterator.next(); |
18587 IN2_param_value = function_call_param_iterator.next(); |
15843 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
18588 if (IN2_param_value != NULL) { |
15844 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
18589 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
18590 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
18591 } |
15845 |
18592 |
15846 |
18593 |
15847 { |
18594 { |
15848 |
18595 |
15849 function_name = (symbol_c*)(new pragma_c("__ne_")); |
18596 function_name = (symbol_c*)(new pragma_c("__ne_")); |
15850 |
18597 |
|
18598 if (nb_param < 2) |
|
18599 nb_param = 2; |
15851 char* nb_param_str = new char[10]; |
18600 char* nb_param_str = new char[10]; |
15852 sprintf(nb_param_str, "%d", nb_param); |
18601 sprintf(nb_param_str, "%d", nb_param); |
15853 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
18602 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
18603 |
|
18604 if (IN1_type_symbol == NULL) |
|
18605 IN1_type_symbol = last_type_symbol; |
15854 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
18606 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
18607 |
|
18608 if (IN2_type_symbol == NULL) |
|
18609 IN2_type_symbol = last_type_symbol; |
15855 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
18610 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
15856 |
18611 |
15857 int base_num = 3; |
18612 int base_num = 3; |
15858 symbol_c *param_value = NULL; |
18613 symbol_c *param_value = NULL; |
15859 do{ |
18614 do{ |
15904 |
18659 |
15905 { |
18660 { |
15906 identifier_c param_name("IN"); |
18661 identifier_c param_name("IN"); |
15907 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18662 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15908 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
18663 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15909 |
18664 symbol_c *IN_type_symbol = NULL; |
15910 /* Get the value from a foo(<param_value>) style call */ |
18665 |
15911 if (IN_param_value == NULL) |
18666 /* Get the value from a foo(<param_value>) style call */ |
15912 IN_param_value = function_call_param_iterator.next(); |
18667 if (IN_param_value == NULL) |
15913 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
18668 IN_param_value = function_call_param_iterator.next(); |
15914 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
18669 if (IN_param_value != NULL) { |
15915 |
18670 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15916 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
18671 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
18672 } |
|
18673 |
|
18674 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
15917 { |
18675 { |
15918 |
18676 |
15919 function_name = (symbol_c*)(new pragma_c("__len")); |
18677 function_name = (symbol_c*)(new pragma_c("__len")); |
|
18678 |
|
18679 if (IN_type_symbol == NULL) |
|
18680 IN_type_symbol = last_type_symbol; |
15920 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
18681 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
15921 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
18682 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
15922 break; |
18683 break; |
15923 |
18684 |
15924 } |
18685 } |
15939 |
18700 |
15940 { |
18701 { |
15941 identifier_c param_name("IN"); |
18702 identifier_c param_name("IN"); |
15942 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18703 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15943 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
18704 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
15944 |
18705 symbol_c *IN_type_symbol = NULL; |
15945 /* Get the value from a foo(<param_value>) style call */ |
18706 |
15946 if (IN_param_value == NULL) |
18707 /* Get the value from a foo(<param_value>) style call */ |
15947 IN_param_value = function_call_param_iterator.next(); |
18708 if (IN_param_value == NULL) |
15948 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
18709 IN_param_value = function_call_param_iterator.next(); |
15949 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
18710 if (IN_param_value != NULL) { |
15950 |
18711 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
15951 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
18712 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
18713 } |
|
18714 |
|
18715 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
15952 { |
18716 { |
15953 |
18717 |
15954 { |
18718 { |
15955 identifier_c param_name("L"); |
18719 identifier_c param_name("L"); |
15956 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18720 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15957 symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); |
18721 symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); |
|
18722 symbol_c *L_type_symbol = NULL; |
15958 |
18723 |
15959 /* Get the value from a foo(<param_value>) style call */ |
18724 /* Get the value from a foo(<param_value>) style call */ |
15960 if (L_param_value == NULL) |
18725 if (L_param_value == NULL) |
15961 L_param_value = function_call_param_iterator.next(); |
18726 L_param_value = function_call_param_iterator.next(); |
15962 symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); |
18727 if (L_param_value != NULL) { |
15963 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; |
18728 L_type_symbol = search_expression_type->get_type(L_param_value); |
|
18729 last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; |
|
18730 } |
15964 |
18731 |
15965 if(search_expression_type->is_integer_type(L_type_symbol)) |
18732 if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) |
15966 { |
18733 { |
15967 |
18734 |
15968 function_name = (symbol_c*)(new pragma_c("__left")); |
18735 function_name = (symbol_c*)(new pragma_c("__left")); |
|
18736 |
|
18737 if (IN_type_symbol == NULL) |
|
18738 IN_type_symbol = last_type_symbol; |
15969 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
18739 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
18740 |
|
18741 if (L_type_symbol == NULL) |
|
18742 L_type_symbol = last_type_symbol; |
15970 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in) |
18743 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in) |
15971 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
18744 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
15972 break; |
18745 break; |
15973 |
18746 |
15974 } |
18747 } |
15995 |
18768 |
15996 { |
18769 { |
15997 identifier_c param_name("IN"); |
18770 identifier_c param_name("IN"); |
15998 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18771 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
15999 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
18772 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
16000 |
18773 symbol_c *IN_type_symbol = NULL; |
16001 /* Get the value from a foo(<param_value>) style call */ |
18774 |
16002 if (IN_param_value == NULL) |
18775 /* Get the value from a foo(<param_value>) style call */ |
16003 IN_param_value = function_call_param_iterator.next(); |
18776 if (IN_param_value == NULL) |
16004 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
18777 IN_param_value = function_call_param_iterator.next(); |
16005 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
18778 if (IN_param_value != NULL) { |
16006 |
18779 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
16007 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
18780 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
18781 } |
|
18782 |
|
18783 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16008 { |
18784 { |
16009 |
18785 |
16010 { |
18786 { |
16011 identifier_c param_name("L"); |
18787 identifier_c param_name("L"); |
16012 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18788 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16013 symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); |
18789 symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); |
|
18790 symbol_c *L_type_symbol = NULL; |
16014 |
18791 |
16015 /* Get the value from a foo(<param_value>) style call */ |
18792 /* Get the value from a foo(<param_value>) style call */ |
16016 if (L_param_value == NULL) |
18793 if (L_param_value == NULL) |
16017 L_param_value = function_call_param_iterator.next(); |
18794 L_param_value = function_call_param_iterator.next(); |
16018 symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); |
18795 if (L_param_value != NULL) { |
16019 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; |
18796 L_type_symbol = search_expression_type->get_type(L_param_value); |
|
18797 last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; |
|
18798 } |
16020 |
18799 |
16021 if(search_expression_type->is_integer_type(L_type_symbol)) |
18800 if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) |
16022 { |
18801 { |
16023 |
18802 |
16024 function_name = (symbol_c*)(new pragma_c("__right")); |
18803 function_name = (symbol_c*)(new pragma_c("__right")); |
|
18804 |
|
18805 if (IN_type_symbol == NULL) |
|
18806 IN_type_symbol = last_type_symbol; |
16025 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
18807 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
18808 |
|
18809 if (L_type_symbol == NULL) |
|
18810 L_type_symbol = last_type_symbol; |
16026 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in) |
18811 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in) |
16027 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
18812 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
16028 break; |
18813 break; |
16029 |
18814 |
16030 } |
18815 } |
16051 |
18836 |
16052 { |
18837 { |
16053 identifier_c param_name("IN"); |
18838 identifier_c param_name("IN"); |
16054 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18839 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16055 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
18840 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
16056 |
18841 symbol_c *IN_type_symbol = NULL; |
16057 /* Get the value from a foo(<param_value>) style call */ |
18842 |
16058 if (IN_param_value == NULL) |
18843 /* Get the value from a foo(<param_value>) style call */ |
16059 IN_param_value = function_call_param_iterator.next(); |
18844 if (IN_param_value == NULL) |
16060 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
18845 IN_param_value = function_call_param_iterator.next(); |
16061 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
18846 if (IN_param_value != NULL) { |
16062 |
18847 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
16063 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
18848 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
18849 } |
|
18850 |
|
18851 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16064 { |
18852 { |
16065 |
18853 |
16066 { |
18854 { |
16067 identifier_c param_name("L"); |
18855 identifier_c param_name("L"); |
16068 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18856 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16069 symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); |
18857 symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); |
|
18858 symbol_c *L_type_symbol = NULL; |
16070 |
18859 |
16071 /* Get the value from a foo(<param_value>) style call */ |
18860 /* Get the value from a foo(<param_value>) style call */ |
16072 if (L_param_value == NULL) |
18861 if (L_param_value == NULL) |
16073 L_param_value = function_call_param_iterator.next(); |
18862 L_param_value = function_call_param_iterator.next(); |
16074 symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); |
18863 if (L_param_value != NULL) { |
16075 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; |
18864 L_type_symbol = search_expression_type->get_type(L_param_value); |
|
18865 last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; |
|
18866 } |
16076 |
18867 |
16077 if(search_expression_type->is_integer_type(L_type_symbol)) |
18868 if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) |
16078 { |
18869 { |
16079 |
18870 |
16080 { |
18871 { |
16081 identifier_c param_name("P"); |
18872 identifier_c param_name("P"); |
16082 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18873 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16083 symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); |
18874 symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); |
|
18875 symbol_c *P_type_symbol = NULL; |
16084 |
18876 |
16085 /* Get the value from a foo(<param_value>) style call */ |
18877 /* Get the value from a foo(<param_value>) style call */ |
16086 if (P_param_value == NULL) |
18878 if (P_param_value == NULL) |
16087 P_param_value = function_call_param_iterator.next(); |
18879 P_param_value = function_call_param_iterator.next(); |
16088 symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); |
18880 if (P_param_value != NULL) { |
16089 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; |
18881 P_type_symbol = search_expression_type->get_type(P_param_value); |
|
18882 last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; |
|
18883 } |
16090 |
18884 |
16091 if(search_expression_type->is_integer_type(P_type_symbol)) |
18885 if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) |
16092 { |
18886 { |
16093 |
18887 |
16094 function_name = (symbol_c*)(new pragma_c("__mid")); |
18888 function_name = (symbol_c*)(new pragma_c("__mid")); |
|
18889 |
|
18890 if (IN_type_symbol == NULL) |
|
18891 IN_type_symbol = last_type_symbol; |
16095 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
18892 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
18893 |
|
18894 if (L_type_symbol == NULL) |
|
18895 L_type_symbol = last_type_symbol; |
16096 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in) |
18896 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in) |
|
18897 |
|
18898 if (P_type_symbol == NULL) |
|
18899 P_type_symbol = last_type_symbol; |
16097 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in) |
18900 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in) |
16098 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
18901 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
16099 break; |
18902 break; |
16100 |
18903 |
16101 } |
18904 } |
16128 |
18931 |
16129 { |
18932 { |
16130 identifier_c param_name("IN1"); |
18933 identifier_c param_name("IN1"); |
16131 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18934 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16132 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
18935 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
18936 symbol_c *IN1_type_symbol = NULL; |
16133 |
18937 |
16134 /* Get the value from a foo(<param_value>) style call */ |
18938 /* Get the value from a foo(<param_value>) style call */ |
16135 if (IN1_param_value == NULL) |
18939 if (IN1_param_value == NULL) |
16136 IN1_param_value = function_call_param_iterator.next(); |
18940 IN1_param_value = function_call_param_iterator.next(); |
16137 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
18941 if (IN1_param_value != NULL) { |
16138 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
18942 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
16139 |
18943 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
16140 if(search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
18944 } |
|
18945 |
|
18946 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::date_type_name, last_type_symbol)) |
16141 { |
18947 { |
16142 |
18948 |
16143 { |
18949 { |
16144 identifier_c param_name("IN2"); |
18950 identifier_c param_name("IN2"); |
16145 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18951 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16146 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
18952 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
18953 symbol_c *IN2_type_symbol = NULL; |
16147 |
18954 |
16148 /* Get the value from a foo(<param_value>) style call */ |
18955 /* Get the value from a foo(<param_value>) style call */ |
16149 if (IN2_param_value == NULL) |
18956 if (IN2_param_value == NULL) |
16150 IN2_param_value = function_call_param_iterator.next(); |
18957 IN2_param_value = function_call_param_iterator.next(); |
16151 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
18958 if (IN2_param_value != NULL) { |
16152 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
18959 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
18960 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
18961 } |
16153 |
18962 |
16154 if(search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
18963 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::tod_type_name, last_type_symbol)) |
16155 { |
18964 { |
16156 |
18965 |
16157 function_name = (symbol_c*)(new pragma_c("__time_add")); |
18966 function_name = (symbol_c*)(new pragma_c("__time_add")); |
|
18967 |
|
18968 if (IN1_type_symbol == NULL) |
|
18969 IN1_type_symbol = last_type_symbol; |
16158 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
18970 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
18971 |
|
18972 if (IN2_type_symbol == NULL) |
|
18973 IN2_type_symbol = last_type_symbol; |
16159 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
18974 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16160 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
18975 symbol_c * return_type_symbol = &search_constant_type_c::dt_type_name; |
16161 break; |
18976 break; |
16162 |
18977 |
16163 } |
18978 } |
16166 ERROR; |
18981 ERROR; |
16167 } |
18982 } |
16168 |
18983 |
16169 } |
18984 } |
16170 |
18985 |
16171 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
18986 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16172 { |
18987 { |
16173 |
18988 |
16174 { |
18989 { |
16175 identifier_c param_name("IN2"); |
18990 identifier_c param_name("IN2"); |
16176 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
18991 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16177 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
18992 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
18993 symbol_c *IN2_type_symbol = NULL; |
16178 |
18994 |
16179 /* Get the value from a foo(<param_value>) style call */ |
18995 /* Get the value from a foo(<param_value>) style call */ |
16180 if (IN2_param_value == NULL) |
18996 if (IN2_param_value == NULL) |
16181 IN2_param_value = function_call_param_iterator.next(); |
18997 IN2_param_value = function_call_param_iterator.next(); |
16182 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
18998 if (IN2_param_value != NULL) { |
16183 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
18999 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
19000 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
19001 } |
16184 |
19002 |
16185 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
19003 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16186 { |
19004 { |
16187 |
19005 |
16188 function_name = (symbol_c*)(new pragma_c("__concat")); |
19006 function_name = (symbol_c*)(new pragma_c("__concat")); |
16189 |
19007 |
|
19008 if (nb_param < 2) |
|
19009 nb_param = 2; |
16190 char* nb_param_str = new char[10]; |
19010 char* nb_param_str = new char[10]; |
16191 sprintf(nb_param_str, "%d", nb_param); |
19011 sprintf(nb_param_str, "%d", nb_param); |
16192 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
19012 ADD_PARAM_LIST((symbol_c*)(new integer_c((const char *)nb_param_str)), (symbol_c*)(new int_type_name_c()), function_param_iterator_c::direction_in) |
|
19013 |
|
19014 if (IN1_type_symbol == NULL) |
|
19015 IN1_type_symbol = last_type_symbol; |
16193 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
19016 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
19017 |
|
19018 if (IN2_type_symbol == NULL) |
|
19019 IN2_type_symbol = last_type_symbol; |
16194 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
19020 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16195 |
19021 |
16196 int base_num = 3; |
19022 int base_num = 3; |
16197 symbol_c *param_value = NULL; |
19023 symbol_c *param_value = NULL; |
16198 do{ |
19024 do{ |
16242 |
19068 |
16243 { |
19069 { |
16244 identifier_c param_name("IN1"); |
19070 identifier_c param_name("IN1"); |
16245 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19071 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16246 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
19072 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
19073 symbol_c *IN1_type_symbol = NULL; |
16247 |
19074 |
16248 /* Get the value from a foo(<param_value>) style call */ |
19075 /* Get the value from a foo(<param_value>) style call */ |
16249 if (IN1_param_value == NULL) |
19076 if (IN1_param_value == NULL) |
16250 IN1_param_value = function_call_param_iterator.next(); |
19077 IN1_param_value = function_call_param_iterator.next(); |
16251 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
19078 if (IN1_param_value != NULL) { |
16252 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
19079 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
16253 |
19080 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
16254 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
19081 } |
|
19082 |
|
19083 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16255 { |
19084 { |
16256 |
19085 |
16257 { |
19086 { |
16258 identifier_c param_name("IN2"); |
19087 identifier_c param_name("IN2"); |
16259 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19088 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16260 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
19089 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
19090 symbol_c *IN2_type_symbol = NULL; |
16261 |
19091 |
16262 /* Get the value from a foo(<param_value>) style call */ |
19092 /* Get the value from a foo(<param_value>) style call */ |
16263 if (IN2_param_value == NULL) |
19093 if (IN2_param_value == NULL) |
16264 IN2_param_value = function_call_param_iterator.next(); |
19094 IN2_param_value = function_call_param_iterator.next(); |
16265 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
19095 if (IN2_param_value != NULL) { |
16266 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
19096 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
19097 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
19098 } |
16267 |
19099 |
16268 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
19100 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16269 { |
19101 { |
16270 |
19102 |
16271 { |
19103 { |
16272 identifier_c param_name("P"); |
19104 identifier_c param_name("P"); |
16273 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19105 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16274 symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); |
19106 symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); |
|
19107 symbol_c *P_type_symbol = NULL; |
16275 |
19108 |
16276 /* Get the value from a foo(<param_value>) style call */ |
19109 /* Get the value from a foo(<param_value>) style call */ |
16277 if (P_param_value == NULL) |
19110 if (P_param_value == NULL) |
16278 P_param_value = function_call_param_iterator.next(); |
19111 P_param_value = function_call_param_iterator.next(); |
16279 symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); |
19112 if (P_param_value != NULL) { |
16280 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; |
19113 P_type_symbol = search_expression_type->get_type(P_param_value); |
|
19114 last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; |
|
19115 } |
16281 |
19116 |
16282 if(search_expression_type->is_integer_type(P_type_symbol)) |
19117 if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) |
16283 { |
19118 { |
16284 |
19119 |
16285 function_name = (symbol_c*)(new pragma_c("__insert")); |
19120 function_name = (symbol_c*)(new pragma_c("__insert")); |
|
19121 |
|
19122 if (IN1_type_symbol == NULL) |
|
19123 IN1_type_symbol = last_type_symbol; |
16286 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
19124 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
19125 |
|
19126 if (IN2_type_symbol == NULL) |
|
19127 IN2_type_symbol = last_type_symbol; |
16287 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
19128 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
|
19129 |
|
19130 if (P_type_symbol == NULL) |
|
19131 P_type_symbol = last_type_symbol; |
16288 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in) |
19132 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in) |
16289 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
19133 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
16290 break; |
19134 break; |
16291 |
19135 |
16292 } |
19136 } |
16319 |
19163 |
16320 { |
19164 { |
16321 identifier_c param_name("IN"); |
19165 identifier_c param_name("IN"); |
16322 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19166 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16323 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
19167 symbol_c *IN_param_value = function_call_param_iterator.search(¶m_name); |
16324 |
19168 symbol_c *IN_type_symbol = NULL; |
16325 /* Get the value from a foo(<param_value>) style call */ |
19169 |
16326 if (IN_param_value == NULL) |
19170 /* Get the value from a foo(<param_value>) style call */ |
16327 IN_param_value = function_call_param_iterator.next(); |
19171 if (IN_param_value == NULL) |
16328 symbol_c *IN_type_symbol = search_expression_type->get_type(IN_param_value); |
19172 IN_param_value = function_call_param_iterator.next(); |
16329 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
19173 if (IN_param_value != NULL) { |
16330 |
19174 IN_type_symbol = search_expression_type->get_type(IN_param_value); |
16331 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
19175 last_type_symbol = last_type_symbol && IN_type_symbol && search_expression_type->is_same_type(IN_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN_type_symbol, last_type_symbol) : IN_type_symbol ; |
|
19176 } |
|
19177 |
|
19178 if(IN_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16332 { |
19179 { |
16333 |
19180 |
16334 { |
19181 { |
16335 identifier_c param_name("L"); |
19182 identifier_c param_name("L"); |
16336 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19183 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16337 symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); |
19184 symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); |
|
19185 symbol_c *L_type_symbol = NULL; |
16338 |
19186 |
16339 /* Get the value from a foo(<param_value>) style call */ |
19187 /* Get the value from a foo(<param_value>) style call */ |
16340 if (L_param_value == NULL) |
19188 if (L_param_value == NULL) |
16341 L_param_value = function_call_param_iterator.next(); |
19189 L_param_value = function_call_param_iterator.next(); |
16342 symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); |
19190 if (L_param_value != NULL) { |
16343 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; |
19191 L_type_symbol = search_expression_type->get_type(L_param_value); |
|
19192 last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; |
|
19193 } |
16344 |
19194 |
16345 if(search_expression_type->is_integer_type(L_type_symbol)) |
19195 if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) |
16346 { |
19196 { |
16347 |
19197 |
16348 { |
19198 { |
16349 identifier_c param_name("P"); |
19199 identifier_c param_name("P"); |
16350 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19200 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16351 symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); |
19201 symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); |
|
19202 symbol_c *P_type_symbol = NULL; |
16352 |
19203 |
16353 /* Get the value from a foo(<param_value>) style call */ |
19204 /* Get the value from a foo(<param_value>) style call */ |
16354 if (P_param_value == NULL) |
19205 if (P_param_value == NULL) |
16355 P_param_value = function_call_param_iterator.next(); |
19206 P_param_value = function_call_param_iterator.next(); |
16356 symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); |
19207 if (P_param_value != NULL) { |
16357 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; |
19208 P_type_symbol = search_expression_type->get_type(P_param_value); |
|
19209 last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; |
|
19210 } |
16358 |
19211 |
16359 if(search_expression_type->is_integer_type(P_type_symbol)) |
19212 if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) |
16360 { |
19213 { |
16361 |
19214 |
16362 function_name = (symbol_c*)(new pragma_c("__delete")); |
19215 function_name = (symbol_c*)(new pragma_c("__delete")); |
|
19216 |
|
19217 if (IN_type_symbol == NULL) |
|
19218 IN_type_symbol = last_type_symbol; |
16363 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
19219 ADD_PARAM_LIST(IN_param_value, IN_type_symbol, function_param_iterator_c::direction_in) |
|
19220 |
|
19221 if (L_type_symbol == NULL) |
|
19222 L_type_symbol = last_type_symbol; |
16364 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in) |
19223 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in) |
|
19224 |
|
19225 if (P_type_symbol == NULL) |
|
19226 P_type_symbol = last_type_symbol; |
16365 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in) |
19227 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in) |
16366 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
19228 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
16367 break; |
19229 break; |
16368 |
19230 |
16369 } |
19231 } |
16396 |
19258 |
16397 { |
19259 { |
16398 identifier_c param_name("IN1"); |
19260 identifier_c param_name("IN1"); |
16399 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19261 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16400 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
19262 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
19263 symbol_c *IN1_type_symbol = NULL; |
16401 |
19264 |
16402 /* Get the value from a foo(<param_value>) style call */ |
19265 /* Get the value from a foo(<param_value>) style call */ |
16403 if (IN1_param_value == NULL) |
19266 if (IN1_param_value == NULL) |
16404 IN1_param_value = function_call_param_iterator.next(); |
19267 IN1_param_value = function_call_param_iterator.next(); |
16405 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
19268 if (IN1_param_value != NULL) { |
16406 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
19269 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
16407 |
19270 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
16408 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
19271 } |
|
19272 |
|
19273 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16409 { |
19274 { |
16410 |
19275 |
16411 { |
19276 { |
16412 identifier_c param_name("IN2"); |
19277 identifier_c param_name("IN2"); |
16413 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19278 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16414 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
19279 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
19280 symbol_c *IN2_type_symbol = NULL; |
16415 |
19281 |
16416 /* Get the value from a foo(<param_value>) style call */ |
19282 /* Get the value from a foo(<param_value>) style call */ |
16417 if (IN2_param_value == NULL) |
19283 if (IN2_param_value == NULL) |
16418 IN2_param_value = function_call_param_iterator.next(); |
19284 IN2_param_value = function_call_param_iterator.next(); |
16419 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
19285 if (IN2_param_value != NULL) { |
16420 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
19286 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
19287 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
19288 } |
16421 |
19289 |
16422 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
19290 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16423 { |
19291 { |
16424 |
19292 |
16425 { |
19293 { |
16426 identifier_c param_name("L"); |
19294 identifier_c param_name("L"); |
16427 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19295 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16428 symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); |
19296 symbol_c *L_param_value = function_call_param_iterator.search(¶m_name); |
|
19297 symbol_c *L_type_symbol = NULL; |
16429 |
19298 |
16430 /* Get the value from a foo(<param_value>) style call */ |
19299 /* Get the value from a foo(<param_value>) style call */ |
16431 if (L_param_value == NULL) |
19300 if (L_param_value == NULL) |
16432 L_param_value = function_call_param_iterator.next(); |
19301 L_param_value = function_call_param_iterator.next(); |
16433 symbol_c *L_type_symbol = search_expression_type->get_type(L_param_value); |
19302 if (L_param_value != NULL) { |
16434 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; |
19303 L_type_symbol = search_expression_type->get_type(L_param_value); |
|
19304 last_type_symbol = last_type_symbol && L_type_symbol && search_expression_type->is_same_type(L_type_symbol, last_type_symbol) ? search_expression_type->common_type(L_type_symbol, last_type_symbol) : L_type_symbol ; |
|
19305 } |
16435 |
19306 |
16436 if(search_expression_type->is_integer_type(L_type_symbol)) |
19307 if(L_type_symbol == NULL || search_expression_type->is_integer_type(L_type_symbol)) |
16437 { |
19308 { |
16438 |
19309 |
16439 { |
19310 { |
16440 identifier_c param_name("P"); |
19311 identifier_c param_name("P"); |
16441 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19312 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16442 symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); |
19313 symbol_c *P_param_value = function_call_param_iterator.search(¶m_name); |
|
19314 symbol_c *P_type_symbol = NULL; |
16443 |
19315 |
16444 /* Get the value from a foo(<param_value>) style call */ |
19316 /* Get the value from a foo(<param_value>) style call */ |
16445 if (P_param_value == NULL) |
19317 if (P_param_value == NULL) |
16446 P_param_value = function_call_param_iterator.next(); |
19318 P_param_value = function_call_param_iterator.next(); |
16447 symbol_c *P_type_symbol = search_expression_type->get_type(P_param_value); |
19319 if (P_param_value != NULL) { |
16448 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; |
19320 P_type_symbol = search_expression_type->get_type(P_param_value); |
|
19321 last_type_symbol = last_type_symbol && P_type_symbol && search_expression_type->is_same_type(P_type_symbol, last_type_symbol) ? search_expression_type->common_type(P_type_symbol, last_type_symbol) : P_type_symbol ; |
|
19322 } |
16449 |
19323 |
16450 if(search_expression_type->is_integer_type(P_type_symbol)) |
19324 if(P_type_symbol == NULL || search_expression_type->is_integer_type(P_type_symbol)) |
16451 { |
19325 { |
16452 |
19326 |
16453 function_name = (symbol_c*)(new pragma_c("__replace")); |
19327 function_name = (symbol_c*)(new pragma_c("__replace")); |
|
19328 |
|
19329 if (IN1_type_symbol == NULL) |
|
19330 IN1_type_symbol = last_type_symbol; |
16454 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
19331 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
19332 |
|
19333 if (IN2_type_symbol == NULL) |
|
19334 IN2_type_symbol = last_type_symbol; |
16455 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
19335 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
|
19336 |
|
19337 if (L_type_symbol == NULL) |
|
19338 L_type_symbol = last_type_symbol; |
16456 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in) |
19339 ADD_PARAM_LIST(L_param_value, L_type_symbol, function_param_iterator_c::direction_in) |
|
19340 |
|
19341 if (P_type_symbol == NULL) |
|
19342 P_type_symbol = last_type_symbol; |
16457 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in) |
19343 ADD_PARAM_LIST(P_param_value, P_type_symbol, function_param_iterator_c::direction_in) |
16458 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
19344 symbol_c * return_type_symbol = &search_constant_type_c::string_type_name; |
16459 break; |
19345 break; |
16460 |
19346 |
16461 } |
19347 } |
16494 |
19380 |
16495 { |
19381 { |
16496 identifier_c param_name("IN1"); |
19382 identifier_c param_name("IN1"); |
16497 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19383 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16498 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
19384 symbol_c *IN1_param_value = function_call_param_iterator.search(¶m_name); |
|
19385 symbol_c *IN1_type_symbol = NULL; |
16499 |
19386 |
16500 /* Get the value from a foo(<param_value>) style call */ |
19387 /* Get the value from a foo(<param_value>) style call */ |
16501 if (IN1_param_value == NULL) |
19388 if (IN1_param_value == NULL) |
16502 IN1_param_value = function_call_param_iterator.next(); |
19389 IN1_param_value = function_call_param_iterator.next(); |
16503 symbol_c *IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
19390 if (IN1_param_value != NULL) { |
16504 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
19391 IN1_type_symbol = search_expression_type->get_type(IN1_param_value); |
16505 |
19392 last_type_symbol = last_type_symbol && IN1_type_symbol && search_expression_type->is_same_type(IN1_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN1_type_symbol, last_type_symbol) : IN1_type_symbol ; |
16506 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
19393 } |
|
19394 |
|
19395 if(IN1_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16507 { |
19396 { |
16508 |
19397 |
16509 { |
19398 { |
16510 identifier_c param_name("IN2"); |
19399 identifier_c param_name("IN2"); |
16511 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
19400 /* Get the value from a foo(<param_name> = <param_value>) style call */ |
16512 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
19401 symbol_c *IN2_param_value = function_call_param_iterator.search(¶m_name); |
|
19402 symbol_c *IN2_type_symbol = NULL; |
16513 |
19403 |
16514 /* Get the value from a foo(<param_value>) style call */ |
19404 /* Get the value from a foo(<param_value>) style call */ |
16515 if (IN2_param_value == NULL) |
19405 if (IN2_param_value == NULL) |
16516 IN2_param_value = function_call_param_iterator.next(); |
19406 IN2_param_value = function_call_param_iterator.next(); |
16517 symbol_c *IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
19407 if (IN2_param_value != NULL) { |
16518 last_type_symbol = last_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
19408 IN2_type_symbol = search_expression_type->get_type(IN2_param_value); |
|
19409 last_type_symbol = last_type_symbol && IN2_type_symbol && search_expression_type->is_same_type(IN2_type_symbol, last_type_symbol) ? search_expression_type->common_type(IN2_type_symbol, last_type_symbol) : IN2_type_symbol ; |
|
19410 } |
16519 |
19411 |
16520 if(search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
19412 if(IN2_type_symbol == NULL || search_expression_type->is_same_type(&search_constant_type_c::string_type_name, last_type_symbol)) |
16521 { |
19413 { |
16522 |
19414 |
16523 function_name = (symbol_c*)(new pragma_c("__find")); |
19415 function_name = (symbol_c*)(new pragma_c("__find")); |
|
19416 |
|
19417 if (IN1_type_symbol == NULL) |
|
19418 IN1_type_symbol = last_type_symbol; |
16524 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
19419 ADD_PARAM_LIST(IN1_param_value, IN1_type_symbol, function_param_iterator_c::direction_in) |
|
19420 |
|
19421 if (IN2_type_symbol == NULL) |
|
19422 IN2_type_symbol = last_type_symbol; |
16525 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
19423 ADD_PARAM_LIST(IN2_param_value, IN2_type_symbol, function_param_iterator_c::direction_in) |
16526 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
19424 symbol_c * return_type_symbol = &search_constant_type_c::int_type_name; |
16527 break; |
19425 break; |
16528 |
19426 |
16529 } |
19427 } |