1607 this->default_variable_name.current_type = this->current_operand_type; |
1625 this->default_variable_name.current_type = this->current_operand_type; |
1608 XXX_operator(&(this->default_variable_name), " = ", this->current_operand); |
1626 XXX_operator(&(this->default_variable_name), " = ", this->current_operand); |
1609 return NULL; |
1627 return NULL; |
1610 } |
1628 } |
1611 |
1629 |
1612 void *visit(LDN_operator_c *symbol) { |
1630 void *visit(LDN_operator_c *symbol) { |
1613 /* the data type resulting from this operation... */ |
1631 /* the data type resulting from this operation... */ |
1614 this->default_variable_name.current_type = this->current_operand_type; |
1632 this->default_variable_name.current_type = this->current_operand_type; |
1615 XXX_operator(&(this->default_variable_name), |
1633 XXX_operator(&(this->default_variable_name), |
1616 search_expression_type->is_bool_type(this->current_operand_type)?" = !":" = ~", |
1634 search_expression_type->is_bool_type(this->current_operand_type)?" = !":" = ~", |
1617 this->current_operand); |
1635 this->current_operand); |
1618 return NULL; |
1636 return NULL; |
1619 } |
1637 } |
1620 |
1638 |
1621 void *visit(ST_operator_c *symbol) { |
1639 void *visit(ST_operator_c *symbol) { |
1622 symbol_c *operand_type = search_varfb_instance_type->get_type_id(this->current_operand); |
1640 symbol_c *operand_type = search_varfb_instance_type->get_type_id(this->current_operand); |
1623 if (search_expression_type->is_literal_integer_type(this->default_variable_name.current_type) || |
1641 if (search_expression_type->is_literal_integer_type(this->default_variable_name.current_type) || |
1624 search_expression_type->is_literal_real_type(this->default_variable_name.current_type)) |
1642 search_expression_type->is_literal_real_type(this->default_variable_name.current_type)) |
1625 this->default_variable_name.current_type = this->current_operand_type; |
1643 this->default_variable_name.current_type = this->current_operand_type; |
1626 if (this->is_variable_prefix_null()) { |
1644 if (this->is_variable_prefix_null()) { |
1627 this->current_operand->accept(*this); |
1645 this->current_operand->accept(*this); |
1628 s4o.print(" = "); |
1646 s4o.print(" = "); |
1629 print_check_function(operand_type, (symbol_c*)&(this->default_variable_name)); |
1647 print_check_function(operand_type, (symbol_c*)&(this->default_variable_name)); |
1630 } |
1648 } |
1631 else { |
1649 else { |
1632 print_setter(this->current_operand, operand_type, (symbol_c*)&(this->default_variable_name)); |
1650 print_setter(this->current_operand, operand_type, (symbol_c*)&(this->default_variable_name)); |
1633 } |
1651 } |
1634 /* the data type resulting from this operation is unchanged. */ |
1652 /* the data type resulting from this operation is unchanged. */ |
1635 return NULL; |
1653 return NULL; |
1636 } |
1654 } |
1637 |
1655 |
1638 void *visit(STN_operator_c *symbol) { |
1656 void *visit(STN_operator_c *symbol) { |
1639 symbol_c *operand_type = search_varfb_instance_type->get_type_id(this->current_operand); |
1657 symbol_c *operand_type = search_varfb_instance_type->get_type_id(this->current_operand); |
1640 if (search_expression_type->is_literal_integer_type(this->default_variable_name.current_type)) |
1658 if (search_expression_type->is_literal_integer_type(this->default_variable_name.current_type)) |
1641 this->default_variable_name.current_type = this->current_operand_type; |
1659 this->default_variable_name.current_type = this->current_operand_type; |
1642 |
1660 |
1643 if (this->is_variable_prefix_null()) { |
1661 if (this->is_variable_prefix_null()) { |
1644 this->current_operand->accept(*this); |
1662 this->current_operand->accept(*this); |
1645 s4o.print(" = "); |
1663 s4o.print(" = "); |
1646 if (search_expression_type->is_bool_type(this->current_operand_type)) |
1664 if (search_expression_type->is_bool_type(this->current_operand_type)) |
1647 s4o.print("!"); |
1665 s4o.print("!"); |
1648 else |
1666 else |
1649 s4o.print("~"); |
1667 s4o.print("~"); |
1650 this->default_variable_name.accept(*this); |
1668 this->default_variable_name.accept(*this); |
1651 } |
1669 } |
1652 else { |
1670 else { |
1653 print_setter(this->current_operand, operand_type, (symbol_c*)&(this->default_variable_name), NULL, NULL, true); |
1671 print_setter(this->current_operand, operand_type, (symbol_c*)&(this->default_variable_name), NULL, NULL, true); |
1654 } |
1672 } |
1655 /* the data type resulting from this operation is unchanged. */ |
1673 /* the data type resulting from this operation is unchanged. */ |
1656 return NULL; |
1674 return NULL; |
1657 } |
1675 } |
1658 |
1676 |
1659 void *visit(NOT_operator_c *symbol) { |
1677 void *visit(NOT_operator_c *symbol) { |
1660 /* NOTE: the standard allows syntax in which the NOT operator is followed by an optional <il_operand> |
1678 /* NOTE: the standard allows syntax in which the NOT operator is followed by an optional <il_operand> |
1661 * NOT [<il_operand>] |
1679 * NOT [<il_operand>] |
1662 * However, it does not define the semantic of the NOT operation when the <il_operand> is specified. |
1680 * However, it does not define the semantic of the NOT operation when the <il_operand> is specified. |
1663 * We therefore consider it an error if an il_operand is specified! |
1681 * We therefore consider it an error if an il_operand is specified! |
1664 * The error is caught in stage 3! |
1682 * The error is caught in stage 3! |
1724 void *visit(CD_operator_c *symbol) {return XXX_CAL_operator("CD", this->current_operand);} |
1742 void *visit(CD_operator_c *symbol) {return XXX_CAL_operator("CD", this->current_operand);} |
1725 void *visit(PV_operator_c *symbol) {return XXX_CAL_operator("PV", this->current_operand);} |
1743 void *visit(PV_operator_c *symbol) {return XXX_CAL_operator("PV", this->current_operand);} |
1726 void *visit(IN_operator_c *symbol) {return XXX_CAL_operator("IN", this->current_operand);} |
1744 void *visit(IN_operator_c *symbol) {return XXX_CAL_operator("IN", this->current_operand);} |
1727 void *visit(PT_operator_c *symbol) {return XXX_CAL_operator("PT", this->current_operand);} |
1745 void *visit(PT_operator_c *symbol) {return XXX_CAL_operator("PT", this->current_operand);} |
1728 |
1746 |
1729 void *visit(AND_operator_c *symbol) { |
1747 void *visit(AND_operator_c *symbol) { |
1730 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1748 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1731 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1749 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1732 BYTE_operator_result_type(); |
1750 BYTE_operator_result_type(); |
1733 XXX_operator(&(this->default_variable_name), " &= ", this->current_operand); |
1751 XXX_operator(&(this->default_variable_name), " &= ", this->current_operand); |
1734 /* the data type resulting from this operation... */ |
1752 /* the data type resulting from this operation... */ |
1735 this->default_variable_name.current_type = this->current_operand_type; |
1753 this->default_variable_name.current_type = this->current_operand_type; |
1736 } |
1754 } |
1737 else {ERROR;} |
1755 else {ERROR;} |
1738 return NULL; |
1756 return NULL; |
1739 } |
1757 } |
1740 |
1758 |
1741 void *visit(OR_operator_c *symbol) { |
1759 void *visit(OR_operator_c *symbol) { |
1742 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1760 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1743 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1761 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1744 BYTE_operator_result_type(); |
1762 BYTE_operator_result_type(); |
1745 XXX_operator(&(this->default_variable_name), " |= ", this->current_operand); |
1763 XXX_operator(&(this->default_variable_name), " |= ", this->current_operand); |
1746 /* the data type resulting from this operation... */ |
1764 /* the data type resulting from this operation... */ |
1747 this->default_variable_name.current_type = this->current_operand_type; |
1765 this->default_variable_name.current_type = this->current_operand_type; |
1748 } |
1766 } |
1749 else {ERROR;} |
1767 else {ERROR;} |
1750 return NULL; |
1768 return NULL; |
1751 } |
1769 } |
1752 |
1770 |
1753 void *visit(XOR_operator_c *symbol) { |
1771 void *visit(XOR_operator_c *symbol) { |
1754 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1772 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1755 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1773 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1756 BYTE_operator_result_type(); |
1774 BYTE_operator_result_type(); |
1757 // '^' is a bit by bit exclusive OR !! Also seems to work with boolean types! |
1775 // '^' is a bit by bit exclusive OR !! Also seems to work with boolean types! |
1758 XXX_operator(&(this->default_variable_name), " ^= ", this->current_operand); |
1776 XXX_operator(&(this->default_variable_name), " ^= ", this->current_operand); |
1759 /* the data type resulting from this operation... */ |
1777 /* the data type resulting from this operation... */ |
1760 this->default_variable_name.current_type = this->current_operand_type; |
1778 this->default_variable_name.current_type = this->current_operand_type; |
1761 } |
1779 } |
1762 else {ERROR;} |
1780 else {ERROR;} |
1763 return NULL; |
1781 return NULL; |
1764 } |
1782 } |
1765 |
1783 |
1766 void *visit(ANDN_operator_c *symbol) { |
1784 void *visit(ANDN_operator_c *symbol) { |
1767 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1785 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1768 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1786 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1769 BYTE_operator_result_type(); |
1787 BYTE_operator_result_type(); |
1770 XXX_operator(&(this->default_variable_name), |
1788 XXX_operator(&(this->default_variable_name), |
1771 search_expression_type->is_bool_type(this->current_operand_type)?" &= !":" &= ~", |
1789 search_expression_type->is_bool_type(this->current_operand_type)?" &= !":" &= ~", |
1772 this->current_operand); |
1790 this->current_operand); |
1773 /* the data type resulting from this operation... */ |
1791 /* the data type resulting from this operation... */ |
1774 this->default_variable_name.current_type = this->current_operand_type; |
1792 this->default_variable_name.current_type = this->current_operand_type; |
1775 } |
1793 } |
1776 else {ERROR;} |
1794 else {ERROR;} |
1777 return NULL; |
1795 return NULL; |
1778 } |
1796 } |
1779 |
1797 |
1780 void *visit(ORN_operator_c *symbol) { |
1798 void *visit(ORN_operator_c *symbol) { |
1781 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1799 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1782 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1800 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1783 BYTE_operator_result_type(); |
1801 BYTE_operator_result_type(); |
1784 XXX_operator(&(this->default_variable_name), |
1802 XXX_operator(&(this->default_variable_name), |
1785 search_expression_type->is_bool_type(this->current_operand_type)?" |= !":" |= ~", |
1803 search_expression_type->is_bool_type(this->current_operand_type)?" |= !":" |= ~", |
1786 this->current_operand); |
1804 this->current_operand); |
1787 /* the data type resulting from this operation... */ |
1805 /* the data type resulting from this operation... */ |
1788 this->default_variable_name.current_type = this->current_operand_type; |
1806 this->default_variable_name.current_type = this->current_operand_type; |
1789 } |
1807 } |
1790 else {ERROR;} |
1808 else {ERROR;} |
1791 return NULL; |
1809 return NULL; |
1792 } |
1810 } |
1793 |
1811 |
1794 void *visit(XORN_operator_c *symbol) { |
1812 void *visit(XORN_operator_c *symbol) { |
1795 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1813 if (search_expression_type->is_binary_type(this->default_variable_name.current_type) && |
1796 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1814 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1797 BYTE_operator_result_type(); |
1815 BYTE_operator_result_type(); |
1798 XXX_operator(&(this->default_variable_name), |
1816 XXX_operator(&(this->default_variable_name), |
1799 // bit by bit exclusive OR !! Also seems to work with boolean types! |
1817 // bit by bit exclusive OR !! Also seems to work with boolean types! |
1800 search_expression_type->is_bool_type(this->current_operand_type)?" ^= !":" ^= ~", |
1818 search_expression_type->is_bool_type(this->current_operand_type)?" ^= !":" ^= ~", |
1801 this->current_operand); |
1819 this->current_operand); |
1802 /* the data type resulting from this operation... */ |
1820 /* the data type resulting from this operation... */ |
1803 this->default_variable_name.current_type = this->current_operand_type; |
1821 this->default_variable_name.current_type = this->current_operand_type; |
1804 } |
1822 } |
1805 else {ERROR;} |
1823 else {ERROR;} |
1806 return NULL; |
1824 return NULL; |
1807 } |
1825 } |
1808 |
1826 |
1809 void *visit(ADD_operator_c *symbol) { |
1827 void *visit(ADD_operator_c *symbol) { |
1810 if (search_expression_type->is_time_type(this->default_variable_name.current_type) && |
1828 if (search_expression_type->is_time_type(this->default_variable_name.current_type) && |
1811 search_expression_type->is_time_type(this->current_operand_type)) { |
1829 search_expression_type->is_time_type(this->current_operand_type)) { |
1812 XXX_function("__time_add", &(this->default_variable_name), this->current_operand); |
1830 XXX_function("__time_add", &(this->default_variable_name), this->current_operand); |
1813 /* the data type resulting from this operation... */ |
1831 /* the data type resulting from this operation... */ |
1814 this->default_variable_name.current_type = this->current_operand_type; |
1832 this->default_variable_name.current_type = this->current_operand_type; |
1815 } |
1833 } |
1816 else if (search_expression_type->is_num_type(this->default_variable_name.current_type) && |
1834 else if (search_expression_type->is_num_type(this->default_variable_name.current_type) && |
1817 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1835 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1818 NUM_operator_result_type(); |
1836 NUM_operator_result_type(); |
1819 XXX_operator(&(this->default_variable_name), " += ", this->current_operand); |
1837 XXX_operator(&(this->default_variable_name), " += ", this->current_operand); |
1820 /* the data type resulting from this operation... */ |
1838 /* the data type resulting from this operation... */ |
1821 this->default_variable_name.current_type = this->current_operand_type; |
1839 this->default_variable_name.current_type = this->current_operand_type; |
1822 } |
1840 } |
1823 else {ERROR;} |
1841 else {ERROR;} |
1824 return NULL; |
1842 return NULL; |
1825 } |
1843 } |
1826 |
1844 |
1827 void *visit(SUB_operator_c *symbol) { |
1845 void *visit(SUB_operator_c *symbol) { |
1828 if (search_expression_type->is_time_type(this->default_variable_name.current_type) && |
1846 if (search_expression_type->is_time_type(this->default_variable_name.current_type) && |
1829 search_expression_type->is_time_type(this->current_operand_type)) { |
1847 search_expression_type->is_time_type(this->current_operand_type)) { |
1830 XXX_function("__time_sub", &(this->default_variable_name), this->current_operand); |
1848 XXX_function("__time_sub", &(this->default_variable_name), this->current_operand); |
1831 /* the data type resulting from this operation... */ |
1849 /* the data type resulting from this operation... */ |
1832 this->default_variable_name.current_type = this->current_operand_type; |
1850 this->default_variable_name.current_type = this->current_operand_type; |
1833 } |
1851 } |
1834 else if (search_expression_type->is_num_type(this->default_variable_name.current_type) && |
1852 else if (search_expression_type->is_num_type(this->default_variable_name.current_type) && |
1835 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1853 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1836 NUM_operator_result_type(); |
1854 NUM_operator_result_type(); |
1837 XXX_operator(&(this->default_variable_name), " -= ", this->current_operand); |
1855 XXX_operator(&(this->default_variable_name), " -= ", this->current_operand); |
1838 /* the data type resulting from this operation... */ |
1856 /* the data type resulting from this operation... */ |
1839 this->default_variable_name.current_type = this->current_operand_type; |
1857 this->default_variable_name.current_type = this->current_operand_type; |
1840 } |
1858 } |
1841 else {ERROR;} |
1859 else {ERROR;} |
1842 return NULL; |
1860 return NULL; |
1843 } |
1861 } |
1844 |
1862 |
1845 void *visit(MUL_operator_c *symbol) { |
1863 void *visit(MUL_operator_c *symbol) { |
1846 if (search_expression_type->is_time_type(this->default_variable_name.current_type) && |
1864 if (search_expression_type->is_time_type(this->default_variable_name.current_type) && |
1847 search_expression_type->is_integer_type(this->current_operand_type)) { |
1865 search_expression_type->is_integer_type(this->current_operand_type)) { |
1848 XXX_function("__time_mul", &(this->default_variable_name), this->current_operand); |
1866 XXX_function("__time_mul", &(this->default_variable_name), this->current_operand); |
1849 /* the data type resulting from this operation is unchanged! */ |
1867 /* the data type resulting from this operation is unchanged! */ |
1850 } |
1868 } |
1851 else if (search_expression_type->is_num_type(this->default_variable_name.current_type) && |
1869 else if (search_expression_type->is_num_type(this->default_variable_name.current_type) && |
1852 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1870 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1853 NUM_operator_result_type(); |
1871 NUM_operator_result_type(); |
1854 XXX_operator(&(this->default_variable_name), " *= ", this->current_operand); |
1872 XXX_operator(&(this->default_variable_name), " *= ", this->current_operand); |
1855 /* the data type resulting from this operation... */ |
1873 /* the data type resulting from this operation... */ |
1856 this->default_variable_name.current_type = this->current_operand_type; |
1874 this->default_variable_name.current_type = this->current_operand_type; |
1857 } |
1875 } |
1858 else {ERROR;} |
1876 else {ERROR;} |
1859 return NULL; |
1877 return NULL; |
1860 } |
1878 } |
1861 |
1879 |
1862 void *visit(DIV_operator_c *symbol) { |
1880 void *visit(DIV_operator_c *symbol) { |
1863 if (search_expression_type->is_time_type(this->default_variable_name.current_type) && |
1881 if (search_expression_type->is_time_type(this->default_variable_name.current_type) && |
1864 search_expression_type->is_integer_type(this->current_operand_type)) { |
1882 search_expression_type->is_integer_type(this->current_operand_type)) { |
1865 XXX_function("__time_div", &(this->default_variable_name), this->current_operand); |
1883 XXX_function("__time_div", &(this->default_variable_name), this->current_operand); |
1866 /* the data type resulting from this operation is unchanged! */ |
1884 /* the data type resulting from this operation is unchanged! */ |
1867 } |
1885 } |
1868 else if (search_expression_type->is_num_type(this->default_variable_name.current_type) && |
1886 else if (search_expression_type->is_num_type(this->default_variable_name.current_type) && |
1869 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1887 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1870 NUM_operator_result_type(); |
1888 NUM_operator_result_type(); |
1871 XXX_operator(&(this->default_variable_name), " /= ", this->current_operand); |
1889 XXX_operator(&(this->default_variable_name), " /= ", this->current_operand); |
1872 /* the data type resulting from this operation... */ |
1890 /* the data type resulting from this operation... */ |
1873 this->default_variable_name.current_type = this->current_operand_type; |
1891 this->default_variable_name.current_type = this->current_operand_type; |
1874 return NULL; |
1892 return NULL; |
1875 } |
1893 } |
1876 else {ERROR;} |
1894 else {ERROR;} |
1877 return NULL; |
1895 return NULL; |
1878 } |
1896 } |
1879 |
1897 |
1880 void *visit(MOD_operator_c *symbol) { |
1898 void *visit(MOD_operator_c *symbol) { |
1881 if (search_expression_type->is_num_type(this->default_variable_name.current_type) && |
1899 if (search_expression_type->is_num_type(this->default_variable_name.current_type) && |
1882 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1900 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1883 NUM_operator_result_type(); |
1901 NUM_operator_result_type(); |
1884 XXX_operator(&(this->default_variable_name), " %= ", this->current_operand); |
1902 XXX_operator(&(this->default_variable_name), " %= ", this->current_operand); |
1885 /* the data type resulting from this operation... */ |
1903 /* the data type resulting from this operation... */ |
1886 this->default_variable_name.current_type = this->current_operand_type; |
1904 this->default_variable_name.current_type = this->current_operand_type; |
1887 } |
1905 } |
1888 else {ERROR;} |
1906 else {ERROR;} |
1889 return NULL; |
1907 return NULL; |
1890 } |
1908 } |
1891 |
1909 |
1892 void *visit(GT_operator_c *symbol) { |
1910 void *visit(GT_operator_c *symbol) { |
1893 if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) && |
1911 if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) && |
1894 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1912 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1895 CMP_operator(this->current_operand, "GT_"); |
1913 CMP_operator(this->current_operand, "GT_"); |
1896 } else { |
1914 } else { |
1897 ERROR; |
1915 ERROR; |
1898 } |
1916 } |
1899 return NULL; |
1917 return NULL; |
1900 } |
1918 } |
1901 |
1919 |
1902 void *visit(GE_operator_c *symbol) { |
1920 void *visit(GE_operator_c *symbol) { |
1903 if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) && |
1921 if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) && |
1904 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1922 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1905 CMP_operator(this->current_operand, "GE_"); |
1923 CMP_operator(this->current_operand, "GE_"); |
1906 } else { |
1924 } else { |
1907 ERROR; |
1925 ERROR; |
1908 } |
1926 } |
1909 return NULL; |
1927 return NULL; |
1910 } |
1928 } |
1911 |
1929 |
1912 void *visit(EQ_operator_c *symbol) { |
1930 void *visit(EQ_operator_c *symbol) { |
1913 if (search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1931 if (search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1914 CMP_operator(this->current_operand, "EQ_"); |
1932 CMP_operator(this->current_operand, "EQ_"); |
1915 } else { |
1933 } else { |
1916 ERROR; |
1934 ERROR; |
1917 } |
1935 } |
1918 return NULL; |
1936 return NULL; |
1919 } |
1937 } |
1920 |
1938 |
1921 void *visit(LT_operator_c *symbol) { |
1939 void *visit(LT_operator_c *symbol) { |
1922 if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) && |
1940 if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) && |
1923 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1941 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1924 CMP_operator(this->current_operand, "LT_"); |
1942 CMP_operator(this->current_operand, "LT_"); |
1925 } else { |
1943 } else { |
1926 ERROR; |
1944 ERROR; |
1927 } |
1945 } |
1928 return NULL; |
1946 return NULL; |
1929 } |
1947 } |
1930 |
1948 |
1931 void *visit(LE_operator_c *symbol) { |
1949 void *visit(LE_operator_c *symbol) { |
1932 if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) && |
1950 if (!search_base_type.type_is_enumerated(this->default_variable_name.current_type) && |
1933 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1951 search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1934 CMP_operator(this->current_operand, "LE_"); |
1952 CMP_operator(this->current_operand, "LE_"); |
1935 } else { |
1953 } else { |
1936 ERROR; |
1954 ERROR; |
1937 } |
1955 } |
1938 return NULL; |
1956 return NULL; |
1939 } |
1957 } |
1940 |
1958 |
1941 void *visit(NE_operator_c *symbol) { |
1959 void *visit(NE_operator_c *symbol) { |
1942 if (search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1960 if (search_expression_type->is_same_type(this->default_variable_name.current_type, this->current_operand_type)) { |
1943 CMP_operator(this->current_operand, "NE_"); |
1961 CMP_operator(this->current_operand, "NE_"); |
1944 } else { |
1962 } else { |
1945 ERROR; |
1963 ERROR; |
1946 } |
1964 } |