Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

TokenDesc Class Reference

#include <token_spec.hh>

Inheritance diagram for TokenDesc:

Inheritance graph
[legend]
Collaboration diagram for TokenDesc:

Collaboration graph
[legend]
List of all members.

Public Methods

 TokenDesc (const string &name_, int id_, ITokenSpec::Tkinds kind_, ReNode *regexp_, const string &action_, const Position &pos_)
 TokenDesc (const string name_, int id_, const Position &pos_)
 TokenDesc (const TokenDesc &o)
virtual const string& name () const
virtual int id () const
virtual ITokenSpec::Tkinds kind () const
virtual const Positionpos () const
virtual const CodeChunktokAction () const
virtual void dump (ostream &os) const

Private Attributes

string _name
ITokenSpec::Tkinds _kind
ReNode_regexp
int _id
CodeChunk _action
Position _pos

Constructor & Destructor Documentation

TokenDesc::TokenDesc ( const string & name_,
int id_,
ITokenSpec::Tkinds kind_,
ReNode * regexp_,
const string & action_,
const Position & pos_ ) [inline]
 

Creates a new regular or skip token spec object.

Definition at line 62 of file token_spec.hh.

TokenDesc::TokenDesc ( const string name_,
int id_,
const Position & pos_ ) [inline]
 

Creates a new special token spec object (only name and id are needed).

Definition at line 72 of file token_spec.hh.

TokenDesc::TokenDesc ( const TokenDesc & o ) [inline]
 

Definition at line 77 of file token_spec.hh.


Member Function Documentation

const string & TokenDesc::name ( ) const [inline, virtual]
 

Reimplemented from ITokenDesc.

Definition at line 82 of file token_spec.hh.

Referenced by EbnfTerminalNode::dump(), and operator==().

int TokenDesc::id ( ) const [inline, virtual]
 

Reimplemented from ITokenDesc.

Definition at line 84 of file token_spec.hh.

ITokenSpec::Tkinds TokenDesc::kind ( ) const [inline, virtual]
 

Reimplemented from ITokenDesc.

Definition at line 86 of file token_spec.hh.

const Position & TokenDesc::pos ( ) const [inline, virtual]
 

Reimplemented from ITokenDesc.

Definition at line 88 of file token_spec.hh.

const CodeChunk & TokenDesc::tokAction ( ) const [inline, virtual]
 

Reimplemented from ITokenDesc.

Definition at line 90 of file token_spec.hh.

void TokenDesc::dump ( ostream & os ) const [virtual]
 

If DEBUG is enabled, this method will dump all the data about this token into the given stream.

Reimplemented from ITokenDesc.

Definition at line 139 of file token_spec.cc.


Member Data Documentation

string TokenDesc::_name [private]
 

The token's name.

Definition at line 106 of file token_spec.hh.

ITokenSpec::Tkinds TokenDesc::_kind [private]
 

The token's kind (regular/skip/special.

Definition at line 111 of file token_spec.hh.

ReNode * TokenDesc::_regexp [private]
 

the regular expression o this token.

Definition at line 116 of file token_spec.hh.

int TokenDesc::_id [private]
 

Its unique id (this will also be the number used in the generated code).

Definition at line 121 of file token_spec.hh.

CodeChunk TokenDesc::_action [private]
 

User code to be executed when this token was matched.

Definition at line 126 of file token_spec.hh.

Position TokenDesc::_pos [private]
 

The token's position in the input file.

Definition at line 131 of file token_spec.hh.


The documentation for this class was generated from the following files:
Generated at Tue Jul 9 21:08:45 2002 for CppCC by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001