#include <basic_token.hh>
Inheritance diagram for lestes::lang::cplus::lex::basic_token< Type, Location, Value >:

Public Types | |
| typedef convert< Type >::to_ptr | type_type |
| Type of token type. | |
| typedef convert< Value >::to_ptr | value_type |
| Type of token value. | |
| typedef convert< Location >::to_ptr | location_type |
| Type of token location. | |
Public Member Functions | |
| Type | type_get (void) const |
| Returns type of token. | |
| Value | value_get (void) const |
| Returns value of token. | |
| Location | location_get (void) const |
| Returns location of token. | |
| bool | equals (const ptr< basic_token< Type, Location, Value > > &rhs) const |
| Tests equality. | |
Protected Member Functions | |
| basic_token (const Location &a_location, const Type &a_type, const Value &a_value) | |
| Initializes with location, token type and value. | |
| virtual void | gc_mark (void) |
| Marks the object. | |
Private Member Functions | |
| basic_token (const basic_token< Type, Location, Value > ©) | |
| Hides copy constructor. | |
| basic_token< Type, Location, Value > & | operator= (const basic_token< Type, Location, Value > &rhs) |
| Hides assignment operator. | |
Private Attributes | |
| convert< Type >::to_srp | type |
| Type of token. | |
| convert< Value >::to_srp | value |
| Token value itself. | |
| convert< Location >::to_srp | location |
| Where the token is located. | |
General token template representing an entity with specific occurence within file.
| Type | Type of the kind of the token. | |
| Location | Type of the location of the token. | |
| Value | Type of the value of the token. |
Definition at line 55 of file basic_token.hh.
| typedef convert<Type>::to_ptr lestes::lang::cplus::lex::basic_token< Type, Location, Value >::type_type |
| typedef convert<Value>::to_ptr lestes::lang::cplus::lex::basic_token< Type, Location, Value >::value_type |
| typedef convert<Location>::to_ptr lestes::lang::cplus::lex::basic_token< Type, Location, Value >::location_type |
| lestes::lang::cplus::lex::basic_token< Type, Location, Value >::basic_token | ( | const Location & | a_location, | |
| const Type & | a_type, | |||
| const Value & | a_value | |||
| ) | [inline, protected] |
Initializes with location, token type and value.
Creates initialized object.
| a_location | The location of the token. | |
| a_type | The type of the token. | |
| a_value | The value of the token. |
Definition at line 97 of file basic_token.hh.
| lestes::lang::cplus::lex::basic_token< Type, Location, Value >::basic_token | ( | const basic_token< Type, Location, Value > & | copy | ) | [private] |
Hides copy constructor.
| Type lestes::lang::cplus::lex::basic_token< Type, Location, Value >::type_get | ( | void | ) | const [inline] |
Returns type of token.
Returns token type.
Definition at line 110 of file basic_token.hh.
References lestes::lang::cplus::lex::basic_token< Type, Location, Value >::type.
00111 { 00112 return type; 00113 }
| Value lestes::lang::cplus::lex::basic_token< Type, Location, Value >::value_get | ( | void | ) | const [inline] |
Returns value of token.
Returns token value.
Definition at line 120 of file basic_token.hh.
References lestes::lang::cplus::lex::basic_token< Type, Location, Value >::value.
00121 { 00122 return value; 00123 }
| Location lestes::lang::cplus::lex::basic_token< Type, Location, Value >::location_get | ( | void | ) | const [inline] |
Returns location of token.
Returns token location.
Definition at line 130 of file basic_token.hh.
References lestes::lang::cplus::lex::basic_token< Type, Location, Value >::location.
00131 { 00132 return location; 00133 }
| bool lestes::lang::cplus::lex::basic_token< Type, Location, Value >::equals | ( | const ptr< basic_token< Type, Location, Value > > & | rhs | ) | const [inline] |
Tests equality.
Tests equality of tokens. Checks equality of type, value and location.
| rhs | The token to compare with. |
Definition at line 154 of file basic_token.hh.
References lestes::is_equal(), lestes::lang::cplus::lex::basic_token< Type, Location, Value >::location, lestes::lang::cplus::lex::basic_token< Type, Location, Value >::type, and lestes::lang::cplus::lex::basic_token< Type, Location, Value >::value.
00156 { 00157 return 00158 is_equal(type,rhs->type_get()) && 00159 is_equal(value,rhs->value_get()) && 00160 is_equal(location,rhs->location_get()); 00161 }
| void lestes::lang::cplus::lex::basic_token< Type, Location, Value >::gc_mark | ( | void | ) | [inline, protected, virtual] |
Marks the object.
Marks the object.
Reimplemented from lestes::std::mem::keystone.
Reimplemented in lestes::lang::cplus::lex::cpp_token, lestes::lang::cplus::lex::pp_token, and lestes::lang::cplus::lex::ucn_token.
Definition at line 139 of file basic_token.hh.
References lestes::std::mem::keystone::gc_mark(), lestes::gc_mark_srp(), lestes::lang::cplus::lex::basic_token< Type, Location, Value >::location, lestes::lang::cplus::lex::basic_token< Type, Location, Value >::type, and lestes::lang::cplus::lex::basic_token< Type, Location, Value >::value.
00140 { 00141 gc_mark_srp(type); 00142 gc_mark_srp(location); 00143 gc_mark_srp(value); 00144 00145 ::lestes::std::object::gc_mark(); 00146 }
| basic_token<Type,Location,Value>& lestes::lang::cplus::lex::basic_token< Type, Location, Value >::operator= | ( | const basic_token< Type, Location, Value > & | rhs | ) | [private] |
Hides assignment operator.
convert<Type>::to_srp lestes::lang::cplus::lex::basic_token< Type, Location, Value >::type [private] |
Type of token.
Definition at line 78 of file basic_token.hh.
Referenced by lestes::lang::cplus::lex::basic_token< Type, Location, Value >::equals(), lestes::lang::cplus::lex::basic_token< Type, Location, Value >::gc_mark(), and lestes::lang::cplus::lex::basic_token< Type, Location, Value >::type_get().
convert<Value>::to_srp lestes::lang::cplus::lex::basic_token< Type, Location, Value >::value [private] |
Token value itself.
Definition at line 80 of file basic_token.hh.
Referenced by lestes::lang::cplus::lex::basic_token< Type, Location, Value >::equals(), lestes::lang::cplus::lex::basic_token< Type, Location, Value >::gc_mark(), and lestes::lang::cplus::lex::basic_token< Type, Location, Value >::value_get().
convert<Location>::to_srp lestes::lang::cplus::lex::basic_token< Type, Location, Value >::location [private] |
Where the token is located.
Definition at line 82 of file basic_token.hh.
Referenced by lestes::lang::cplus::lex::basic_token< Type, Location, Value >::equals(), lestes::lang::cplus::lex::basic_token< Type, Location, Value >::gc_mark(), and lestes::lang::cplus::lex::basic_token< Type, Location, Value >::location_get().
1.5.1-20070107