absyntax_utils/search_var_instance_decl.hh
changeset 221 c6aed7e5f070
parent 217 f5dfadf5de54
child 226 29f8ffc203c1
equal deleted inserted replaced
220:f332b62cd2c1 221:c6aed7e5f070
    64 
    64 
    65     /* variable used to store the type of variable currently being processed... */
    65     /* variable used to store the type of variable currently being processed... */
    66     /* Will contain a single value of generate_c_vardecl_c::XXXX_vt */
    66     /* Will contain a single value of generate_c_vardecl_c::XXXX_vt */
    67     unsigned int current_vartype;
    67     unsigned int current_vartype;
    68 
    68 
    69     /* variable used to store the qualifier of variable currently being processed... */
       
    70     /* Will contain a single value of generate_c_vardecl_c::XXXX_vq */
       
    71     unsigned int current_varqualifier;
       
    72 
       
    73   public:
    69   public:
    74     search_var_instance_decl_c(symbol_c *search_scope);
    70     search_var_instance_decl_c(symbol_c *search_scope);
    75     symbol_c *get_decl(symbol_c *variable_instance_name);
    71     symbol_c *get_decl(symbol_c *variable_instance_name);
    76     unsigned int get_vartype();
    72     unsigned int get_vartype();
    77     unsigned int get_varqualifier();
       
    78 
    73 
    79   public:
    74   public:
    80 
    75 
    81     /* the types of variables that need to be processed... */
    76     /* the types of variables that need to be processed... */
    82     static const unsigned int none_vt     = 0x0000;
    77     static const unsigned int none_vt     = 0x0000;
    87     static const unsigned int temp_vt     = 0x0010;  // VAR_TEMP
    82     static const unsigned int temp_vt     = 0x0010;  // VAR_TEMP
    88     static const unsigned int external_vt = 0x0020;  // VAR_EXTERNAL
    83     static const unsigned int external_vt = 0x0020;  // VAR_EXTERNAL
    89     static const unsigned int global_vt   = 0x0040;  // VAR_GLOBAL
    84     static const unsigned int global_vt   = 0x0040;  // VAR_GLOBAL
    90     static const unsigned int located_vt  = 0x0080;  // VAR <var_name> AT <location>
    85     static const unsigned int located_vt  = 0x0080;  // VAR <var_name> AT <location>
    91 
    86 
    92     /* the qualifier of variables that need to be processed... */
       
    93     static const unsigned int none_vq        = 0x0000;
       
    94     static const unsigned int constant_vq    = 0x0001;  // CONSTANT
       
    95     static const unsigned int retain_vq      = 0x0002;  // RETAIN
       
    96     static const unsigned int non_retain_vq  = 0x0002;  // NON_RETAIN
       
    97 
       
    98   private:
    87   private:
    99     /***************************/
    88     /***************************/
   100     /* B 0 - Programming Model */
    89     /* B 0 - Programming Model */
   101     /***************************/
    90     /***************************/
   102     void *visit(library_c *symbol);
    91     void *visit(library_c *symbol);
   103 
    92 
   104     /******************************************/
    93     /******************************************/
   105     /* B 1.4.3 - Declaration & Initialisation */
    94     /* B 1.4.3 - Declaration & Initialisation */
   106     /******************************************/
    95     /******************************************/
   107 
    96 
   108     void *visit(constant_option_c *symbol);
       
   109     void *visit(retain_option_c *symbol);
       
   110     void *visit(non_retain_option_c *symbol);
       
   111     /* edge -> The F_EDGE or R_EDGE directive */
    97     /* edge -> The F_EDGE or R_EDGE directive */
   112     // SYM_REF2(edge_declaration_c, edge, var1_list)
    98     // SYM_REF2(edge_declaration_c, edge, var1_list)
   113     // TODO
    99     // TODO
   114     void *visit(input_declarations_c *symbol);
   100     void *visit(input_declarations_c *symbol);
   115     /* VAR_OUTPUT [RETAIN | NON_RETAIN] var_init_decl_list END_VAR */
   101     /* VAR_OUTPUT [RETAIN | NON_RETAIN] var_init_decl_list END_VAR */