lex_literal.g.hh

Go to the documentation of this file.
00001 // This file is automatically generated, do not edit.
00002 
00003 /*!
00004         \file
00005         \brief Literal properties.
00006         
00007                         Classes for representation of lex literal properties.
00008                         Each literal kind itself is represented by a class, with own properties
00009                 
00010 */
00011 
00012 #ifndef lestes__lang__cplus__lex__lex_literal_g_hh__included
00013 #define lestes__lang__cplus__lex__lex_literal_g_hh__included
00014 
00015 #include <lestes/common.hh>
00016 
00017 #include <lestes/std/objectize_macros.hh>
00018 package(lestes);
00019 package(lang);
00020 package(cplus);
00021 package(lex);
00022 class lex_literal_visitor;
00023 end_package(lex);
00024 end_package(cplus);
00025 end_package(lang);
00026 end_package(lestes);
00027 
00028 package(lestes);
00029 package(lang);
00030 package(cplus);
00031 package(lex);
00032 
00033 
00034 class lex_literal;
00035 class lex_literal_visitor;
00036 class lex_integral_literal;
00037 class lex_floating_literal;
00038 class lex_character_literal;
00039 class lex_string_literal;
00040 class lex_boolean_literal;
00041 
00042 
00043 /*! \brief Base class for literals.
00044 
00045 
00046                                 Represents abstract base for literal properties.
00047                                 The literal kind itself is represented by the inherited classes.
00048                         
00049 */
00050 class lex_literal : public ::lestes::std::object {
00051 public:
00052         virtual void accept_lex_literal_visitor( ptr< lex_literal_visitor > v ) abstract;
00053         
00054 
00055         //! for purposes of dumping
00056         virtual ptr<reflection_list> reflection_get() const;
00057         //! for purposes of dumping
00058         virtual ptr<field_list_list> field_values_get() const;
00059         
00060 protected:
00061         //! Generated constructor for class lex_literal.
00062         lex_literal (
00063                 );
00064 
00065         //! Marking routine for class lex_literal. 
00066         virtual void gc_mark();
00067 
00068 private:
00069         static ptr<reflection_list> reflection;
00070         
00071 }; // lex_literal
00072 
00073 
00074 /*! \brief Integral literal.
00075 
00076 
00077                                 Represents integral literal properties necessary to determine
00078                                 the data type and numeric value.
00079                                 The associated value is the original number in the specified base with suffixes.
00080                         
00081 */
00082 class lex_integral_literal : public lex_literal {
00083 public:
00084         //! Base type.
00085         enum base_type {
00086                 DECIMAL,
00087                 OCTAL,
00088                 HEXADECIMAL
00089         };
00090 /*! \brief Suffix type.
00091 
00092         Types of literal suffix.
00093         */
00094         enum suffix_type {
00095                 NONE,
00096                 UNSIGNED,
00097                 LONG,
00098                 UNSIGNED_LONG
00099         };
00100 
00101         //! The method base_get returns the value of the field lex_integral_literal::base.
00102         base_type base_get() const;
00103 
00104         //! The method base_set sets the field lex_integral_literal::base to the given value.
00105         void base_set(base_type);
00106 
00107         //! The method suffix_get returns the value of the field lex_integral_literal::suffix.
00108         suffix_type suffix_get() const;
00109 
00110         //! The method suffix_set sets the field lex_integral_literal::suffix to the given value.
00111         void suffix_set(suffix_type);
00112 
00113         //! The method start_get returns the value of the field lex_integral_literal::start.
00114         ulint start_get() const;
00115 
00116         //! The method start_set sets the field lex_integral_literal::start to the given value.
00117         void start_set(ulint);
00118 
00119         //! The method end_get returns the value of the field lex_integral_literal::end.
00120         ulint end_get() const;
00121 
00122         //! The method end_set sets the field lex_integral_literal::end to the given value.
00123         void end_set(ulint);
00124 
00125         virtual void accept_lex_literal_visitor( ptr< lex_literal_visitor > v );
00126         
00127         //! First generated factory method for class lex_integral_literal.
00128         static ptr< lex_integral_literal > create (
00129                 base_type a__lex_integral_literal__base,
00130                 suffix_type a__lex_integral_literal__suffix,
00131                 ulint a__lex_integral_literal__start,
00132                 ulint a__lex_integral_literal__end);
00133 
00134         
00135 
00136         //! for purposes of dumping
00137         virtual ptr<reflection_list> reflection_get() const;
00138         //! for purposes of dumping
00139         virtual ptr<field_list_list> field_values_get() const;
00140         
00141 protected:
00142         //! Generated constructor for class lex_integral_literal.
00143         lex_integral_literal (
00144                 base_type a__lex_integral_literal__base,
00145                 suffix_type a__lex_integral_literal__suffix,
00146                 ulint a__lex_integral_literal__start,
00147                 ulint a__lex_integral_literal__end);
00148 
00149         //! Marking routine for class lex_integral_literal. 
00150         virtual void gc_mark();
00151 
00152 private:
00153         /*! \brief Base.
00154 
00155         The numerical base of the literal.
00156         */
00157         base_type base;
00158         /*! \brief Suffix.
00159 
00160         Suffix of the literal.
00161         */
00162         suffix_type suffix;
00163         /*! \brief Start of value.
00164 
00165         Index pointing at the first digit of the value.
00166         */
00167         ulint start;
00168         //! End of value.
00169         ulint end;
00170         static ptr<reflection_list> reflection;
00171         
00172 }; // lex_integral_literal
00173 
00174 
00175 /*! \brief Floating literal.
00176 
00177 
00178                                 Represents floating literal properties necessary to determine
00179                                 the data type. The associated value is the original value with suffixes.
00180                         
00181 */
00182 class lex_floating_literal : public lex_literal {
00183 public:
00184         /*! \brief Suffix type.
00185 
00186         Types of floating literal suffix.
00187         */
00188         enum suffix_type {
00189                 NONE,
00190                 LONG,
00191                 FLOAT
00192         };
00193 
00194         //! The method suffix_get returns the value of the field lex_floating_literal::suffix.
00195         suffix_type suffix_get() const;
00196 
00197         //! The method suffix_set sets the field lex_floating_literal::suffix to the given value.
00198         void suffix_set(suffix_type);
00199 
00200         //! The method exponent_negative_get returns the value of the field lex_floating_literal::exponent_negative.
00201         bool exponent_negative_get() const;
00202 
00203         //! The method exponent_negative_set sets the field lex_floating_literal::exponent_negative to the given value.
00204         void exponent_negative_set(bool);
00205 
00206         //! The method integer_start_get returns the value of the field lex_floating_literal::integer_start.
00207         ulint integer_start_get() const;
00208 
00209         //! The method integer_start_set sets the field lex_floating_literal::integer_start to the given value.
00210         void integer_start_set(ulint);
00211 
00212         //! The method integer_end_get returns the value of the field lex_floating_literal::integer_end.
00213         ulint integer_end_get() const;
00214 
00215         //! The method integer_end_set sets the field lex_floating_literal::integer_end to the given value.
00216         void integer_end_set(ulint);
00217 
00218         //! The method fraction_start_get returns the value of the field lex_floating_literal::fraction_start.
00219         ulint fraction_start_get() const;
00220 
00221         //! The method fraction_start_set sets the field lex_floating_literal::fraction_start to the given value.
00222         void fraction_start_set(ulint);
00223 
00224         //! The method fraction_end_get returns the value of the field lex_floating_literal::fraction_end.
00225         ulint fraction_end_get() const;
00226 
00227         //! The method fraction_end_set sets the field lex_floating_literal::fraction_end to the given value.
00228         void fraction_end_set(ulint);
00229 
00230         //! The method exponent_start_get returns the value of the field lex_floating_literal::exponent_start.
00231         ulint exponent_start_get() const;
00232 
00233         //! The method exponent_start_set sets the field lex_floating_literal::exponent_start to the given value.
00234         void exponent_start_set(ulint);
00235 
00236         //! The method exponent_end_get returns the value of the field lex_floating_literal::exponent_end.
00237         ulint exponent_end_get() const;
00238 
00239         //! The method exponent_end_set sets the field lex_floating_literal::exponent_end to the given value.
00240         void exponent_end_set(ulint);
00241 
00242         virtual void accept_lex_literal_visitor( ptr< lex_literal_visitor > v );
00243         
00244         //! First generated factory method for class lex_floating_literal.
00245         static ptr< lex_floating_literal > create (
00246                 suffix_type a__lex_floating_literal__suffix,
00247                 bool a__lex_floating_literal__exponent_negative,
00248                 ulint a__lex_floating_literal__integer_start,
00249                 ulint a__lex_floating_literal__integer_end,
00250                 ulint a__lex_floating_literal__fraction_start,
00251                 ulint a__lex_floating_literal__fraction_end,
00252                 ulint a__lex_floating_literal__exponent_start,
00253                 ulint a__lex_floating_literal__exponent_end);
00254 
00255         
00256 
00257         //! for purposes of dumping
00258         virtual ptr<reflection_list> reflection_get() const;
00259         //! for purposes of dumping
00260         virtual ptr<field_list_list> field_values_get() const;
00261         
00262 protected:
00263         //! Generated constructor for class lex_floating_literal.
00264         lex_floating_literal (
00265                 suffix_type a__lex_floating_literal__suffix,
00266                 bool a__lex_floating_literal__exponent_negative,
00267                 ulint a__lex_floating_literal__integer_start,
00268                 ulint a__lex_floating_literal__integer_end,
00269                 ulint a__lex_floating_literal__fraction_start,
00270                 ulint a__lex_floating_literal__fraction_end,
00271                 ulint a__lex_floating_literal__exponent_start,
00272                 ulint a__lex_floating_literal__exponent_end);
00273 
00274         //! Marking routine for class lex_floating_literal. 
00275         virtual void gc_mark();
00276 
00277 private:
00278         //! Suffix.
00279         suffix_type suffix;
00280         /*! \brief Flag for negative exponent.
00281 
00282         Set to true for negative exponent.
00283         */
00284         bool exponent_negative;
00285         /*! \brief Start of interger value.
00286 
00287         Index pointing at the first digit of the integer value.
00288         */
00289         ulint integer_start;
00290         //! End of value.
00291         ulint integer_end;
00292         /*! \brief Start of interger value.
00293 
00294         Index pointing at the first digit of the fraction value.
00295         */
00296         ulint fraction_start;
00297         //! End of value.
00298         ulint fraction_end;
00299         /*! \brief Start of interger value.
00300 
00301         Index pointing at the first digit of the exponent value.
00302         */
00303         ulint exponent_start;
00304         //! End of value.
00305         ulint exponent_end;
00306         static ptr<reflection_list> reflection;
00307         
00308 }; // lex_floating_literal
00309 
00310 
00311 /*! \brief Character literal.
00312 
00313 
00314                                 Represents character literal properties necessary to determine
00315                                 the data type. The associated value is the contents of the quotes
00316                                 of the (wide) character literal converted to the execution character set.
00317                         
00318 */
00319 class lex_character_literal : public lex_literal {
00320 public:
00321         //! The method wide_flag_get returns the value of the field lex_character_literal::wide_flag.
00322         bool wide_flag_get() const;
00323 
00324         //! The method wide_flag_set sets the field lex_character_literal::wide_flag to the given value.
00325         void wide_flag_set(bool);
00326 
00327         //! The method multicharacter_flag_get returns the value of the field lex_character_literal::multicharacter_flag.
00328         bool multicharacter_flag_get() const;
00329 
00330         //! The method multicharacter_flag_set sets the field lex_character_literal::multicharacter_flag to the given value.
00331         void multicharacter_flag_set(bool);
00332 
00333         virtual void accept_lex_literal_visitor( ptr< lex_literal_visitor > v );
00334         
00335         //! First generated factory method for class lex_character_literal.
00336         static ptr< lex_character_literal > create (
00337                 bool a__lex_character_literal__wide_flag,
00338                 bool a__lex_character_literal__multicharacter_flag);
00339 
00340         
00341 
00342         //! for purposes of dumping
00343         virtual ptr<reflection_list> reflection_get() const;
00344         //! for purposes of dumping
00345         virtual ptr<field_list_list> field_values_get() const;
00346         
00347 protected:
00348         //! Generated constructor for class lex_character_literal.
00349         lex_character_literal (
00350                 bool a__lex_character_literal__wide_flag,
00351                 bool a__lex_character_literal__multicharacter_flag);
00352 
00353         //! Marking routine for class lex_character_literal. 
00354         virtual void gc_mark();
00355 
00356 private:
00357         //! Wide prefix flag.
00358         bool wide_flag;
00359         //! Multicharacter flag.
00360         bool multicharacter_flag;
00361         static ptr<reflection_list> reflection;
00362         
00363 }; // lex_character_literal
00364 
00365 
00366 /*! \brief String literal.
00367 
00368 
00369                                 Represents string literal properties necessary to determine
00370                                 the data type. The associated value is the contents of the double quotes
00371                                 of the (wide) string literal converted to the execution character set.
00372                         
00373 */
00374 class lex_string_literal : public lex_literal {
00375 public:
00376         //! The method wide_flag_get returns the value of the field lex_string_literal::wide_flag.
00377         bool wide_flag_get() const;
00378 
00379         //! The method wide_flag_set sets the field lex_string_literal::wide_flag to the given value.
00380         void wide_flag_set(bool);
00381 
00382         virtual void accept_lex_literal_visitor( ptr< lex_literal_visitor > v );
00383         
00384         //! First generated factory method for class lex_string_literal.
00385         static ptr< lex_string_literal > create (
00386                 bool a__lex_string_literal__wide_flag);
00387 
00388         
00389 
00390         //! for purposes of dumping
00391         virtual ptr<reflection_list> reflection_get() const;
00392         //! for purposes of dumping
00393         virtual ptr<field_list_list> field_values_get() const;
00394         
00395 protected:
00396         //! Generated constructor for class lex_string_literal.
00397         lex_string_literal (
00398                 bool a__lex_string_literal__wide_flag);
00399 
00400         //! Marking routine for class lex_string_literal. 
00401         virtual void gc_mark();
00402 
00403 private:
00404         //! Wide prefix flag.
00405         bool wide_flag;
00406         static ptr<reflection_list> reflection;
00407         
00408 }; // lex_string_literal
00409 
00410 
00411 /*! \brief Boolean literal.
00412 
00413 
00414                                 Represents boolean literal properties necessary to determine
00415                                 the data type. The associated value is the word true or false.
00416                         
00417 */
00418 class lex_boolean_literal : public lex_literal {
00419 public:
00420         virtual void accept_lex_literal_visitor( ptr< lex_literal_visitor > v );
00421         
00422         //! First generated factory method for class lex_boolean_literal.
00423         static ptr< lex_boolean_literal > create (
00424                 );
00425 
00426         
00427 
00428         //! for purposes of dumping
00429         virtual ptr<reflection_list> reflection_get() const;
00430         //! for purposes of dumping
00431         virtual ptr<field_list_list> field_values_get() const;
00432         
00433 protected:
00434         //! Generated constructor for class lex_boolean_literal.
00435         lex_boolean_literal (
00436                 );
00437 
00438         //! Marking routine for class lex_boolean_literal. 
00439         virtual void gc_mark();
00440 
00441 private:
00442         static ptr<reflection_list> reflection;
00443         
00444 }; // lex_boolean_literal
00445 
00446 
00447 end_package(lex);
00448 end_package(cplus);
00449 end_package(lang);
00450 end_package(lestes);
00451 
00452 package(lestes);
00453 package(std);
00454 specialize_objectize_for_enum( ::lestes::lang::cplus::lex::lex_integral_literal::base_type );
00455 specialize_objectize_for_enum( ::lestes::lang::cplus::lex::lex_integral_literal::suffix_type );
00456 specialize_objectize_for_enum( ::lestes::lang::cplus::lex::lex_floating_literal::suffix_type );
00457 end_package(std);
00458 end_package(lestes);
00459 
00460 #endif // lestes__lang__cplus__lex__lex_literal_g_hh__included

Generated on Mon Feb 12 18:27:05 2007 for lestes by doxygen 1.5.1-20070107