Vcsn  2.2
Be Rational
vcsn::rat::parser::basic_symbol< Base > Struct Template Reference

A complete symbol. More...

#include <parse.hh>

Inheritance diagram for vcsn::rat::parser::basic_symbol< Base >:
Collaboration diagram for vcsn::rat::parser::basic_symbol< Base >:

Public Types

typedef Base super_type
 Alias to Base. More...
 

Public Member Functions

 basic_symbol ()
 Default constructor. More...
 
 basic_symbol (const basic_symbol &other)
 Copy constructor. More...
 
 basic_symbol (typename Base::kind_type t, const location_type &l)
 Constructor for valueless symbols, and symbols from each type. More...
 
 basic_symbol (typename Base::kind_type t, const braced_expression v, const location_type &l)
 
 basic_symbol (typename Base::kind_type t, const class_t v, const location_type &l)
 
 basic_symbol (typename Base::kind_type t, const dyn::weight v, const location_type &l)
 
 basic_symbol (typename Base::kind_type t, const irange_type v, const location_type &l)
 
 basic_symbol (typename Base::kind_type t, const std::string v, const location_type &l)
 
 basic_symbol (typename Base::kind_type t, const std::vector< vcsn::dyn::expression > v, const location_type &l)
 
 basic_symbol (typename Base::kind_type t, const semantic_type &v, const location_type &l)
 Constructor for symbols with semantic value. More...
 
 ~basic_symbol ()
 Destroy the symbol. More...
 
void clear ()
 Destroy contents, and record that is empty. More...
 
bool empty () const
 Whether empty. More...
 
void move (basic_symbol &s)
 Destructive move, s is emptied into this. More...
 

Public Attributes

semantic_type value
 The semantic value. More...
 
location_type location
 The location. More...
 

Private Member Functions

basic_symboloperator= (const basic_symbol &other)
 Assignment operator. More...
 

Detailed Description

template<typename Base>
struct vcsn::rat::parser::basic_symbol< Base >

A complete symbol.

Expects its Base type to provide access to the symbol type via type_get().

Provide access to semantic value and location.

Definition at line 400 of file parse.hh.

Member Typedef Documentation

template<typename Base>
typedef Base vcsn::rat::parser::basic_symbol< Base >::super_type

Alias to Base.

Definition at line 403 of file parse.hh.

Constructor & Destructor Documentation

template<typename Base >
vcsn::rat::parser::basic_symbol< Base >::basic_symbol ( )
inline

Default constructor.

Definition at line 887 of file parse.hh.

template<typename Base >
vcsn::rat::parser::basic_symbol< Base >::basic_symbol ( const basic_symbol< Base > &  other)
inline

Copy constructor.

Definition at line 893 of file parse.hh.

References vcsn::rat::variant< S >::copy(), and vcsn::rat::parser::basic_symbol< Base >::value.

Here is the call graph for this function:

template<typename Base>
vcsn::rat::parser::basic_symbol< Base >::basic_symbol ( typename Base::kind_type  t,
const location_type l 
)

Constructor for valueless symbols, and symbols from each type.

Definition at line 982 of file parse.hh.

template<typename Base>
vcsn::rat::parser::basic_symbol< Base >::basic_symbol ( typename Base::kind_type  t,
const braced_expression  v,
const location_type l 
)

Definition at line 989 of file parse.hh.

template<typename Base>
vcsn::rat::parser::basic_symbol< Base >::basic_symbol ( typename Base::kind_type  t,
const class_t  v,
const location_type l 
)

Definition at line 996 of file parse.hh.

template<typename Base>
vcsn::rat::parser::basic_symbol< Base >::basic_symbol ( typename Base::kind_type  t,
const dyn::weight  v,
const location_type l 
)

Definition at line 1003 of file parse.hh.

template<typename Base>
vcsn::rat::parser::basic_symbol< Base >::basic_symbol ( typename Base::kind_type  t,
const irange_type  v,
const location_type l 
)

Definition at line 1010 of file parse.hh.

template<typename Base>
vcsn::rat::parser::basic_symbol< Base >::basic_symbol ( typename Base::kind_type  t,
const std::string  v,
const location_type l 
)

Definition at line 1017 of file parse.hh.

template<typename Base>
vcsn::rat::parser::basic_symbol< Base >::basic_symbol ( typename Base::kind_type  t,
const std::vector< vcsn::dyn::expression v,
const location_type l 
)

Definition at line 1024 of file parse.hh.

template<typename Base>
vcsn::rat::parser::basic_symbol< Base >::basic_symbol ( typename Base::kind_type  t,
const semantic_type v,
const location_type l 
)
inline

Constructor for symbols with semantic value.

Definition at line 937 of file parse.hh.

References vcsn::rat::variant< S >::copy(), vcsn::detail::v, vcsn::rat::parser::basic_symbol< Base >::value, and vcsn::detail::void.

Here is the call graph for this function:

template<typename Base >
vcsn::rat::parser::basic_symbol< Base >::~basic_symbol ( )
inline

Destroy the symbol.

Definition at line 1033 of file parse.hh.

Member Function Documentation

template<typename Base >
void vcsn::rat::parser::basic_symbol< Base >::clear ( )
inline

Destroy contents, and record that is empty.

Definition at line 1041 of file parse.hh.

References vcsn::detail::void.

Referenced by vcsn::rat::parser::parse().

template<typename Base >
bool vcsn::rat::parser::basic_symbol< Base >::empty ( ) const
inline
template<typename Base >
void vcsn::rat::parser::basic_symbol< Base >::move ( basic_symbol< Base > &  s)
inline

Destructive move, s is emptied into this.

Definition at line 1102 of file parse.hh.

References vcsn::rat::parser::basic_symbol< Base >::location, and vcsn::rat::parser::basic_symbol< Base >::value.

Referenced by vcsn::rat::parser::parse().

template<typename Base>
basic_symbol& vcsn::rat::parser::basic_symbol< Base >::operator= ( const basic_symbol< Base > &  other)
private

Assignment operator.

Member Data Documentation


The documentation for this struct was generated from the following file: