author | mjsousa |
Tue, 20 May 2014 08:24:25 +0100 | |
changeset 891 | 58109ca87903 |
parent 858 | c5f145364a4f |
child 909 | 8b2a31dea131 |
permissions | -rw-r--r-- |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
1 |
/* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
2 |
* matiec - a compiler for the programming languages defined in IEC 61131-3 |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
3 |
* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
4 |
* Copyright (C) 2003-2012 Mario de Sousa (msousa@fe.up.pt) |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
5 |
* Copyright (C) 2007-2011 Laurent Bessard and Edouard Tisserant |
676
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
6 |
* Copyright (C) 2012 Manuele Conti (conti.ma@alice.it) |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
7 |
* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
8 |
* This program is free software: you can redistribute it and/or modify |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
9 |
* it under the terms of the GNU General Public License as published by |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
10 |
* the Free Software Foundation, either version 3 of the License, or |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
11 |
* (at your option) any later version. |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
12 |
* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
13 |
* This program is distributed in the hope that it will be useful, |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
16 |
* GNU General Public License for more details. |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
17 |
* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
18 |
* You should have received a copy of the GNU General Public License |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
19 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
20 |
* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
21 |
* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
22 |
* This code is made available on the understanding that it will not be |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
23 |
* used in safety-critical situations without a full and competent review. |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
24 |
*/ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
25 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
26 |
/* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
27 |
* An IEC 61131-3 compiler. |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
28 |
* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
29 |
* Based on the |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
30 |
* FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10) |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
31 |
* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
32 |
*/ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
33 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
34 |
/* Determine the characteristics of a specific data type |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
35 |
* e.g., is it an enumeration, is it an array, is it ANY_INT, etc... |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
36 |
* |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
37 |
* The methods of this class may be passed either: |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
38 |
* - a data type declaration symbol_c, |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
39 |
* OR |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
40 |
* - the name of a data type (identifier_c) |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
41 |
* In this case, we shall first serach for the basetype declaration using search_base_type_c, and then |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
42 |
* run the normal process. |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
43 |
*/ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
44 |
#include "absyntax_utils.hh" |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
45 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
46 |
#include "../main.hh" // required for ERROR() and ERROR_MSG() macros. |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
47 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
48 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
49 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
50 |
#include <typeinfo> // required for typeid |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
51 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
52 |
|
727
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
53 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
54 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
55 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
56 |
/***** *****/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
57 |
/***** *****/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
58 |
/***** Some helper classes *****/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
59 |
/***** *****/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
60 |
/***** *****/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
61 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
62 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
63 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
64 |
|
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
65 |
/* Return the identifier (name) of a datatype, typically declared in a TYPE .. END_TYPE declaration */ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
66 |
class get_datatype_id_c: null_visitor_c { |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
67 |
private: |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
68 |
static get_datatype_id_c *singleton; |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
69 |
|
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
70 |
public: |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
71 |
static symbol_c *get_id(symbol_c *symbol) { |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
72 |
if (NULL == singleton) singleton = new get_datatype_id_c(); |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
73 |
if (NULL == singleton) ERROR; |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
74 |
return (symbol_c *)symbol->accept(*singleton); |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
75 |
} |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
76 |
|
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
77 |
protected: |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
78 |
/********************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
79 |
/* B 1.3.3 - Derived data types */ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
80 |
/********************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
81 |
/* simple_type_name ':' simple_spec_init */ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
82 |
void *visit(simple_type_declaration_c *symbol) {return symbol->simple_type_name;} |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
83 |
/* subrange_type_name ':' subrange_spec_init */ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
84 |
void *visit(subrange_type_declaration_c *symbol) {return symbol->subrange_type_name;} |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
85 |
/* enumerated_type_name ':' enumerated_spec_init */ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
86 |
void *visit(enumerated_type_declaration_c *symbol) {return symbol->enumerated_type_name;} |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
87 |
/* identifier ':' array_spec_init */ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
88 |
void *visit(array_type_declaration_c *symbol) {return symbol->identifier;} |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
89 |
/* structure_type_name ':' structure_specification */ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
90 |
void *visit(structure_type_declaration_c *symbol) {return symbol->structure_type_name;} |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
91 |
/* string_type_name ':' elementary_string_type_name string_type_declaration_size string_type_declaration_init */ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
92 |
void *visit(string_type_declaration_c *symbol) {return symbol->string_type_name;} |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
93 |
|
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
94 |
/*****************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
95 |
/* B 1.5.2 - Function Blocks */ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
96 |
/*****************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
97 |
/* FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations function_block_body END_FUNCTION_BLOCK */ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
98 |
void *visit(function_block_declaration_c *symbol) {return symbol->fblock_name;} |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
99 |
}; // get_datatype_id_c |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
100 |
|
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
101 |
get_datatype_id_c *get_datatype_id_c::singleton = NULL; |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
102 |
|
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
103 |
|
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
104 |
|
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
105 |
|
778
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
106 |
/***********************************************************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
107 |
/***********************************************************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
108 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
109 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
110 |
/* A small helper class, to transform elementary data type to string. |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
111 |
* this allows us to generate more relevant error messages... |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
112 |
*/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
113 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
114 |
class get_datatype_id_str_c: public null_visitor_c { |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
115 |
protected: |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
116 |
get_datatype_id_str_c(void) {}; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
117 |
~get_datatype_id_str_c(void) {}; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
118 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
119 |
private: |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
120 |
/* singleton class! */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
121 |
static get_datatype_id_str_c *singleton; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
122 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
123 |
public: |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
124 |
static const char *get_id_str(symbol_c *symbol) { |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
125 |
if (NULL == singleton) singleton = new get_datatype_id_str_c; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
126 |
if (NULL == singleton) ERROR; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
127 |
const char *res = (const char *)symbol->accept(*singleton); |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
128 |
if (NULL == res) ERROR; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
129 |
return res; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
130 |
} |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
131 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
132 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
133 |
/*************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
134 |
/* B.1 - Common elements */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
135 |
/*************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
136 |
/*******************************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
137 |
/* B 1.1 - Letters, digits and identifiers */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
138 |
/*******************************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
139 |
void *visit(identifier_c *symbol) {return (void *)symbol->value;}; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
140 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
141 |
/***********************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
142 |
/* B 1.3.1 - Elementary Data Types */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
143 |
/***********************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
144 |
void *visit(time_type_name_c *symbol) {return (void *)"TIME"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
145 |
void *visit(bool_type_name_c *symbol) {return (void *)"BOOL"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
146 |
void *visit(sint_type_name_c *symbol) {return (void *)"SINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
147 |
void *visit(int_type_name_c *symbol) {return (void *)"INT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
148 |
void *visit(dint_type_name_c *symbol) {return (void *)"DINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
149 |
void *visit(lint_type_name_c *symbol) {return (void *)"LINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
150 |
void *visit(usint_type_name_c *symbol) {return (void *)"USINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
151 |
void *visit(uint_type_name_c *symbol) {return (void *)"UINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
152 |
void *visit(udint_type_name_c *symbol) {return (void *)"UDINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
153 |
void *visit(ulint_type_name_c *symbol) {return (void *)"ULINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
154 |
void *visit(real_type_name_c *symbol) {return (void *)"REAL"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
155 |
void *visit(lreal_type_name_c *symbol) {return (void *)"LREAL"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
156 |
void *visit(date_type_name_c *symbol) {return (void *)"DATE"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
157 |
void *visit(tod_type_name_c *symbol) {return (void *)"TOD"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
158 |
void *visit(dt_type_name_c *symbol) {return (void *)"DT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
159 |
void *visit(byte_type_name_c *symbol) {return (void *)"BYTE"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
160 |
void *visit(word_type_name_c *symbol) {return (void *)"WORD"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
161 |
void *visit(lword_type_name_c *symbol) {return (void *)"LWORD"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
162 |
void *visit(dword_type_name_c *symbol) {return (void *)"DWORD"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
163 |
void *visit(string_type_name_c *symbol) {return (void *)"STRING"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
164 |
void *visit(wstring_type_name_c *symbol) {return (void *)"WSTRING"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
165 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
166 |
void *visit(safetime_type_name_c *symbol) {return (void *)"SAFETIME"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
167 |
void *visit(safebool_type_name_c *symbol) {return (void *)"SAFEBOOL"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
168 |
void *visit(safesint_type_name_c *symbol) {return (void *)"SAFESINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
169 |
void *visit(safeint_type_name_c *symbol) {return (void *)"SAFEINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
170 |
void *visit(safedint_type_name_c *symbol) {return (void *)"SAFEDINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
171 |
void *visit(safelint_type_name_c *symbol) {return (void *)"SAFELINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
172 |
void *visit(safeusint_type_name_c *symbol) {return (void *)"SAFEUSINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
173 |
void *visit(safeuint_type_name_c *symbol) {return (void *)"SAFEUINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
174 |
void *visit(safeudint_type_name_c *symbol) {return (void *)"SAFEUDINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
175 |
void *visit(safeulint_type_name_c *symbol) {return (void *)"SAFEULINT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
176 |
void *visit(safereal_type_name_c *symbol) {return (void *)"SAFEREAL"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
177 |
void *visit(safelreal_type_name_c *symbol) {return (void *)"SAFELREAL"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
178 |
void *visit(safedate_type_name_c *symbol) {return (void *)"SAFEDATE"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
179 |
void *visit(safetod_type_name_c *symbol) {return (void *)"SAFETOD"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
180 |
void *visit(safedt_type_name_c *symbol) {return (void *)"SAFEDT"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
181 |
void *visit(safebyte_type_name_c *symbol) {return (void *)"SAFEBYTE"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
182 |
void *visit(safeword_type_name_c *symbol) {return (void *)"SAFEWORD"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
183 |
void *visit(safelword_type_name_c *symbol) {return (void *)"SAFELWORD"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
184 |
void *visit(safedword_type_name_c *symbol) {return (void *)"SAFEDWORD"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
185 |
void *visit(safestring_type_name_c *symbol) {return (void *)"SAFESTRING"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
186 |
void *visit(safewstring_type_name_c *symbol) {return (void *)"SAFEWSTRING"; }; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
187 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
188 |
/********************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
189 |
/* B 1.3.3 - Derived data types */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
190 |
/********************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
191 |
/* simple_type_name ':' simple_spec_init */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
192 |
void *visit(simple_type_declaration_c *symbol) {return symbol->simple_type_name->accept(*this);} |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
193 |
/* subrange_type_name ':' subrange_spec_init */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
194 |
void *visit(subrange_type_declaration_c *symbol) {return symbol->subrange_type_name->accept(*this);} |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
195 |
/* enumerated_type_name ':' enumerated_spec_init */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
196 |
void *visit(enumerated_type_declaration_c *symbol) {return symbol->enumerated_type_name->accept(*this);} |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
197 |
/* identifier ':' array_spec_init */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
198 |
void *visit(array_type_declaration_c *symbol) {return symbol->identifier->accept(*this);} |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
199 |
/* structure_type_name ':' structure_specification */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
200 |
void *visit(structure_type_declaration_c *symbol) {return symbol->structure_type_name->accept(*this);} |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
201 |
/* string_type_name ':' elementary_string_type_name string_type_declaration_size string_type_declaration_init */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
202 |
void *visit(string_type_declaration_c *symbol) {return symbol->string_type_name->accept(*this);} |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
203 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
204 |
/*****************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
205 |
/* B 1.5.2 - Function Blocks */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
206 |
/*****************************/ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
207 |
/* FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations function_block_body END_FUNCTION_BLOCK */ |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
208 |
void *visit(function_block_declaration_c *symbol) {return symbol->fblock_name->accept(*this);} |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
209 |
}; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
210 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
211 |
get_datatype_id_str_c *get_datatype_id_str_c::singleton = NULL; |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
212 |
|
727
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
213 |
|
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
214 |
|
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
215 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
216 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
217 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
218 |
/***** *****/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
219 |
/***** *****/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
220 |
/***** GET_DATATYPE_INFO_C *****/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
221 |
/***** *****/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
222 |
/***** *****/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
223 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
224 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
225 |
/**********************************************************/ |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
226 |
|
778
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
227 |
const char *get_datatype_info_c::get_id_str(symbol_c *datatype) { |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
228 |
return get_datatype_id_str_c::get_id_str(datatype); |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
229 |
} |
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
230 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
231 |
|
44e02a88f1e7
moved class to obtain datatype name (in char *) to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
727
diff
changeset
|
232 |
symbol_c *get_datatype_info_c::get_id(symbol_c *datatype) { |
727
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
233 |
return get_datatype_id_c::get_id(datatype); |
db5881e6facd
Add method to determine the id (name) of a datatype.
Mario de Sousa <msousa@fe.up.pt>
parents:
718
diff
changeset
|
234 |
} |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
235 |
|
676
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
236 |
|
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
237 |
bool get_datatype_info_c::is_type_equal(symbol_c *first_type, symbol_c *second_type) { |
695 | 238 |
if ((NULL == first_type) || (NULL == second_type)) {return false;} |
239 |
if (typeid(* first_type) == typeid(invalid_type_name_c)) {return false;} |
|
240 |
if (typeid(*second_type) == typeid(invalid_type_name_c)) {return false;} |
|
676
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
241 |
|
695 | 242 |
if ((get_datatype_info_c::is_ANY_ELEMENTARY(first_type)) && |
243 |
(typeid(*first_type) == typeid(*second_type))) {return true;} |
|
244 |
/* ANY_DERIVED */ |
|
245 |
return (first_type == second_type); |
|
676
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
246 |
} |
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
247 |
|
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
248 |
|
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
249 |
|
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
250 |
bool get_datatype_info_c::is_type_valid(symbol_c *type) { |
695 | 251 |
if (NULL == type) {return false;} |
252 |
if (typeid(*type) == typeid(invalid_type_name_c)) {return false;} |
|
676
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
253 |
return true; |
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
254 |
} |
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
255 |
|
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
256 |
|
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
257 |
|
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
258 |
|
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
259 |
|
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
260 |
|
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
261 |
bool get_datatype_info_c::is_sfc_initstep(symbol_c *type_symbol) { |
718
a9f8cc778444
Make search_base_type_c a singleton!
Mario de Sousa <msousa@fe.up.pt>
parents:
699
diff
changeset
|
262 |
symbol_c *type_decl = search_base_type_c::get_basetype_decl(type_symbol); |
832
8cd104e483c6
Allow get_datatype_info_c to be called with NULL parameters.
mjsousa
parents:
778
diff
changeset
|
263 |
if (NULL == type_decl) {return false;} |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
264 |
if (typeid(*type_decl) == typeid(initial_step_c)) {return true;} /* INITIAL_STEP step_name ':' action_association_list END_STEP */ /* A pseudo data type! */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
265 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
266 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
267 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
268 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
269 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
270 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
271 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
272 |
bool get_datatype_info_c::is_sfc_step(symbol_c *type_symbol) { |
718
a9f8cc778444
Make search_base_type_c a singleton!
Mario de Sousa <msousa@fe.up.pt>
parents:
699
diff
changeset
|
273 |
symbol_c *type_decl = search_base_type_c::get_basetype_decl(type_symbol); |
832
8cd104e483c6
Allow get_datatype_info_c to be called with NULL parameters.
mjsousa
parents:
778
diff
changeset
|
274 |
if (NULL == type_decl) {return false;} |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
275 |
if (typeid(*type_decl) == typeid(initial_step_c)) {return true;} /* INITIAL_STEP step_name ':' action_association_list END_STEP */ /* A pseudo data type! */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
276 |
if (typeid(*type_decl) == typeid( step_c)) {return true;} /* STEP step_name ':' action_association_list END_STEP */ /* A pseudo data type! */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
277 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
278 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
279 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
280 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
281 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
282 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
283 |
bool get_datatype_info_c::is_function_block(symbol_c *type_symbol) { |
718
a9f8cc778444
Make search_base_type_c a singleton!
Mario de Sousa <msousa@fe.up.pt>
parents:
699
diff
changeset
|
284 |
symbol_c *type_decl = search_base_type_c::get_basetype_decl(type_symbol); |
832
8cd104e483c6
Allow get_datatype_info_c to be called with NULL parameters.
mjsousa
parents:
778
diff
changeset
|
285 |
if (NULL == type_decl) {return false;} |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
286 |
if (typeid(*type_decl) == typeid(function_block_declaration_c)) {return true;} /* FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations function_block_body END_FUNCTION_BLOCK */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
287 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
288 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
289 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
290 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
291 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
292 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
293 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
294 |
bool get_datatype_info_c::is_subrange(symbol_c *type_symbol) { |
858
c5f145364a4f
Fix get_datatype_info_c::is_subrange(), which did not work when using base type! (we now use get_equivtype() instead of get_base_type() )
mjsousa
parents:
832
diff
changeset
|
295 |
symbol_c *type_decl = search_base_type_c::get_equivtype_decl(type_symbol); /* NOTE: do NOT call search_base_type_c !! */ |
832
8cd104e483c6
Allow get_datatype_info_c to be called with NULL parameters.
mjsousa
parents:
778
diff
changeset
|
296 |
if (NULL == type_decl) {return false;} |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
297 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
298 |
if (typeid(*type_decl) == typeid(subrange_type_declaration_c)) {return true;} /* subrange_type_name ':' subrange_spec_init */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
299 |
if (typeid(*type_decl) == typeid(subrange_spec_init_c)) {return true;} /* subrange_specification ASSIGN signed_integer */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
300 |
if (typeid(*type_decl) == typeid(subrange_specification_c)) {return true;} /* integer_type_name '(' subrange')' */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
301 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
302 |
if (typeid(*type_decl) == typeid(subrange_c)) {ERROR;} /* signed_integer DOTDOT signed_integer */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
303 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
304 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
305 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
306 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
307 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
308 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
309 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
310 |
bool get_datatype_info_c::is_enumerated(symbol_c *type_symbol) { |
718
a9f8cc778444
Make search_base_type_c a singleton!
Mario de Sousa <msousa@fe.up.pt>
parents:
699
diff
changeset
|
311 |
symbol_c *type_decl = search_base_type_c::get_basetype_decl(type_symbol); |
832
8cd104e483c6
Allow get_datatype_info_c to be called with NULL parameters.
mjsousa
parents:
778
diff
changeset
|
312 |
if (NULL == type_decl) {return false;} |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
313 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
314 |
if (typeid(*type_decl) == typeid(enumerated_type_declaration_c)) {return true;} /* enumerated_type_name ':' enumerated_spec_init */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
315 |
if (typeid(*type_decl) == typeid(enumerated_spec_init_c)) {return true;} /* enumerated_specification ASSIGN enumerated_value */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
316 |
if (typeid(*type_decl) == typeid(enumerated_value_list_c)) {return true;} /* enumerated_value_list ',' enumerated_value */ /* once we change the way we handle enums, this will probably become an ERROR! */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
317 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
318 |
if (typeid(*type_decl) == typeid(enumerated_value_c)) {ERROR;} /* enumerated_type_name '#' identifier */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
319 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
320 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
321 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
322 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
323 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
324 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
325 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
326 |
bool get_datatype_info_c::is_array(symbol_c *type_symbol) { |
718
a9f8cc778444
Make search_base_type_c a singleton!
Mario de Sousa <msousa@fe.up.pt>
parents:
699
diff
changeset
|
327 |
symbol_c *type_decl = search_base_type_c::get_basetype_decl(type_symbol); |
832
8cd104e483c6
Allow get_datatype_info_c to be called with NULL parameters.
mjsousa
parents:
778
diff
changeset
|
328 |
if (NULL == type_decl) {return false;} |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
329 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
330 |
if (typeid(*type_decl) == typeid(array_type_declaration_c)) {return true;} /* identifier ':' array_spec_init */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
331 |
if (typeid(*type_decl) == typeid(array_spec_init_c)) {return true;} /* array_specification [ASSIGN array_initialization} */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
332 |
if (typeid(*type_decl) == typeid(array_specification_c)) {return true;} /* ARRAY '[' array_subrange_list ']' OF non_generic_type_name */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
333 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
334 |
if (typeid(*type_decl) == typeid(array_subrange_list_c)) {ERROR;} /* array_subrange_list ',' subrange */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
335 |
if (typeid(*type_decl) == typeid(array_initial_elements_list_c)) {ERROR;} /* array_initialization: '[' array_initial_elements_list ']' */ /* array_initial_elements_list ',' array_initial_elements */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
336 |
if (typeid(*type_decl) == typeid(array_initial_elements_c)) {ERROR;} /* integer '(' [array_initial_element] ')' */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
337 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
338 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
339 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
340 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
341 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
342 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
343 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
344 |
bool get_datatype_info_c::is_structure(symbol_c *type_symbol) { |
718
a9f8cc778444
Make search_base_type_c a singleton!
Mario de Sousa <msousa@fe.up.pt>
parents:
699
diff
changeset
|
345 |
symbol_c *type_decl = search_base_type_c::get_basetype_decl(type_symbol); |
832
8cd104e483c6
Allow get_datatype_info_c to be called with NULL parameters.
mjsousa
parents:
778
diff
changeset
|
346 |
if (NULL == type_decl) {return false;} |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
347 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
348 |
if (typeid(*type_decl) == typeid(structure_type_declaration_c)) {return true;} /* structure_type_name ':' structure_specification */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
349 |
if (typeid(*type_decl) == typeid(initialized_structure_c)) {return true;} /* structure_type_name ASSIGN structure_initialization */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
350 |
if (typeid(*type_decl) == typeid(structure_element_declaration_list_c)) {return true;} /* structure_declaration: STRUCT structure_element_declaration_list END_STRUCT */ /* structure_element_declaration_list structure_element_declaration ';' */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
351 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
352 |
if (typeid(*type_decl) == typeid(structure_element_declaration_c)) {ERROR;} /* structure_element_name ':' *_spec_init */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
353 |
if (typeid(*type_decl) == typeid(structure_element_initialization_list_c)) {ERROR;} /* structure_initialization: '(' structure_element_initialization_list ')' */ /* structure_element_initialization_list ',' structure_element_initialization */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
354 |
if (typeid(*type_decl) == typeid(structure_element_initialization_c)) {ERROR;} /* structure_element_name ASSIGN value */ |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
355 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
356 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
357 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
358 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
359 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
360 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
361 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
362 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
363 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
364 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
365 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
366 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
367 |
bool get_datatype_info_c::is_ANY_ELEMENTARY(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
368 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
369 |
if (is_ANY_MAGNITUDE(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
370 |
if (is_ANY_BIT (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
371 |
if (is_ANY_STRING (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
372 |
if (is_ANY_DATE (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
373 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
374 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
375 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
376 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
377 |
bool get_datatype_info_c::is_ANY_SAFEELEMENTARY(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
378 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
379 |
if (is_ANY_SAFEMAGNITUDE(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
380 |
if (is_ANY_SAFEBIT (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
381 |
if (is_ANY_SAFESTRING (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
382 |
if (is_ANY_SAFEDATE (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
383 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
384 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
385 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
386 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
387 |
bool get_datatype_info_c::is_ANY_ELEMENTARY_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
388 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
389 |
if (is_ANY_ELEMENTARY (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
390 |
if (is_ANY_SAFEELEMENTARY(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
391 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
392 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
393 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
394 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
395 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
396 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
397 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
398 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
399 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
400 |
bool get_datatype_info_c::is_ANY_MAGNITUDE(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
401 |
if (type_symbol == NULL) {return false;} |
668
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
402 |
if (is_TIME(type_symbol)) {return true;} |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
403 |
if (is_ANY_NUM(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
404 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
405 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
406 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
407 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
408 |
bool get_datatype_info_c::is_ANY_SAFEMAGNITUDE(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
409 |
if (type_symbol == NULL) {return false;} |
668
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
410 |
if (is_SAFETIME(type_symbol)) {return true;} |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
411 |
if (is_ANY_SAFENUM(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
412 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
413 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
414 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
415 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
416 |
bool get_datatype_info_c::is_ANY_MAGNITUDE_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
417 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
418 |
if (is_ANY_MAGNITUDE (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
419 |
if (is_ANY_SAFEMAGNITUDE(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
420 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
421 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
422 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
423 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
424 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
425 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
426 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
427 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
428 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
429 |
bool get_datatype_info_c::is_ANY_signed_MAGNITUDE(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
430 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
431 |
if (typeid(*type_symbol) == typeid(time_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
432 |
if (is_ANY_signed_NUM(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
433 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
434 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
435 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
436 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
437 |
bool get_datatype_info_c::is_ANY_signed_SAFEMAGNITUDE(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
438 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
439 |
if (typeid(*type_symbol) == typeid(safetime_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
440 |
return is_ANY_signed_SAFENUM(type_symbol); |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
441 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
442 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
443 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
444 |
bool get_datatype_info_c::is_ANY_signed_MAGNITUDE_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
445 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
446 |
if (is_ANY_signed_MAGNITUDE (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
447 |
if (is_ANY_signed_SAFEMAGNITUDE(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
448 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
449 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
450 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
451 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
452 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
453 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
454 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
455 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
456 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
457 |
bool get_datatype_info_c::is_ANY_NUM(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
458 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
459 |
if (is_ANY_REAL(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
460 |
if (is_ANY_INT (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
461 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
462 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
463 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
464 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
465 |
bool get_datatype_info_c::is_ANY_SAFENUM(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
466 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
467 |
if (is_ANY_SAFEREAL(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
468 |
if (is_ANY_SAFEINT (type_symbol)) {return true;} |
676
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
469 |
return false; |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
470 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
471 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
472 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
473 |
bool get_datatype_info_c::is_ANY_NUM_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
474 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
475 |
if (is_ANY_NUM (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
476 |
if (is_ANY_SAFENUM(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
477 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
478 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
479 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
480 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
481 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
482 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
483 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
484 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
485 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
486 |
bool get_datatype_info_c::is_ANY_signed_NUM(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
487 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
488 |
if (is_ANY_REAL (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
489 |
if (is_ANY_signed_INT(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
490 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
491 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
492 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
493 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
494 |
bool get_datatype_info_c::is_ANY_signed_SAFENUM(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
495 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
496 |
if (is_ANY_SAFEREAL (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
497 |
if (is_ANY_signed_SAFEINT(type_symbol)) {return true;} |
676
ca4f17211251
Move is_datatype_valid/equal() to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
668
diff
changeset
|
498 |
return false; |
666
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
499 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
500 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
501 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
502 |
bool get_datatype_info_c::is_ANY_signed_NUM_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
503 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
504 |
if (is_ANY_signed_NUM (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
505 |
if (is_ANY_signed_SAFENUM(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
506 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
507 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
508 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
509 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
510 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
511 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
512 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
513 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
514 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
515 |
bool get_datatype_info_c::is_ANY_INT(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
516 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
517 |
if (is_ANY_signed_INT (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
518 |
if (is_ANY_unsigned_INT(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
519 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
520 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
521 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
522 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
523 |
bool get_datatype_info_c::is_ANY_SAFEINT(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
524 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
525 |
if (is_ANY_signed_SAFEINT (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
526 |
if (is_ANY_unsigned_SAFEINT(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
527 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
528 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
529 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
530 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
531 |
bool get_datatype_info_c::is_ANY_INT_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
532 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
533 |
if (is_ANY_INT (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
534 |
if (is_ANY_SAFEINT(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
535 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
536 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
537 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
538 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
539 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
540 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
541 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
542 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
543 |
bool get_datatype_info_c::is_ANY_signed_INT(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
544 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
545 |
if (typeid(*type_symbol) == typeid(sint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
546 |
if (typeid(*type_symbol) == typeid(int_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
547 |
if (typeid(*type_symbol) == typeid(dint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
548 |
if (typeid(*type_symbol) == typeid(lint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
549 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
550 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
551 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
552 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
553 |
bool get_datatype_info_c::is_ANY_signed_SAFEINT(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
554 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
555 |
if (typeid(*type_symbol) == typeid(safesint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
556 |
if (typeid(*type_symbol) == typeid(safeint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
557 |
if (typeid(*type_symbol) == typeid(safedint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
558 |
if (typeid(*type_symbol) == typeid(safelint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
559 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
560 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
561 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
562 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
563 |
bool get_datatype_info_c::is_ANY_signed_INT_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
564 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
565 |
if (is_ANY_signed_INT (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
566 |
if (is_ANY_signed_SAFEINT(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
567 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
568 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
569 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
570 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
571 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
572 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
573 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
574 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
575 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
576 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
577 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
578 |
bool get_datatype_info_c::is_ANY_unsigned_INT(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
579 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
580 |
if (typeid(*type_symbol) == typeid(usint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
581 |
if (typeid(*type_symbol) == typeid(uint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
582 |
if (typeid(*type_symbol) == typeid(udint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
583 |
if (typeid(*type_symbol) == typeid(ulint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
584 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
585 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
586 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
587 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
588 |
bool get_datatype_info_c::is_ANY_unsigned_SAFEINT(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
589 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
590 |
if (typeid(*type_symbol) == typeid(safeusint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
591 |
if (typeid(*type_symbol) == typeid(safeuint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
592 |
if (typeid(*type_symbol) == typeid(safeudint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
593 |
if (typeid(*type_symbol) == typeid(safeulint_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
594 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
595 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
596 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
597 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
598 |
bool get_datatype_info_c::is_ANY_unsigned_INT_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
599 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
600 |
if (is_ANY_unsigned_INT (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
601 |
if (is_ANY_unsigned_SAFEINT(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
602 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
603 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
604 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
605 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
606 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
607 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
608 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
609 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
610 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
611 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
612 |
bool get_datatype_info_c::is_ANY_REAL(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
613 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
614 |
if (typeid(*type_symbol) == typeid(real_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
615 |
if (typeid(*type_symbol) == typeid(lreal_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
616 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
617 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
618 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
619 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
620 |
bool get_datatype_info_c::is_ANY_SAFEREAL(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
621 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
622 |
if (typeid(*type_symbol) == typeid(safereal_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
623 |
if (typeid(*type_symbol) == typeid(safelreal_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
624 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
625 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
626 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
627 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
628 |
bool get_datatype_info_c::is_ANY_REAL_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
629 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
630 |
if (is_ANY_REAL (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
631 |
if (is_ANY_SAFEREAL(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
632 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
633 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
634 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
635 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
636 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
637 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
638 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
639 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
640 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
641 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
642 |
bool get_datatype_info_c::is_ANY_nBIT(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
643 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
644 |
if (typeid(*type_symbol) == typeid(byte_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
645 |
if (typeid(*type_symbol) == typeid(word_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
646 |
if (typeid(*type_symbol) == typeid(dword_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
647 |
if (typeid(*type_symbol) == typeid(lword_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
648 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
649 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
650 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
651 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
652 |
bool get_datatype_info_c::is_ANY_SAFEnBIT(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
653 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
654 |
if (typeid(*type_symbol) == typeid(safebyte_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
655 |
if (typeid(*type_symbol) == typeid(safeword_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
656 |
if (typeid(*type_symbol) == typeid(safedword_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
657 |
if (typeid(*type_symbol) == typeid(safelword_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
658 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
659 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
660 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
661 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
662 |
bool get_datatype_info_c::is_ANY_nBIT_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
663 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
664 |
if (is_ANY_nBIT (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
665 |
if (is_ANY_SAFEnBIT(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
666 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
667 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
668 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
669 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
670 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
671 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
672 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
673 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
674 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
675 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
676 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
677 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
678 |
bool get_datatype_info_c::is_BOOL(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
679 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
680 |
if (typeid(*type_symbol) == typeid(bool_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
681 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
682 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
683 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
684 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
685 |
bool get_datatype_info_c::is_SAFEBOOL(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
686 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
687 |
if (typeid(*type_symbol) == typeid(safebool_type_name_c)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
688 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
689 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
690 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
691 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
692 |
bool get_datatype_info_c::is_BOOL_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
693 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
694 |
if (is_BOOL (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
695 |
if (is_SAFEBOOL(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
696 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
697 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
698 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
699 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
700 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
701 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
702 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
703 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
704 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
705 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
706 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
707 |
bool get_datatype_info_c::is_ANY_BIT(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
708 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
709 |
if (is_BOOL (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
710 |
if (is_ANY_nBIT(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
711 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
712 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
713 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
714 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
715 |
bool get_datatype_info_c::is_ANY_SAFEBIT(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
716 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
717 |
if (is_SAFEBOOL (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
718 |
if (is_ANY_SAFEnBIT(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
719 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
720 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
721 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
722 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
723 |
bool get_datatype_info_c::is_ANY_BIT_compatible(symbol_c *type_symbol) { |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
724 |
if (type_symbol == NULL) {return false;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
725 |
if (is_ANY_BIT (type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
726 |
if (is_ANY_SAFEBIT(type_symbol)) {return true;} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
727 |
return false; |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
728 |
} |
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
729 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
730 |
|
8ba9ec4bae50
Add new get_datatype_info_c (preparing to remove search_expression_type_c)
Mario de Sousa <msousa@fe.up.pt>
parents:
diff
changeset
|
731 |
|
668
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
732 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
733 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
734 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
735 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
736 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
737 |
bool get_datatype_info_c::is_TIME(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
738 |
if (type_symbol == NULL) {return false;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
739 |
if (typeid(*type_symbol) == typeid(time_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
740 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
741 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
742 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
743 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
744 |
bool get_datatype_info_c::is_SAFETIME(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
745 |
if (type_symbol == NULL) {return false;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
746 |
if (typeid(*type_symbol) == typeid(safetime_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
747 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
748 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
749 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
750 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
751 |
bool get_datatype_info_c::is_TIME_compatible(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
752 |
if (type_symbol == NULL) {return false;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
753 |
if (is_TIME (type_symbol)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
754 |
if (is_SAFETIME(type_symbol)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
755 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
756 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
757 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
758 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
759 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
760 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
761 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
762 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
763 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
764 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
765 |
bool get_datatype_info_c::is_ANY_DATE(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
766 |
if (type_symbol == NULL) {return false;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
767 |
if (typeid(*type_symbol) == typeid(date_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
768 |
if (typeid(*type_symbol) == typeid(tod_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
769 |
if (typeid(*type_symbol) == typeid(dt_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
770 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
771 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
772 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
773 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
774 |
bool get_datatype_info_c::is_ANY_SAFEDATE(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
775 |
if (type_symbol == NULL) {return false;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
776 |
if (typeid(*type_symbol) == typeid(safedate_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
777 |
if (typeid(*type_symbol) == typeid(safetod_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
778 |
if (typeid(*type_symbol) == typeid(safedt_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
779 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
780 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
781 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
782 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
783 |
bool get_datatype_info_c::is_ANY_DATE_compatible(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
784 |
if (type_symbol == NULL) {return false;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
785 |
if (is_ANY_DATE (type_symbol)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
786 |
if (is_ANY_SAFEDATE(type_symbol)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
787 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
788 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
789 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
790 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
791 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
792 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
793 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
794 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
795 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
796 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
797 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
798 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
799 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
800 |
bool get_datatype_info_c::is_ANY_STRING(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
801 |
if (type_symbol == NULL) {return false;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
802 |
if (typeid(*type_symbol) == typeid(string_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
803 |
if (typeid(*type_symbol) == typeid(wstring_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
804 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
805 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
806 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
807 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
808 |
bool get_datatype_info_c::is_ANY_SAFESTRING(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
809 |
if (type_symbol == NULL) {return false;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
810 |
if (typeid(*type_symbol) == typeid(safestring_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
811 |
if (typeid(*type_symbol) == typeid(safewstring_type_name_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
812 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
813 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
814 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
815 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
816 |
bool get_datatype_info_c::is_ANY_STRING_compatible(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
817 |
if (type_symbol == NULL) {return false;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
818 |
if (is_ANY_STRING (type_symbol)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
819 |
if (is_ANY_SAFESTRING(type_symbol)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
820 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
821 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
822 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
823 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
824 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
825 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
826 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
827 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
828 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
829 |
/* Can't we do away with this?? */ |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
830 |
bool get_datatype_info_c::is_ANY_REAL_literal(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
831 |
if (type_symbol == NULL) {return true;} /* Please make sure things will work correctly before changing this to false!! */ |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
832 |
if (typeid(*type_symbol) == typeid(real_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
833 |
if (typeid(*type_symbol) == typeid(neg_real_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
834 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
835 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
836 |
|
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
837 |
/* Can't we do away with this?? */ |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
838 |
bool get_datatype_info_c::is_ANY_INT_literal(symbol_c *type_symbol) { |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
839 |
if (type_symbol == NULL) {return true;} /* Please make sure things will work correctly before changing this to false!! */ |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
840 |
if (typeid(*type_symbol) == typeid(integer_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
841 |
if (typeid(*type_symbol) == typeid(neg_integer_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
842 |
if (typeid(*type_symbol) == typeid(binary_integer_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
843 |
if (typeid(*type_symbol) == typeid(octal_integer_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
844 |
if (typeid(*type_symbol) == typeid(hex_integer_c)) {return true;} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
845 |
return false; |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
846 |
} |
90b6eb7f1775
Deprecating use of search_expression_type_c, so it may later be deleted!
Mario de Sousa <msousa@fe.up.pt>
parents:
666
diff
changeset
|
847 |
|
693
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
848 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
849 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
850 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
851 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
852 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
853 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
854 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
855 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
856 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
857 |
invalid_type_name_c get_datatype_info_c::invalid_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
858 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
859 |
/**********************/ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
860 |
/* B.1.3 - Data types */ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
861 |
/**********************/ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
862 |
/***********************************/ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
863 |
/* B 1.3.1 - Elementary Data Types */ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
864 |
/***********************************/ |
699 | 865 |
lreal_type_name_c get_datatype_info_c::lreal_type_name; |
693
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
866 |
real_type_name_c get_datatype_info_c::real_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
867 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
868 |
lint_type_name_c get_datatype_info_c::lint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
869 |
dint_type_name_c get_datatype_info_c::dint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
870 |
int_type_name_c get_datatype_info_c::int_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
871 |
sint_type_name_c get_datatype_info_c::sint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
872 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
873 |
ulint_type_name_c get_datatype_info_c::ulint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
874 |
udint_type_name_c get_datatype_info_c::udint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
875 |
uint_type_name_c get_datatype_info_c::uint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
876 |
usint_type_name_c get_datatype_info_c::usint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
877 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
878 |
lword_type_name_c get_datatype_info_c::lword_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
879 |
dword_type_name_c get_datatype_info_c::dword_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
880 |
word_type_name_c get_datatype_info_c::word_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
881 |
byte_type_name_c get_datatype_info_c::byte_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
882 |
bool_type_name_c get_datatype_info_c::bool_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
883 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
884 |
wstring_type_name_c get_datatype_info_c::wstring_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
885 |
string_type_name_c get_datatype_info_c::string_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
886 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
887 |
dt_type_name_c get_datatype_info_c::dt_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
888 |
date_type_name_c get_datatype_info_c::date_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
889 |
tod_type_name_c get_datatype_info_c::tod_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
890 |
time_type_name_c get_datatype_info_c::time_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
891 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
892 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
893 |
/******************************************************/ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
894 |
/* Extensions to the base standard as defined in */ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
895 |
/* "Safety Software Technical Specification, */ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
896 |
/* Part 1: Concepts and Function Blocks, */ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
897 |
/* Version 1.0 – Official Release" */ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
898 |
/* by PLCopen - Technical Committee 5 - 2006-01-31 */ |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
899 |
/******************************************************/ |
699 | 900 |
safelreal_type_name_c get_datatype_info_c::safelreal_type_name; |
693
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
901 |
safereal_type_name_c get_datatype_info_c::safereal_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
902 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
903 |
safelint_type_name_c get_datatype_info_c::safelint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
904 |
safedint_type_name_c get_datatype_info_c::safedint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
905 |
safeint_type_name_c get_datatype_info_c::safeint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
906 |
safesint_type_name_c get_datatype_info_c::safesint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
907 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
908 |
safeulint_type_name_c get_datatype_info_c::safeulint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
909 |
safeudint_type_name_c get_datatype_info_c::safeudint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
910 |
safeuint_type_name_c get_datatype_info_c::safeuint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
911 |
safeusint_type_name_c get_datatype_info_c::safeusint_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
912 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
913 |
safelword_type_name_c get_datatype_info_c::safelword_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
914 |
safedword_type_name_c get_datatype_info_c::safedword_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
915 |
safeword_type_name_c get_datatype_info_c::safeword_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
916 |
safebyte_type_name_c get_datatype_info_c::safebyte_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
917 |
safebool_type_name_c get_datatype_info_c::safebool_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
918 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
919 |
safewstring_type_name_c get_datatype_info_c::safewstring_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
920 |
safestring_type_name_c get_datatype_info_c::safestring_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
921 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
922 |
safedt_type_name_c get_datatype_info_c::safedt_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
923 |
safedate_type_name_c get_datatype_info_c::safedate_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
924 |
safetod_type_name_c get_datatype_info_c::safetod_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
925 |
safetime_type_name_c get_datatype_info_c::safetime_type_name; |
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
926 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
927 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
928 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
929 |
|
51a2fa6441b9
Prepare to delete search_constant_type_c -> Move the static variables from search_constant_type_c to get_datatype_info_c
Mario de Sousa <msousa@fe.up.pt>
parents:
676
diff
changeset
|
930 |