stage3/fill_candidate_datatypes.cc
changeset 873 dea39ef02847
parent 854 13d0b67de111
child 909 8b2a31dea131
equal deleted inserted replaced
872:3d682f87c870 873:dea39ef02847
  1830 /* B.3 - Language ST (Structured Text) */
  1830 /* B.3 - Language ST (Structured Text) */
  1831 /***************************************/
  1831 /***************************************/
  1832 /***********************/
  1832 /***********************/
  1833 /* B 3.1 - Expressions */
  1833 /* B 3.1 - Expressions */
  1834 /***********************/
  1834 /***********************/
       
  1835 /* SYM_REF1(ref_expression_c, exp)  --> an extension to the IEC 61131-3 standard - based on the IEC 61131-3 v3 standard. Returns address of the varible! */
       
  1836 void *fill_candidate_datatypes_c::visit(  ref_expression_c  *symbol) {
       
  1837   symbol->exp->accept(*this);
       
  1838   /* we should really check whether the expression is merely a variable. For now, leave it for the future! */
       
  1839   /* For now, we handle references (i.e. pointers) as ULINT datatypes! */
       
  1840   add_datatype_to_candidate_list(symbol, &get_datatype_info_c::ulint_type_name);
       
  1841   return NULL;
       
  1842 }
       
  1843     
  1835 void *fill_candidate_datatypes_c::visit(   or_expression_c  *symbol) {return handle_binary_expression  (widen_OR_table,  symbol, symbol->l_exp, symbol->r_exp);}
  1844 void *fill_candidate_datatypes_c::visit(   or_expression_c  *symbol) {return handle_binary_expression  (widen_OR_table,  symbol, symbol->l_exp, symbol->r_exp);}
  1836 void *fill_candidate_datatypes_c::visit(   xor_expression_c *symbol) {return handle_binary_expression  (widen_XOR_table, symbol, symbol->l_exp, symbol->r_exp);}
  1845 void *fill_candidate_datatypes_c::visit(   xor_expression_c *symbol) {return handle_binary_expression  (widen_XOR_table, symbol, symbol->l_exp, symbol->r_exp);}
  1837 void *fill_candidate_datatypes_c::visit(   and_expression_c *symbol) {return handle_binary_expression  (widen_AND_table, symbol, symbol->l_exp, symbol->r_exp);}
  1846 void *fill_candidate_datatypes_c::visit(   and_expression_c *symbol) {return handle_binary_expression  (widen_AND_table, symbol, symbol->l_exp, symbol->r_exp);}
  1838 
  1847 
  1839 void *fill_candidate_datatypes_c::visit(   equ_expression_c *symbol) {return handle_equality_comparison(widen_CMP_table, symbol, symbol->l_exp, symbol->r_exp);}
  1848 void *fill_candidate_datatypes_c::visit(   equ_expression_c *symbol) {return handle_equality_comparison(widen_CMP_table, symbol, symbol->l_exp, symbol->r_exp);}