Public Types | Public Member Functions | Private Member Functions | Private Attributes

token Class Reference

#include "token.h"

Collaboration diagram for token:
Collaboration graph
[legend]

List of all members.

Public Types

enum  end_tok_type {
  simple_end, classdef_end, enumeration_end, events_end,
  for_end, function_end, if_end, methods_end,
  parfor_end, properties_end, switch_end, while_end,
  try_catch_end, unwind_protect_end
}
enum  token_type {
  generic_token, string_token, double_token, ettype_token,
  sym_rec_token, scls_rec_token, meta_rec_token
}

Public Member Functions

 token (int l=-1, int c=-1)
 token (const std::string &s, int l=-1, int c=-1)
 token (end_tok_type t, int l=-1, int c=-1)
 token (symbol_table::symbol_record *s, int l=-1, int c=-1)
 token (double d, const std::string &s=std::string(), int l=-1, int c=-1)
 token (symbol_table::symbol_record *cls, symbol_table::symbol_record *pkg, int l=-1, int c=-1)
 token (symbol_table::symbol_record *mth, symbol_table::symbol_record *cls, symbol_table::symbol_record *pkg, int l=-1, int c=-1)
 ~token (void)
symbol_table::symbol_recordclass_rec (void)
int column (void)
end_tok_type ettype (void)
int line (void)
symbol_table::symbol_recordmeta_class_rec (void)
symbol_table::symbol_recordmeta_package_rec (void)
symbol_table::symbol_recordmethod_rec (void)
double number (void)
symbol_table::symbol_recordpackage_rec (void)
symbol_table::symbol_recordsym_rec (void)
std::string text (void)
std::string text_rep (void)

Private Member Functions

 token (const token &tok)
tokenoperator= (const token &tok)

Private Attributes

union {
   end_tok_type   et
   struct {
      symbol_table::symbol_record *   cr
      symbol_table::symbol_record *   pr
   }   mc
   double   num
   struct {
      symbol_table::symbol_record *   cr
      symbol_table::symbol_record *   mr
      symbol_table::symbol_record *   pr
   }   sc
   symbol_table::symbol_record *   sr
   std::string *   str
}; 
int column_num
int line_num
std::string orig_text
token_type type_tag

Detailed Description

Definition at line 28 of file token.h.


Member Enumeration Documentation

Enumerator:
simple_end 
classdef_end 
enumeration_end 
events_end 
for_end 
function_end 
if_end 
methods_end 
parfor_end 
properties_end 
switch_end 
while_end 
try_catch_end 
unwind_protect_end 

Definition at line 44 of file token.h.

Enumerator:
generic_token 
string_token 
double_token 
ettype_token 
sym_rec_token 
scls_rec_token 
meta_rec_token 

Definition at line 33 of file token.h.


Constructor & Destructor Documentation

token::token ( int  l = -1,
int  c = -1 
)

Definition at line 35 of file token.cc.

References column_num, line_num, and type_tag.

token::token ( const std::string &  s,
int  l = -1,
int  c = -1 
)

Definition at line 42 of file token.cc.

References column_num, line_num, str, and type_tag.

token::token ( double  d,
const std::string &  s = std::string (),
int  l = -1,
int  c = -1 
)

Definition at line 50 of file token.cc.

References column_num, line_num, num, orig_text, and type_tag.

token::token ( end_tok_type  t,
int  l = -1,
int  c = -1 
)

Definition at line 59 of file token.cc.

References column_num, et, line_num, and type_tag.

token::token ( symbol_table::symbol_record s,
int  l = -1,
int  c = -1 
)

Definition at line 67 of file token.cc.

References column_num, line_num, sr, and type_tag.

token::token ( symbol_table::symbol_record cls,
symbol_table::symbol_record pkg,
int  l = -1,
int  c = -1 
)

Definition at line 75 of file token.cc.

References column_num, line_num, mc, and type_tag.

token::token ( symbol_table::symbol_record mth,
symbol_table::symbol_record cls,
symbol_table::symbol_record pkg,
int  l = -1,
int  c = -1 
)

Definition at line 85 of file token.cc.

References column_num, line_num, sc, and type_tag.

token::~token ( void   ) 

Definition at line 97 of file token.cc.

References str, string_token, and type_tag.

token::token ( const token tok  )  [private]

Member Function Documentation

symbol_table::symbol_record * token::class_rec ( void   ) 

Definition at line 139 of file token.cc.

References sc, scls_rec_token, and type_tag.

int token::column ( void   )  [inline]

Definition at line 77 of file token.h.

token::end_tok_type token::ettype ( void   ) 

Definition at line 118 of file token.cc.

References et, ettype_token, and type_tag.

int token::line ( void   )  [inline]

Definition at line 76 of file token.h.

symbol_table::symbol_record * token::meta_class_rec ( void   ) 

Definition at line 153 of file token.cc.

References mc, meta_rec_token, and type_tag.

symbol_table::symbol_record * token::meta_package_rec ( void   ) 

Definition at line 160 of file token.cc.

References mc, meta_rec_token, and type_tag.

symbol_table::symbol_record * token::method_rec ( void   ) 

Definition at line 132 of file token.cc.

References sc, scls_rec_token, and type_tag.

double token::number ( void   ) 

Definition at line 111 of file token.cc.

References double_token, num, and type_tag.

token& token::operator= ( const token tok  )  [private]
symbol_table::symbol_record * token::package_rec ( void   ) 

Definition at line 146 of file token.cc.

References sc, scls_rec_token, and type_tag.

symbol_table::symbol_record * token::sym_rec ( void   ) 

Definition at line 125 of file token.cc.

References sr, sym_rec_token, and type_tag.

std::string token::text ( void   ) 

Definition at line 104 of file token.cc.

References str, string_token, and type_tag.

std::string token::text_rep ( void   ) 

Definition at line 167 of file token.cc.

References orig_text.


Member Data Documentation

union { ... } [private]

Definition at line 102 of file token.h.

Referenced by token().

Definition at line 113 of file token.h.

Definition at line 108 of file token.h.

Referenced by ettype(), and token().

int token::line_num [private]

Definition at line 101 of file token.h.

Referenced by token().

struct { ... } token::mc

Definition at line 112 of file token.h.

Definition at line 107 of file token.h.

Referenced by number(), and token().

std::string token::orig_text [private]

Definition at line 122 of file token.h.

Referenced by text_rep(), and token().

Definition at line 114 of file token.h.

struct { ... } token::sc

Definition at line 109 of file token.h.

Referenced by sym_rec(), and token().

std::string* token::str

Definition at line 106 of file token.h.

Referenced by text(), token(), and ~token().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines