absyntax_utils/search_base_type.hh
changeset 202 da1a8186f86f
parent 194 e18690830555
child 257 90782e241346
--- a/absyntax_utils/search_base_type.hh	Thu Jul 02 11:26:25 2009 +0100
+++ b/absyntax_utils/search_base_type.hh	Thu Aug 27 16:06:46 2009 +0100
@@ -34,6 +34,9 @@
  *    new_int_t is really an INT!!
  *    new_int2_t is also really an INT!!
  *    new_subr_t is also really an INT!!
+ *
+ * Note that a FB declaration is also considered a base type, as
+ * we may have FB instances declared of a specific FB type.
  */
 
 
@@ -53,6 +56,27 @@
     bool type_is_enumerated(symbol_c* type_decl);
 
   public:
+    /*********************/
+    /* B 1.2 - Constants */
+    /*********************/
+
+    /******************************/
+    /* B 1.2.1 - Numeric Literals */
+    /******************************/
+     /* Numeric literals without any explicit type cast have unknown data type, 
+      * so we continue considering them as their own basic data types until
+      * they can be resolved (for example, when using '30+x' where 'x' is a LINT variable, the
+      * numeric literal '30' must then be considered a LINT so the ADD function may be called
+      * with all inputs of the same data type.
+      * If 'x' were a SINT, then the '30' would have to be a SINT too!
+      */
+    void *visit(real_c *symbol);
+    void *visit(integer_c *symbol);
+    void *visit(binary_integer_c *symbol);
+    void *visit(octal_integer_c *symbol);
+    void *visit(hex_integer_c *symbol);
+
+
   /***********************************/
   /* B 1.3.1 - Elementary Data Types */
   /***********************************/
@@ -77,8 +101,11 @@
     void *visit(lword_type_name_c *symbol);
     void *visit(string_type_name_c *symbol);
     void *visit(wstring_type_name_c *symbol);
+
+/*
     void *visit(constant_int_type_name_c *symbol);
     void *visit(constant_real_type_name_c *symbol);
+*/
 
     /******************************************************/
     /* Extensions to the base standard as defined in      */
@@ -162,6 +189,14 @@
   					string_type_declaration_init) // may be == NULL!
   */
     void *visit(string_type_declaration_c *symbol);
+
+  /*****************************/
+  /* B 1.5.2 - Function Blocks */
+  /*****************************/
+  /*  FUNCTION_BLOCK derived_function_block_name io_OR_other_var_declarations function_block_body END_FUNCTION_BLOCK */
+  // SYM_REF3(function_block_declaration_c, fblock_name, var_declarations, fblock_body)
+    void *visit(function_block_declaration_c *symbol);
+
 }; // search_base_type_c