125 |
125 |
126 bool is_num_type(symbol_c *type_symbol) { |
126 bool is_num_type(symbol_c *type_symbol) { |
127 return is_real_type(type_symbol) || is_integer_type(type_symbol); |
127 return is_real_type(type_symbol) || is_integer_type(type_symbol); |
128 } |
128 } |
129 |
129 |
130 bool is_binary_type(symbol_c *type_symbol) { |
130 bool is_nbinary_type(symbol_c *type_symbol) { |
131 if (typeid(*type_symbol) == typeid(bool_type_name_c)) {return true;} |
|
132 if (typeid(*type_symbol) == typeid(byte_type_name_c)) {return true;} |
131 if (typeid(*type_symbol) == typeid(byte_type_name_c)) {return true;} |
133 if (typeid(*type_symbol) == typeid(word_type_name_c)) {return true;} |
132 if (typeid(*type_symbol) == typeid(word_type_name_c)) {return true;} |
134 if (typeid(*type_symbol) == typeid(dword_type_name_c)) {return true;} |
133 if (typeid(*type_symbol) == typeid(dword_type_name_c)) {return true;} |
135 if (typeid(*type_symbol) == typeid(lword_type_name_c)) {return true;} |
134 if (typeid(*type_symbol) == typeid(lword_type_name_c)) {return true;} |
136 if (typeid(*type_symbol) == typeid(constant_int_type_name_c)) {return true;} |
135 if (typeid(*type_symbol) == typeid(constant_int_type_name_c)) {return true;} |
137 return false; |
136 return false; |
|
137 } |
|
138 |
|
139 bool is_binary_type(symbol_c *type_symbol) { |
|
140 if (typeid(*type_symbol) == typeid(bool_type_name_c)) {return true;} |
|
141 return is_nbinary_type(type_symbol); |
138 } |
142 } |
139 |
143 |
140 bool is_same_type(symbol_c *first_type, symbol_c *second_type) { |
144 bool is_same_type(symbol_c *first_type, symbol_c *second_type) { |
141 if (typeid(*first_type) == typeid(*second_type)) {return true;} |
145 if (typeid(*first_type) == typeid(*second_type)) {return true;} |
142 if (is_integer_type(first_type) && (typeid(*second_type) == typeid(constant_int_type_name_c))) {return true;} |
146 if (is_integer_type(first_type) && (typeid(*second_type) == typeid(constant_int_type_name_c))) {return true;} |