absyntax_utils/search_constant_type.hh
changeset 459 01f6664bf8c5
parent 417 d48f53715f77
child 495 8c6823fee086
equal deleted inserted replaced
458:587884880be6 459:01f6664bf8c5
    28  * Based on the
    28  * Based on the
    29  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
    29  * FINAL DRAFT - IEC 61131-3, 2nd Ed. (2001-12-10)
    30  *
    30  *
    31  */
    31  */
    32 
    32 
       
    33 /* NOTE: The use of this visitor class is now deprecated.
       
    34  *       The new version of stage3 data type checking adds an entry to
       
    35  *       every relevant object in the abstract syntax tree defining
       
    36  *       the data type of that object. Please use that instead!
       
    37  */
       
    38 
       
    39 
       
    40 
    33 /* Determine the data type of a specific constant or variable.
    41 /* Determine the data type of a specific constant or variable.
    34  * A reference to the relevant type definition is returned.
    42  * A reference to the relevant type definition is returned.
    35  *
    43  *
    36  * For example:
    44  * For example:
    37  *       22          -> returns reference to a int_type_name_c object.
    45  *       22          -> returns reference to a int_type_name_c object.
    47 #define _SEARCH_CONSTANT_TYPE_HH
    55 #define _SEARCH_CONSTANT_TYPE_HH
    48 
    56 
    49 class search_constant_type_c: public search_visitor_c {
    57 class search_constant_type_c: public search_visitor_c {
    50 
    58 
    51   public:
    59   public:
       
    60   /* object used to identify an entry in the abstract syntax tree with an invalid data type */
       
    61   /* This is only used from stage3 onwards. Stages 1 and 2 will never create any instances of invalid_type_name_c */
       
    62   static invalid_type_name_c     invalid_type_name;
       
    63 
    52   /**********************/
    64   /**********************/
    53   /* B.1.3 - Data types */
    65   /* B.1.3 - Data types */
    54   /**********************/
    66   /**********************/
    55   /***********************************/
    67   /***********************************/
    56   /* B 1.3.1 - Elementary Data Types */
    68   /* B 1.3.1 - Elementary Data Types */