1835 /***********************/ |
1837 /***********************/ |
1836 |
1838 |
1837 void *visit_expression_type_c::visit(or_expression_c *symbol) { |
1839 void *visit_expression_type_c::visit(or_expression_c *symbol) { |
1838 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1840 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1839 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1841 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1840 return compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_BIT_compatible); |
1842 return compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_BIT_compatible, symbol->l_exp, symbol->r_exp); |
1841 } |
1843 } |
1842 |
1844 |
1843 |
1845 |
1844 void *visit_expression_type_c::visit(xor_expression_c *symbol) { |
1846 void *visit_expression_type_c::visit(xor_expression_c *symbol) { |
1845 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1847 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1846 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1848 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1847 return compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_BIT_compatible); |
1849 return compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_BIT_compatible, symbol->l_exp, symbol->r_exp); |
1848 } |
1850 } |
1849 |
1851 |
1850 |
1852 |
1851 void *visit_expression_type_c::visit(and_expression_c *symbol) { |
1853 void *visit_expression_type_c::visit(and_expression_c *symbol) { |
1852 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1854 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1853 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1855 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1854 return compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_BIT_compatible); |
1856 return compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_BIT_compatible, symbol->l_exp, symbol->r_exp); |
1855 } |
1857 } |
1856 |
1858 |
1857 |
1859 |
1858 void *visit_expression_type_c::visit(equ_expression_c *symbol) { |
1860 void *visit_expression_type_c::visit(equ_expression_c *symbol) { |
1859 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1861 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1860 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1862 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1861 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible); |
1863 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible, symbol->l_exp, symbol->r_exp); |
1862 return &search_expression_type_c::bool_type_name; |
1864 return &search_expression_type_c::bool_type_name; |
1863 } |
1865 } |
1864 |
1866 |
1865 |
1867 |
1866 void *visit_expression_type_c::visit(notequ_expression_c *symbol) { |
1868 void *visit_expression_type_c::visit(notequ_expression_c *symbol) { |
1867 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1869 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1868 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1870 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1869 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible); |
1871 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible, symbol->l_exp, symbol->r_exp); |
1870 return &search_expression_type_c::bool_type_name; |
1872 return &search_expression_type_c::bool_type_name; |
1871 } |
1873 } |
1872 |
1874 |
1873 |
1875 |
1874 void *visit_expression_type_c::visit(lt_expression_c *symbol) { |
1876 void *visit_expression_type_c::visit(lt_expression_c *symbol) { |
1875 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1877 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1876 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1878 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1877 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible); |
1879 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible, symbol->l_exp, symbol->r_exp); |
1878 return &search_expression_type_c::bool_type_name; |
1880 return &search_expression_type_c::bool_type_name; |
1879 } |
1881 } |
1880 |
1882 |
1881 |
1883 |
1882 void *visit_expression_type_c::visit(gt_expression_c *symbol) { |
1884 void *visit_expression_type_c::visit(gt_expression_c *symbol) { |
1883 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1885 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1884 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1886 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1885 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible); |
1887 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible, symbol->l_exp, symbol->r_exp); |
1886 return &search_expression_type_c::bool_type_name; |
1888 return &search_expression_type_c::bool_type_name; |
1887 } |
1889 } |
1888 |
1890 |
1889 |
1891 |
1890 void *visit_expression_type_c::visit(le_expression_c *symbol) { |
1892 void *visit_expression_type_c::visit(le_expression_c *symbol) { |
1891 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1893 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1892 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1894 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1893 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible); |
1895 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible, symbol->l_exp, symbol->r_exp); |
1894 return &search_expression_type_c::bool_type_name; |
1896 return &search_expression_type_c::bool_type_name; |
1895 } |
1897 } |
1896 |
1898 |
1897 |
1899 |
1898 void *visit_expression_type_c::visit(ge_expression_c *symbol) { |
1900 void *visit_expression_type_c::visit(ge_expression_c *symbol) { |
1899 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1901 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
1900 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1902 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
1901 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible); |
1903 compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_ELEMENTARY_compatible, symbol->l_exp, symbol->r_exp); |
1902 return &search_expression_type_c::bool_type_name; |
1904 return &search_expression_type_c::bool_type_name; |
1903 } |
1905 } |
1904 |
1906 |
1905 |
1907 |
1906 void *visit_expression_type_c::visit(add_expression_c *symbol) { |
1908 void *visit_expression_type_c::visit(add_expression_c *symbol) { |
2028 * this next line is really only to check for integers/reals of undefined type on 'right_type'... |
2030 * this next line is really only to check for integers/reals of undefined type on 'right_type'... |
2029 */ |
2031 */ |
2030 if (is_type(left_type, safetime_type_name_c) && is_ANY_NUM_compatible(right_type)) |
2032 if (is_type(left_type, safetime_type_name_c) && is_ANY_NUM_compatible(right_type)) |
2031 return (void *)&safetime_type_name; |
2033 return (void *)&safetime_type_name; |
2032 |
2034 |
2033 return compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_NUM_compatible); |
2035 return compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_NUM_compatible, symbol->l_exp, symbol->r_exp); |
2034 } |
2036 } |
2035 |
2037 |
2036 |
2038 |
2037 void *visit_expression_type_c::visit(mod_expression_c *symbol) { |
2039 void *visit_expression_type_c::visit(mod_expression_c *symbol) { |
2038 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
2040 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
2039 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
2041 symbol_c *right_type = base_type((symbol_c *)symbol->r_exp->accept(*this)); |
2040 return compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_INT_compatible); |
2042 return compute_expression(left_type, right_type, &visit_expression_type_c::is_ANY_INT_compatible, symbol->l_exp, symbol->r_exp); |
2041 } |
2043 } |
2042 |
2044 |
2043 |
2045 |
2044 void *visit_expression_type_c::visit(power_expression_c *symbol) { |
2046 void *visit_expression_type_c::visit(power_expression_c *symbol) { |
2045 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |
2047 symbol_c *left_type = base_type((symbol_c *)symbol->l_exp->accept(*this)); |